Question: If the following program was ran with arguments 10 and 9, what would be the return value? Please explain your answer. Z1fPiS push ebp mov

If the following program was ran with arguments 10 and 9, what would be the return value? Please explain your answer.

If the following program was ran with arguments 10 and 9, what

Z1fPiS push ebp mov ebp, esp sub esp, 16 mov DWORD PTR [ebp-4], 9000 mov eax, DWORD PTR [ebp+12] mov eax, DWORD PTR [eax] imul edx, eax, 9000 mov eax, DWORD PTR [ebp+8] mov DWORD PTR [eax), edx mov eax, DWORD PTR [ebp+8] mov eax, DWORD PTR [eax] mov edx, 9000 sub edx, eax mov eax, DWORD PTR [ebp+12] mov DWORD PTR [eax], edx leave ret main: lea ecx, (esp+4] and esp, -16 push DWORD PTR [ecx-4] push ebp mov ebp, esp push ebx push ecx sub esp, 16 mov ebx, ecx mov eax, DWORD PTR [ebx+4] add eax, 4 mov eax, DWORD PTR [eax] sub esp, 12 push eax call atoi add esp, 16 mov DWORD PTR [ebp-12], eax mov eax, DWORD PTR [ebx+4] add eax, 8 mov eax, DWORD PTR [eax] sub esp, 12 push eax call atoi add esp, 16 mov DWORD PTR [ebp-16), eax sub esp, 8 lea eax, (ebp-16] push eax lea eax, (ebp-12] push eax call_Z1fPis add esp, 16 mov edx, DWORD PTR [ebp-12] mov eax, DWORD PTR [ebp-16] add eax, edx lea esp, [ebp-8] pop ecx pop ebx pop ebp lea esp, ecx-4) ret Z1fPiS push ebp mov ebp, esp sub esp, 16 mov DWORD PTR [ebp-4], 9000 mov eax, DWORD PTR [ebp+12] mov eax, DWORD PTR [eax] imul edx, eax, 9000 mov eax, DWORD PTR [ebp+8] mov DWORD PTR [eax), edx mov eax, DWORD PTR [ebp+8] mov eax, DWORD PTR [eax] mov edx, 9000 sub edx, eax mov eax, DWORD PTR [ebp+12] mov DWORD PTR [eax], edx leave ret main: lea ecx, (esp+4] and esp, -16 push DWORD PTR [ecx-4] push ebp mov ebp, esp push ebx push ecx sub esp, 16 mov ebx, ecx mov eax, DWORD PTR [ebx+4] add eax, 4 mov eax, DWORD PTR [eax] sub esp, 12 push eax call atoi add esp, 16 mov DWORD PTR [ebp-12], eax mov eax, DWORD PTR [ebx+4] add eax, 8 mov eax, DWORD PTR [eax] sub esp, 12 push eax call atoi add esp, 16 mov DWORD PTR [ebp-16), eax sub esp, 8 lea eax, (ebp-16] push eax lea eax, (ebp-12] push eax call_Z1fPis add esp, 16 mov edx, DWORD PTR [ebp-12] mov eax, DWORD PTR [ebp-16] add eax, edx lea esp, [ebp-8] pop ecx pop ebx pop ebp lea esp, ecx-4) ret

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!