•FunctionParameters!arithmetic:
•push ebp ; establishing stack frame
•mov ebp,esp ;
•sub esp,0xc0 ; creating stack frame for locals
•push ebx ; saving registers that might
be used
•push esi ; outside
•push edi ;
•lea edi,[ebp-0xc0] ; getting lowest address of stack frame
•mov ecx,0x30 ; filling stack frame with 0xCC
•mov eax,0xcccccccc ;
•rep stosd ;
•mov eax,[ebp+0xc] ; eax := [b]
•add eax,[ebp+0x8] ; eax += [a]
•mov [ebp+0xc],eax ; [b] := eax
(b = b + a)
•mov eax,[ebp+0x8] ; eax := [a]
•add eax,0x1 ; eax := eax + 1
•mov [ebp+0x8],eax ; [a] := eax
(++a)
•mov eax,[ebp+0x8] ; eax := [a]
•imul eax,[ebp+0xc] ; eax := eax * [b]
•mov [ebp+0xc],eax ; [b] := eax
(b = a * b)
•mov
eax,[ebp+0xc] ; eax
:= [b] (return value, b)
•pop edi ; restoring registers
•pop esi ; (in reverse order)
•pop ebx ;
•mov esp,ebp ; restoring previous stack pointer
•pop ebp ; restoring previous stack frame
•Ret ; return 0
•