ya_makaron

chat nop

Jan 5th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.40 KB | None | 0 0
  1. //DWORD addr = (DWORD)GetModuleHandleA("samp.dll") + 0x640E0; // R2
  2.         DWORD addr = (DWORD)GetModuleHandleA("samp.dll") + 0x67460; // R3
  3.         DWORD old_prot;
  4.         VirtualProtect((LPVOID)addr, 4, 0x40, &old_prot);
  5.         byte bytes[4] = { 0xC2, 0x14, 0x0, 0x90 }; // ret 0014
  6.         for (int i = 0; i < 4; i++)
  7.             *reinterpret_cast<BYTE*>(addr + i) = bytes[i];
  8.  
  9.         VirtualProtect((LPVOID)addr, 4, old_prot, &old_prot);
Advertisement
Add Comment
Please, Sign In to add comment