#include #include #include #include #include #include #include #include #include #include #pragma comment(lib, "winmm.lib") #pragma comment(lib, "Msimg32.lib") #define M_PI 3.14159265358979323846264338327950288 #define _USE_MATH_DEFINES 1 //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 shader1(LPVOID lpParam) { HDC hdc = GetDC(0); HWND wnd = GetDesktopWindow(); int sw = GetSystemMetrics(0), sh = GetSystemMetrics(1); double angle = 0; while (1) { hdc = GetDC(0); for (float i = 0; i < sw + sh; i += 1.99f) { int a = sin(angle) * 700; BitBlt(hdc, 0, i, sw, 1, hdc, a, i, SRCCOPY); angle += M_PI / 3; DeleteObject(&i); DeleteObject(&a); } ReleaseDC(wnd, hdc); DeleteDC(hdc); DeleteObject(&sw); DeleteObject(&sh); DeleteObject(&angle); } } DWORD WINAPI payload6(LPVOID lpParam) { int sw, sh; while (1) { HDC hdc = GetDC(0); sw = GetSystemMetrics(0); sh = GetSystemMetrics(1); StretchBlt(hdc, -20, -20, sw + 40, sh + 40, hdc, 0, 0, sw, sh, SRCCOPY); ReleaseDC(0, hdc); Sleep(4); } } 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, 3, 3, xs, ys, desktop, 5, 5, SRCCOPY); ReleaseDC(0, desktop); Sleep(10); } } 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, 5, 2, w, h, hdc, 6, 1, SRCCOPY); BitBlt(hdc, w - 5, 2, w, h, hdc, 6, 1, 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 patblt(LPVOID lpParam) { while (1) { HDC hdc = GetDC(NULL); int w = GetSystemMetrics(SM_CXSCREEN), h = GetSystemMetrics(SM_CYSCREEN); HBRUSH brush = CreateSolidBrush(RGB(rand() % 255, rand() % 255, rand() % 255)); SelectObject(hdc, brush); PatBlt(hdc, 0, 0, w, h, PATINVERT); 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(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 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(t * t / (1 + (t >> 9 & t >> 8)) & 128); 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, 22050, 22050, 1, 8, 0 }; waveOutOpen(&hWaveOut, WAVE_MAPPER, &wfx, 0, 0, CALLBACK_NULL); char buffer[22050 * 30] = {}; for (DWORD t = 0; t < sizeof(buffer); ++t) buffer[t] = static_cast(t * ((t >> 6 | t >> 11) & 15 & t >> 9)) * 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 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 * 30] = {}; for (DWORD t = 0; t < sizeof(buffer); ++t) buffer[t] = static_cast(t * ((t & 4096 ? t % 65536 < 59392 ? 7 : t & 7 : 16) + (1 & t >> 14)) >> (3 & t >> (t & 2048 ? 2 : 10)) | t >> (t & 16384 ? t & 4096 ? 4 : 3 : 2)); 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 main() { if (MessageBoxW(NULL, L"sugarwin.exe, Run?", L"sugarwin.exe", MB_YESNO | MB_ICONEXCLAMATION) == IDNO) { ExitProcess(0); } else { if (MessageBoxW(NULL, L"Are u sure?", L"sugarwin.exe", MB_YESNO | MB_ICONEXCLAMATION) == IDNO) { ExitProcess(0); } else Sleep(1000); HANDLE thread1 = CreateThread(0, 0, shader1, 0, 0, 0); HANDLE thread2 = CreateThread(0, 0, balls, 0, 0, 0); sound1(); Sleep(30000); Sleep(200); TerminateThread(thread1, 0); CloseHandle(thread1); TerminateThread(thread2, 0); CloseHandle(thread2); HANDLE thread3 = CreateThread(0, 0, bitblt1, 0, 0, 0); HANDLE thread4 = CreateThread(0, 0, balls, 0, 0, 0); sound2(); Sleep(30000); Sleep(200); TerminateThread(thread3, 0); CloseHandle(thread3); TerminateThread(thread4, 0); CloseHandle(thread4); HANDLE thread5 = CreateThread(0, 0, payload6, 0, 0, 0); sound3(); Sleep(30000); Sleep(200); TerminateThread(thread5, 0); CloseHandle(thread5); HANDLE thread6 = CreateThread(0, 0, sustainepic, 0, 0, 0); sound4(); Sleep(30000); Sleep(200); TerminateThread(thread6, 0); CloseHandle(thread6); HANDLE thread7 = CreateThread(0, 0, balls, 0, 0, 0); HANDLE thread8 = CreateThread(0, 0, patblt, 0, 0, 0); sound5(); Sleep(30000); Sleep(200); } }