Guest User

Untitled

a guest
May 20th, 2018
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. SetupDetour( HMODULE, WINAPI, LoadLibraryA, (LPCSTR dll) )
  2. {
  3. if(!strcmp(dll, "hlss.dll"))
  4. {
  5. HMOULE ret = call_trampoline(LoadLibraryA, (dll));
  6. DWORD Base = (DWORD)ret;
  7.  
  8.  
  9. add_log("------- Found a base of %x -------",Base);
  10. add_log("------- DLL Patch Address is %x -------", Base + 0x0008A68);
  11.  
  12. BYTE On[2] = {0x90, 0x90};
  13. DWORD addy = Base + 0x0008A68;
  14. VirtualProtect((void*)addy, 2, PAGE_READWRITE, &Prote);
  15. RtlMoveMemory((void*)addy,(void*)On,2);
  16. VirtualProtect((void*)addy, 2, Prote, 0);
  17.  
  18. add_log("----- Addy Contains: %x ------",addy);
  19. add_log("------- Patching of hlss ends here... -------")
  20.  
  21. }
  22.  
  23. return call_trampoline(LoadLibraryA, (dll));
  24. }
Add Comment
Please, Sign In to add comment