Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define RReturnCheckFunction_address rbxaddy(0x5465A6)
- #define RReturnFlag1_address rbxaddy(0x147AF28)
- #define RReturnFlag2_address rbxaddy(0x14A358C4)
- namespace RetcheckDisablers {
- namespace ret {
- auto Retcheck() {
- int rccheck_function = RReturnCheckFunction_address;
- int flag1 = RReturnFlag1_address;
- int flag2 = RReturnFlag2_address;
- int flag1_val = *(int*)(flag1);
- int flag2_val = *(int*)(flag2);
- DWORD nOldProtect;
- BYTE OldJump = *(BYTE*)(rccheck_function);
- VirtualProtect((LPVOID)(rccheck_function), 1, PAGE_EXECUTE_READWRITE, &nOldProtect);
- *(BYTE*)(rccheck_function) = 0xC3;
- return [&]() {
- *(int*)flag1 = flag1_val;
- *(int*)flag2 = flag2_val;
- *(BYTE*)(rccheck_function) = OldJump;
- VirtualProtect((PVOID)(rccheck_function), 1, nOldProtect, &nOldProtect);
- };
- }
- }
- }
- void HookRet()
- {
- auto lmao = RetcheckDisablers::ret::Retcheck();
- lmao();
- MessageBoxA(0, "Retcheck Hooked into Memory! You may now enjoy your unlimited Lua C API Functions!);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement