Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 returnStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started