pellik Advanced Cheater
Reputation: 0
Joined: 14 Jun 2013 Posts: 93
|
Posted: Thu Jul 04, 2013 11:04 pm Post subject: find next access script |
|
|
This little script has been saving me some time when exploring games. I didn't see anything like it during my 5 second search, so my apologies if there is already a way to do this easily.
| Code: | if not OriginAddress then OriginAddress = 0 end
if not WatchMem then WatchMem = 0 end
DeleteOrgBreak = 1
Skip = 0
OriginAddress = 0
function debugger_onBreakpoint()
if OriginAddress == 0 then
OriginAddress = EIP
WatchMem = (EBP - 0x38) -- Memory Address To Watch (can be static)
debug_setBreakpoint(WatchMem,1,bptAccess)
if DeleteOrgBreak == 1 then
debug_removeBreakpoint(OriginAddress)
end
debug_continueFromBreakpoint(0)
elseif Skip > 0 then
Skip = Skip - 1
debug_continueFromBreakpoint(0)
else
debug_removeBreakpoint(WatchMem)
--debug_continueFromBreakpoint(0) --uncomment to auto-resume
end
end |
So to use it you find where your value is being written to memory and change the line | Code: | | WatchMem = (EBP - 0x38) | to reflect whatever you're interested in (so ESP if your value is getting pushed onto the stack, etc.). Then you just execute and set a breakpoint somewhere after your value has been written (or else it will break on write one line after your instruction...).
If DeleteOrgBreak is 1 then the script will unset your initial breakpoint (just to save time if you were going to delete it anyway).
Skip will iterate past an access Skip number of times.
One last note, the access breakpoint breaks on the line after the access, so you will need to scroll up one line.
|
|