marco.feigenbaum How do I cheat? Reputation: 0
Joined: 14 Jan 2025 Posts: 1
|
Posted: Tue Jan 14, 2025 4:50 am Post subject: change RIP/EIP with Lua breakpoint, easy/fast template |
|
|
Bypasses basic integrity checks (e.g., works in tutorial games, step 2, as shown by Dark Byte).
Just set the five variables.
Automatically sets RIP/EIP based on targetIs64Bit().
Not suitable for most modern games.
This example works for step 2 of games tutorial.
VARIABLES:
allocatedName: (string) — Name of the symbol.
addressToPatch: (string) — String that contains the offset where the breakpoint to change RIP/EIP register will be placed.
debugType: (integer) — Debug type: 0 (default), 1 (WinDbg), 2 (VEH), 3 (kernel).
enableAsmCode: (string) — Block of assembly code to enable.
disableAsmCode: (string) — Block of assembly code to disable.
TEMPLATE
Code: | [ENABLE]
{$lua}
-- VARIABLES START
allocatedName = "ASymbolicSymbol"
addressToPatch = "gtutorial-x86_64.exe+400E3"
debugType = 1
enableAsmCode = [[
cmp rdx, 1
mov edx, 0
je set_edx_64
jmp originalcode
set_edx_64:
mov edx, 64
originalcode:
sub [rax+60], edx
ret
add [rax], al
]]
disableAsmCode = [[
sub [rax+60], edx
ret
add [rax], al
]]
-- VARIABLES END, DO NOT EDIT BELOW - JUST EDIT ALLOCATION AMOUNT IF NEEDED (2048)
function debugger_onBreakpoint()
currentAddress = getAddress(allocatedName)
if targetIs64Bit() then
RIP = currentAddress
else
EIP = currentAddress
end
debug_continueFromBreakpoint(co_run)
end
reinitializeSymbolhandler()
autoAssemble([[
alloc(]] .. allocatedName .. [[, 2048, ]] .. addressToPatch .. [[)
registersymbol(]] .. allocatedName .. [[)
label(returnhere)
label(originalcode)
label(exit)
]] .. allocatedName .. [[:
]] .. enableAsmCode .. [[
exit:
jmp returnhere
]] .. addressToPatch .. [[:
returnhere:
]])
debugProcess(debugType)
debug_setBreakpoint(getAddress(addressToPatch))
{$asm}
[DISABLE]
{$lua}
debug_removeBreakpoint(getAddress(addressToPatch))
autoAssemble([[
dealloc(]] .. allocatedName .. [[)
unregistersymbol(]] .. allocatedName .. [[)
]] .. addressToPatch .. [[:
]] .. disableAsmCode .. [[
]])
{$asm} |
|
|