•With FPO (dynamic addressing of local variables)
•
•FunctionParameters!main:
•sub esp,0x8 ; allocating room for local variables
•push 0x408110 ; address of "Enter a and b: "
•call FunctionParameters!printf (00401085)
•lea eax,[esp+0x4] ; address of b
([ESP + 0 + 4])
•push eax
•lea ecx,[esp+0xc] ; address of a
([ESP + 4 + 8])
•push ecx
•push 0x408108 ; address of "%d %d"
•call FunctionParameters!scanf (0040106e)
•mov eax,[esp+0x14] ; value of a ([ESP + 4 + 10])
•lea edx,[esp+0x10] ; address of b
([ESP + 0 + 10])
•push edx
•push eax
•call FunctionParameters!arithmetic
(00401000)
•add esp,0x18 ; adjusting stack after all pushes
•test al,al ; al == 0 ?
•jz FunctionParameters!main+0x48
(00401068)
•mov ecx,[esp] ; address of b
([ESP + 0])
•push ecx
•push 0x4080fc ; address of "Result = %d"
•call FunctionParameters!printf (00401085)
•add esp,0x8 ; adjust stack pointer (2 parameters)
•00401068:
•xor eax,eax ; return value 0
•add esp,0x8 ; adjust stack pointer (local variables)
•ret