Question: Help with assembly questions Part 1 start: PUSH EBP MOV EBP, ESP MOV EDI, [EBPtarg_0] XOR EAX, EAX MOV ECX, 0xFFFFFFFF REPNE SCASB NEG ECX

Help with assembly questions

Help with assembly questions Part 1 start: PUSH EBP MOV EBP, ESP

Part 1 start: PUSH EBP MOV EBP, ESP MOV EDI, [EBPtarg_0] XOR EAX, EAX MOV ECX, 0xFFFFFFFF REPNE SCASB NEG ECX MOV EAX, ECX MOV ESI, [EBP+arg MOV EDI, [EBPtarg_4] REP MOVSB MOV ESP, EBP POP EBP RETN _0] 1.1) In a few sentences, explain what this function does 1.2) Write a function in C that is equivalent to the assembly above int func1(char* arg_0, char* arg 4) // Your code goes here 1.3) Let arg_0 be a pointer to the null-terminated string "C:\Windows System32\" and let arg 4 be a pointer to an empty buffer. What is the value of the buffer pointed to by arg_4 when the function completes? What value does the function return? Part 1 start: PUSH EBP MOV EBP, ESP MOV EDI, [EBPtarg_0] XOR EAX, EAX MOV ECX, 0xFFFFFFFF REPNE SCASB NEG ECX MOV EAX, ECX MOV ESI, [EBP+arg MOV EDI, [EBPtarg_4] REP MOVSB MOV ESP, EBP POP EBP RETN _0] 1.1) In a few sentences, explain what this function does 1.2) Write a function in C that is equivalent to the assembly above int func1(char* arg_0, char* arg 4) // Your code goes here 1.3) Let arg_0 be a pointer to the null-terminated string "C:\Windows System32\" and let arg 4 be a pointer to an empty buffer. What is the value of the buffer pointed to by arg_4 when the function completes? What value does the function return

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!