Question: Reading Code (20 pts) 004010C0: push ebp 004010C1: mov ebp, esp 004010C3: sub esp, 44h 004010C6: push esi 004010C7: push edi 004010C8: mov ecx, 06h
Reading Code (20 pts) 004010C0: push ebp 004010C1: mov ebp, esp 004010C3: sub esp, 44h 004010C6: push esi 004010C7: push edi 004010C8: mov ecx, 06h 004010CD: mov esi, offset aMsg ; "Money can't buy happiness" 004010D2: lea edi, [ebp-34] 004010D5: rep movsd 004010D7: movsw
26. (2 pts) Briefly explain what the first 2 instructions are doing.
27. (2 pts) Why are we then subtracting 0x44 from esp?
28. (2 pts) Why do we need to push esi/edi?
29. (4 pts) The length of the string is 25 bytes, why do we load ecx (the counter) with a 6?
30. (4 pts) What does the rep prefix do for the instruction at address 0x4010D5? There are several parts to this answer.
31. (2 pts) What is the purpose of the movsw instruction?
32. (4 pts) What is the big picture function of the code shown here?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
