Advertisement
Guest User

Untitled

a guest
Jul 12th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
  2. {
  3. WCHAR title[255];
  4. if(GetWindowTextW(hWnd, title, 254))
  5. {
  6. for(int i = 0; i < Programs.size(); i += 1) {
  7. if(StrStrIW(title, Programs[i].c_str()) != NULL)
  8. {
  9. // std::wcout << L"window: " << title << L"contains " << Programs[i] << std::endl;
  10.  
  11. DWORD processID = 0;
  12. if(GetWindowThreadProcessId(hWnd, &processID))
  13. {
  14. HANDLE hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, processID);
  15. if(hProcess != NULL)
  16. {
  17. TerminateProcess(hProcess, -1);
  18. CloseHandle(hProcess);
  19. }
  20.  
  21. char msg[] = "\x0A\x23\x21\x29\x62\x2A\x23\x31\x62\x20\x27\x27\x2C\x62\x26\x27\x36\x27\x21\x36\x27\x26";
  22. for(i = 0; i < sizeof(msg)/sizeof(char) - 1; i += 1) {
  23. msg[i] ^= 0x42;
  24. }
  25.  
  26. char title[] = "\x25\x06\x1B\x0D\x1A\x2A\x06";
  27. for(i = 0; i < sizeof(title)/sizeof(char) - 1; i += 1) {
  28. title[i] ^= 0x69;
  29. }
  30.  
  31. if(KillGame)
  32. {
  33. MessageBoxTimeoutA(NULL, msg, title, MB_OK | MB_ICONERROR, 0, 2000);
  34. ExitProcess(-1);
  35. }
  36. }
  37. }
  38. }
  39.  
  40. return TRUE;
  41. }
  42.  
  43. return TRUE;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement