XFlorian
January 17th, 2005, 07:49
i have compilied a easy printf under linux
gcc print.c -o print
void main ()
{
printf("A test"
;
}
Than I decompiet it with IDA PRO .
.text:08048384 public main
.text:08048384 main proc near ; DATA XREF: _start+17o
.text:08048384
.text:08048384 var_8 = dword ptr -8
.text:08048384
.text:08048384 push ebp ;
.text:08048385 mov ebp, esp ; ESP =EBP
.text:08048387 sub esp, 8 ;
.text:0804838A and esp, 0FFFFFFF0h // What is done here?
.text:0804838D mov eax, 0 //Why is EAX =0
.text:08048392 sub esp, eax // Why ist ESP - EAX
.text:08048394 mov [esp+8+var_8], offset aEinTestMitEinf ; "A test".
text:0804839B call _printf
.text:080483A0 leave
.text:080483A1 retn
.text:080483A1 main endp
My questions are above
__do_global_dtors_aux proc near
frame_dummy
I didn't post the whole IDA, when you wish that I will.
Is there a tutorial or a book to this topic?
THX
gcc print.c -o print
void main ()
{
printf("A test"

}
Than I decompiet it with IDA PRO .
.text:08048384 public main
.text:08048384 main proc near ; DATA XREF: _start+17o
.text:08048384
.text:08048384 var_8 = dword ptr -8
.text:08048384
.text:08048384 push ebp ;
.text:08048385 mov ebp, esp ; ESP =EBP
.text:08048387 sub esp, 8 ;
.text:0804838A and esp, 0FFFFFFF0h // What is done here?
.text:0804838D mov eax, 0 //Why is EAX =0
.text:08048392 sub esp, eax // Why ist ESP - EAX
.text:08048394 mov [esp+8+var_8], offset aEinTestMitEinf ; "A test".
text:0804839B call _printf
.text:080483A0 leave
.text:080483A1 retn
.text:080483A1 main endp
My questions are above
__do_global_dtors_aux proc near
frame_dummy
I didn't post the whole IDA, when you wish that I will.
Is there a tutorial or a book to this topic?
THX