23.03.2013 Views

Quick introduction to reverse engineering for beginners

Quick introduction to reverse engineering for beginners

Quick introduction to reverse engineering for beginners

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

mov ebx, DWORD PTR _c$[ebp]<br />

push esi<br />

mov esi, DWORD PTR _b$[ebp]<br />

sub edx, esi<br />

push edi<br />

sub esi, ebx<br />

mov DWORD PTR tv315[ebp], 100 ; 00000064H<br />

$LL9@m:<br />

mov eax, ebx<br />

mov DWORD PTR tv291[ebp], 300 ; 0000012cH<br />

$LL6@m:<br />

fldz<br />

lea ecx, DWORD PTR [esi+eax]<br />

fstp QWORD PTR [eax]<br />

mov edi, 200 ; 000000c8H<br />

$LL3@m:<br />

dec edi<br />

fld QWORD PTR [ecx+edx]<br />

fmul QWORD PTR [ecx]<br />

fadd QWORD PTR [eax]<br />

fstp QWORD PTR [eax]<br />

jne HORT $LL3@m<br />

add eax, 8<br />

dec DWORD PTR tv291[ebp]<br />

jne SHORT $LL6@m<br />

add ebx, 800 ; 00000320H<br />

dec DWORD PTR tv315[ebp]<br />

jne SHORT $LL9@m<br />

pop edi<br />

pop esi<br />

pop ebx<br />

leave<br />

ret 0<br />

?m@@YAXPAN00@Z ENDP ; m<br />

4.1.10 Task 1.10<br />

If <strong>to</strong> compile this piece of code and run, some number will be printed. Where it came from? Where it came<br />

from if <strong>to</strong> compile it in MSVC with optimization (/Ox)?<br />

#include <br />

int main()<br />

{<br />

printf ("%d\n");<br />

};<br />

return 0;<br />

136

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!