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