A Crash Course in x86 Assembly for Reverse Engineers

(Jeff_L) #1

1.7.2 Two-way Conditionals


1.7.2.1 C


if (var == 7)
function();
else
anotherFunction();
...


1.7.2.2 x86 assembly


cmp [var], 7
jz ElseBlock
call function
jmp AfterConditionalBlock
ElseBlock:
call anotherFunction
AfterConditionalBlock:
...

Free download pdf