#include #include #include #pragma comment(lib, "winmm.lib") #define _USE_MATH_DEFINES 1 #include #define M_PI 3.14159265358979323846264338327950288 //typedef NTSTATUS(NTAPI* NRHEdef)(NTSTATUS, ULONG, ULONG, PULONG, ULONG, PULONG); //typedef NTSTATUS(NTAPI* RAPdef)(ULONG, BOOLEAN, BOOLEAN, PBOOLEAN); typedef union _RGBQUAD { COLORREF rgb; struct { BYTE r; BYTE g; BYTE b; BYTE Reserved; }; }_RGBQUAD, *PRGBQUAD; int red, green, blue; bool ifcolorblue = false, ifblue = false; COLORREF Hue(int length) { //Credits to Void_/GetMBR if (red != length) { red < length; red++; if (ifblue == true) { return RGB(red, 0, length); } else { return RGB(red, 0, 0); } } else { if (green != length) { green < length; green++; return RGB(length, green, 0); } else { if (blue != length) { blue < length; blue++; return RGB(0, length, blue); } else { red = 0; green = 0; blue = 0; ifblue = true; } } } } DWORD WINAPI balls(LPVOID lpParam) { int w = GetSystemMetrics(0), h = GetSystemMetrics(1); int signX = 1; int signY = 1; int signX1 = 1; int signY1 = 1; int incrementor = 10; int x = 10; int y = 10; while (1) { HDC hdc = GetDC(0); int top_x = 0 + x; int top_y = 0 + y; int bottom_x = 100 + x; int bottom_y = 100 + y; x += incrementor * signX; y += incrementor * signY; HBRUSH brush = CreateSolidBrush(Hue(239)); SelectObject(hdc, brush); Ellipse(hdc, top_x, top_y, bottom_x, bottom_y); if (y >= GetSystemMetrics(SM_CYSCREEN)) { signY = -1; } if (x >= GetSystemMetrics(SM_CXSCREEN)) { signX = -1; } if (y == 0) { signY = 1; } if (x == 0) { signX = 1; } Sleep(10); DeleteObject(brush); ReleaseDC(0, hdc); } } DWORD WINAPI bitblt1(LPVOID lpParam) { HDC desktop = GetDC(NULL); int xs = GetSystemMetrics(SM_CXSCREEN); int ys = GetSystemMetrics(SM_CYSCREEN); while (true) { desktop = GetDC(NULL); BitBlt(desktop, 2, 2, xs, ys, desktop, -2, 2, SRCCOPY); ReleaseDC(0, desktop); Sleep(10); } } DWORD WINAPI vertwide(LPVOID lpParam) { HDC desk; int sw, sh; while (1) { desk = GetDC(0); sw = GetSystemMetrics(0); sh = GetSystemMetrics(1); StretchBlt(desk, 0, -20, sw, sh + 40, desk, 0, 0, sw, sh, SRCCOPY); ReleaseDC(0, desk); Sleep(4); } } DWORD WINAPI masher(LPVOID lpParam) { while (1) { HDC hdc = GetDC(HWND_DESKTOP); int sw = GetSystemMetrics(SM_CXSCREEN), sh = GetSystemMetrics(SM_CYSCREEN); BitBlt(hdc, rand() % 5, rand() % 5, rand() % sw, rand() % sh, hdc, rand() % 5, rand() % 5, SRCCOPY); ReleaseDC(0, hdc); } } DWORD WINAPI squares(LPVOID lpParam) { int w = GetSystemMetrics(0), h = GetSystemMetrics(1); int signX = 1; int signY = 1; int signX1 = 1; int signY1 = 1; int incrementor = 10; int x = 10; int y = 10; while (1) { HDC hdc = GetDC(0); int top_x = 0 + x; int top_y = 0 + y; int bottom_x = 100 + x; int bottom_y = 100 + y; x += incrementor * signX; y += incrementor * signY; HBRUSH brush = CreateSolidBrush(Hue(239)); SelectObject(hdc, brush); Rectangle(hdc, top_x, top_y, bottom_x, bottom_y); if (y >= GetSystemMetrics(SM_CYSCREEN)) { signY = -1; } if (x >= GetSystemMetrics(SM_CXSCREEN)) { signX = -1; } if (y == 0) { signY = 1; } if (x == 0) { signX = 1; } Sleep(10); DeleteObject(brush); ReleaseDC(0, hdc); } } DWORD WINAPI sustainepic(LPVOID lpParam) { int w = GetSystemMetrics(0); int h = GetSystemMetrics(1); while (1) { HDC hdc = GetDC(0); HBRUSH brush = CreateSolidBrush(Hue(239)); SelectObject(hdc, brush); //BitBlt(hdc, -30, 0, w, h, hdc, -30, 0, SRCCOPY); BitBlt(hdc, -1, 0, w, h, hdc, 0, 0, SRCCOPY); BitBlt(hdc, w - 1, 0, w, h, hdc, 0, 0, PATCOPY); //BitBlt(hdc, 0, 0, w, h, hdc, 0, -30, 0x1900ac010e); //BitBlt(hdc, 0, 0, w, h, hdc, 0, h - 30, 0x1900ac010e); DeleteObject(brush); ReleaseDC(0, hdc); } } DWORD WINAPI tunnel(LPVOID lpParam) { int sw, sh; while (1) { HDC hdc = GetDC(0); sw = GetSystemMetrics(SM_CXSCREEN); sh = GetSystemMetrics(SM_CYSCREEN); // For zooming out, the source area should be larger than the destination area. // We shrink the destination area by 40 pixels, so the source area should be larger by the same amount. StretchBlt(hdc, 20, 20, sw - 40, sh - 40, hdc, 0, 0, sw, sh, SRCCOPY); ReleaseDC(0, hdc); Sleep(4); } } DWORD WINAPI sustainepic2(LPVOID lpParam) { int w = GetSystemMetrics(0); int h = GetSystemMetrics(1); while (1) { HDC hdc = GetDC(0); HBRUSH brush = CreateSolidBrush(Hue(239)); SelectObject(hdc, brush); //BitBlt(hdc, -30, 0, w, h, hdc, -30, 0, SRCCOPY); BitBlt(hdc, -5, 1, w, h, hdc, 2, 2, SRCCOPY); BitBlt(hdc, w - 5, 1, w, h, hdc, 2, 2, PATCOPY); //BitBlt(hdc, 0, 0, w, h, hdc, 0, -30, 0x1900ac010e); //BitBlt(hdc, 0, 0, w, h, hdc, 0, h - 30, 0x1900ac010e); DeleteObject(brush); ReleaseDC(0, hdc); } } VOID WINAPI sound1() { HWAVEOUT hWaveOut = 0; WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 8, 0 }; waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL); char buffer[8000 * 30] = {}; for (DWORD t = 0; t < sizeof(buffer); ++t) buffer[t] = static_cast(t&(t >> 7) - t & t >> 8); WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 }; waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR)); waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR)); waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR)); waveOutClose(hWaveOut); } VOID WINAPI sound2() { HWAVEOUT hWaveOut = 0; WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 8, 0 }; waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL); char buffer[8000 * 30] = {}; for (DWORD t = 0; t < sizeof(buffer); ++t) buffer[t] = static_cast(150 * (t >> 6 | t | t >> (t >> 16)) + (7 & t >> 11)); WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 }; waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR)); waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR)); waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR)); waveOutClose(hWaveOut); } VOID WINAPI sound3() { HWAVEOUT hWaveOut = 0; WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 8, 0 }; waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL); char buffer[8000 * 30] = {}; for (DWORD t = 0; t < sizeof(buffer); ++t) buffer[t] = static_cast(10 * (t & 5 * t | t >> 6 | (t & 32768 ? -6 * t / 7 : (t & 65536 ? -9 * t & 100 : -9 * (t & 100)) / 11))); WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 }; waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR)); waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR)); waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR)); waveOutClose(hWaveOut); } VOID WINAPI sound4() { HWAVEOUT hWaveOut = 0; WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 8, 0 }; waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL); char buffer[8000 * 30] = {}; for (DWORD t = 0; t < sizeof(buffer); ++t) buffer[t] = static_cast((t*(t >> 5 | t >> 1) ^ 20) & 500); WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 }; waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR)); waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR)); waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR)); waveOutClose(hWaveOut); } VOID WINAPI sound5() { HWAVEOUT hWaveOut = 0; WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 8, 0 }; waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL); char buffer[8000 * 20] = {}; for (DWORD t = 0; t < sizeof(buffer); ++t) buffer[t] = static_cast((t >> 10) | (t >> 4))*t&((t >> 8) | (t >> 10)); WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 }; waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR)); waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR)); waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR)); waveOutClose(hWaveOut); } VOID WINAPI sound6() { HWAVEOUT hWaveOut = 0; WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 8, 0 }; waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL); char buffer[8000 * 30] = {}; for (DWORD t = 0; t < sizeof(buffer); ++t) buffer[t] = static_cast(430 * (5 * t >> 11 | 5 * t >> 1)); WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 }; waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR)); waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR)); waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR)); waveOutClose(hWaveOut); } VOID WINAPI sound7() { HWAVEOUT hWaveOut = 0; WAVEFORMATEX wfx = { WAVE_FORMAT_PCM, 1, 8000, 8000, 1, 8, 0 }; waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL); char buffer[8000 * 30] = {}; for (DWORD t = 0; t < sizeof(buffer); ++t) buffer[t] = static_cast(9 * t&t >> 4 | 5 * t&t >> 7 | (3 * t&t >> 10) - 1); WAVEHDR header = { buffer, sizeof(buffer), 0, 0, 0, 0, 0, 0 }; waveOutPrepareHeader(hWaveOut, &header, sizeof(WAVEHDR)); waveOutWrite(hWaveOut, &header, sizeof(WAVEHDR)); waveOutUnprepareHeader(hWaveOut, &header, sizeof(WAVEHDR)); waveOutClose(hWaveOut); } int CALLBACK WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ) { if (MessageBoxW(NULL, L"This is GDI Malware\nThis is not safe.", L"clr.exe by rarka", MB_YESNO | MB_ICONEXCLAMATION) == IDNO) { ExitProcess(0); } else { if (MessageBoxW(NULL, L"Are you sure? It still contains flashing lights - NOT for epilepsy", L"Final Warning - clr.exe", MB_YESNO | MB_ICONEXCLAMATION) == IDNO) { ExitProcess(0); } else { HANDLE d1 = CreateThread(0, 0, bitblt1, 0, 0, 0); sound1(); Sleep(30000); Sleep(200); TerminateThread(d1, 0); CloseHandle(d1); HANDLE d2 = CreateThread(0, 0, vertwide, 0, 0, 0); HANDLE d3dot1 = CreateThread(0, 0, balls, 0, 0, 0); sound2(); Sleep(30000); Sleep(200); TerminateThread(d2, 0); CloseHandle(d2); TerminateThread(d3dot1, 0); CloseHandle(d3dot1); HANDLE d3 = CreateThread(0, 0, masher, 0, 0, 0); sound3(); Sleep(30000); Sleep(200); TerminateThread(d3, 0); CloseHandle(d3); HANDLE d4 = CreateThread(0, 0, squares, 0, 0, 0); HANDLE d5 = CreateThread(0, 0, sustainepic, 0, 0, 0); sound4(); Sleep(30000); Sleep(200); TerminateThread(d4, 0); CloseHandle(d4); TerminateThread(d5, 0); CloseHandle(d5); HANDLE d6 = CreateThread(0, 0, tunnel, 0, 0, 0); HANDLE d7dot2 = CreateThread(0, 0, balls, 0, 0, 0); sound5(); Sleep(20000); Sleep(200); TerminateThread(d6, 0); CloseHandle(d6); TerminateThread(d7dot2, 0); CloseHandle(d7dot2); HANDLE d8 = CreateThread(0, 0, sustainepic2, 0, 0, 0); HANDLE d9dot3 = CreateThread(0, 0, squares, 0, 0, 0); sound6(); Sleep(30000); Sleep(200); TerminateThread(d8, 0); CloseHandle(d8); TerminateThread(d9dot3, 0); CloseHandle(d9dot3); } } }