Advertisement
xFaelz

Untitled

Apr 16th, 2018
328
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. #include <Windows.h>
  2. #include "stdafx.h"
  3.  
  4. void strip_xtrap()
  5. {
  6. *(char*)0x5D9491 = 0xEB;
  7. }
  8.  
  9. void strip_odd_connection_request()
  10. {
  11. // This weird connection request to 211.115.86.66:2424 that always fails make the client laggy.
  12. // This patch kill the call.
  13. *(short*)0x5D8E8C = 0x9090;
  14. }
  15. void setWindow()
  16. {
  17. strcpy((char*)0x5494FC, "TESTE - WYD");
  18. }
  19. int __stdcall DllMain(HINSTANCE hInstDLL, DWORD catchReason, LPVOID lpResrv)
  20. {
  21. if (catchReason == DLL_PROCESS_ATTACH)
  22. {
  23. DWORD dwOldProtectFlag_text;
  24.  
  25. VirtualProtect((void*)0x401000, 0x1F3000, PAGE_READWRITE, &dwOldProtectFlag_text);
  26.  
  27. strip_xtrap();
  28. strip_odd_connection_request();
  29. setWindow();
  30.  
  31. VirtualProtect((void*)0x401000, 0x1F3000, dwOldProtectFlag_text, &dwOldProtectFlag_text);
  32. }
  33. else if (catchReason == DLL_PROCESS_DETACH)
  34. {
  35. FreeLibrary(hInstDLL);
  36. }
  37.  
  38. return TRUE;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement