Assembly Language for Beginners

(nextflipdebug2) #1

1.16. LOOPS


x86: OllyDbg


Let’s compile our example in MSVC 2010 with/Oxand/Ob0options and load it into OllyDbg.


It seems that OllyDbg is able to detect simple loops and show them in square brackets, for convenience:


Figure 1.54:OllyDbg:main()begin

By tracing (F8 — step over) we seeESIincrementing. Here, for instance,ESI=i= 6:


Figure 1.55:OllyDbg: loop body just executed withi= 6

9 is the last loop value. That’s whyJLis not triggering after theincrement, and the function will finish:

Free download pdf