Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //DWORD addr = (DWORD)GetModuleHandleA("samp.dll") + 0x640E0; // R2
- DWORD addr = (DWORD)GetModuleHandleA("samp.dll") + 0x67460; // R3
- DWORD old_prot;
- VirtualProtect((LPVOID)addr, 4, 0x40, &old_prot);
- byte bytes[4] = { 0xC2, 0x14, 0x0, 0x90 }; // ret 0014
- for (int i = 0; i < 4; i++)
- *reinterpret_cast<BYTE*>(addr + i) = bytes[i];
- VirtualProtect((LPVOID)addr, 4, old_prot, &old_prot);
Advertisement
Add Comment
Please, Sign In to add comment