- 18


{

return a+b+strlen(c);

}

 

main()

{

printf("%x\n",MyFunc(0x666,0x777,"Hello,World!"));

}

62 cdecl

:

 

main proc near ; CODE XREF: start+AFp

push ebp

mov ebp, esp

 

push offset aHelloWorld ; const char *

push 777h ; int

push 666h ; int

;

 

call MyFunc

add esp, 0Ch

; : . , cdecl,

; , .

 

push eax

push offset asc_406040 ; "%x\n"

call _printf

add esp, 8

pop ebp

retn

main endp

 

; int __cdecl MyFunc(int,int,const char *)

; IDA . , ,

; , .

 

MyFunc proc near ; CODE XREF: main+12p

 

arg_0 = dword ptr 8

arg_4 = dword ptr 0Ch

arg_8 = dword ptr 10h

; , , cdecl,

; : MyFunc(int arg_0, int arg_4, char *arg_8)

 

push ebp

mov ebp, esp

push esi

; ESI

 

mov esi, [ebp+arg_0]

; ESI arg_0 int

 

add esi, [ebp+arg_4]

; arg_4

 

mov eax, [ebp+arg_8]

; EAX

 

push eax ; const char *

; strlen

 

call _strlen

add esp, 4

 

add eax, esi

; arg_0 arg_4 arg_8

 

pop esi

pop ebp

retn

MyFunc endp

63

, , PASCAL:

 

#include <stdio.h>




- -  - -  - -