LOOPS

FOR LOOP

EXAMPLE 1:

EXAMPLE 2:

In the figure, the upward pointing arrow after the increment code indicates a loop. These arrows make loops easier to recognize in the graph view than in the standard disassembly view. The graph displays five boxes: The top four are the components of the for loop (initialization, comparison, execution, and increment, in that order). The box on the bottom right is the function epilogue which is the portion of a function responsible for cleaning up the stack & returning

disassembly graph of a for loop

WHILE LOOP

EXAMPLE 1:

EXAMPLE 2:

while loops is frequently used by malware authors to loop until a condition is met, such as receiving a packet or command. the while loop look similar to the for loop in assembly, but are easier to understand

Last updated