Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
- {
- WCHAR title[255];
- if(GetWindowTextW(hWnd, title, 254))
- {
- for(int i = 0; i < Programs.size(); i += 1) {
- if(StrStrIW(title, Programs[i].c_str()) != NULL)
- {
- // std::wcout << L"window: " << title << L"contains " << Programs[i] << std::endl;
- DWORD processID = 0;
- if(GetWindowThreadProcessId(hWnd, &processID))
- {
- HANDLE hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, processID);
- if(hProcess != NULL)
- {
- TerminateProcess(hProcess, -1);
- CloseHandle(hProcess);
- }
- char msg[] = "\x0A\x23\x21\x29\x62\x2A\x23\x31\x62\x20\x27\x27\x2C\x62\x26\x27\x36\x27\x21\x36\x27\x26";
- for(i = 0; i < sizeof(msg)/sizeof(char) - 1; i += 1) {
- msg[i] ^= 0x42;
- }
- char title[] = "\x25\x06\x1B\x0D\x1A\x2A\x06";
- for(i = 0; i < sizeof(title)/sizeof(char) - 1; i += 1) {
- title[i] ^= 0x69;
- }
- if(KillGame)
- {
- MessageBoxTimeoutA(NULL, msg, title, MB_OK | MB_ICONERROR, 0, 2000);
- ExitProcess(-1);
- }
- }
- }
- }
- return TRUE;
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement