Posted: Tue Mar 01, 2011 2:00 am Post subject: [ASK] How to change register value in CE
Hi,
Can someone help me, I want to know how to change register value (eax) of an address with LUA script ? So I can toggle it enable/disable easily.
And how to implement it in new CE trainer ?
How to view register stack in memory disassembler (I want to know about its value).
Joined: 09 May 2003 Posts: 25796 Location: The netherlands
Posted: Tue Mar 01, 2011 6:59 am Post subject:
the following code simulates a change reg at breakpoint bp
Code:
changeregaddress=0x0045c498 --change this to the address you want
debug_removeBreakpoint(changeregaddress) --remove it if it was set
function debugger_onBreakpoint()
if (EIP == changeregaddress) then
hasChangedARegister=true --obsolete in 6.1
EAX=0
changedEAX=true --obsolete in 6.1
debug_continueFromBreakpoint(0) --run (bug in 6.0: it's always run)
return 1 --I handled it so don't tell the user
else
return 0 --unexpected breakpoint, show the the user
end
end
debug_setBreakpoint(changeregaddress)
as to implementing it in the trainer: Just running this code will cause the breakpoint to be set and the handler will work
So just set it under a button or at launch time
To disable just run debug_removeBreakpoint(changeregaddress)
and the register stack will show automatically when you've hit a breakpoint and it's waiting for user intput on how to continue _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum