Log in

View Full Version : how do i do this in olly?


jaked
October 11th, 2005, 04:35
hi.
just say i have a bunch of code like so:

#1: mov edx,dword ptr[65525]
#2: push edx
#3: call 407714
#4: mov dword ptr[65525],eax
#5: ret

if the call at line #3 returns value 1 into eax and i want it to return value 0 into eax everytime how do i do this?

note i can do this by breakpoint at #4 and changing eax to 0 manually in olly, but this call it called like 60 times a second, so can olly automaticly change eax to 0 between lines #3 and #4 for me?

Ricardo Narvaja
October 11th, 2005, 06:06
put in tis line of the call, right click FOLLOW and enter in the call, and all a inject before the RET of INC EAX.

Ricardo

blabberer
October 11th, 2005, 08:46
yes you can automatically change eax to 0 every time if that is what you prefer
use conditional breakpoint

select line 3
dont enter any thing on condition or expression box
choose pause always radio button
in the pause these commands to plugin box

type
.set eax = 0 (dot set eax = 0)
.run (dot run)

hit ok

now when ever this break is hit the commandline plugin will trap the break set eax == 0 and issue a run command