Answered step by step
Verified Expert Solution
Question
1 Approved Answer
change the return value to 'cookie' address from the current value ' 1 . Dump of assembler code for function getbuf: 0 x 5
change the return value to 'cookie' address from the current value
Dump of assembler code for function getbuf:
xf: push ebp
xf: mov esp,ebp
xf: push ebx
xf: sub $xesp
xf: call xee xgetpcthunk.ax
xfe : add $xeeax
x: sub $xcesp
x: lea xebpedx
x: push edx
xa : mov eax,ebx
xc : call xfec
x: add $xesp
x: mov $xeax
x: mov xebpebx
xc : leave
xd : ret
End of assembler dump. and Dump of assembler code for function test:
xdf: push ebp
xdfa : mov esp,ebp
xdfc : push ebx
xdfd : sub $xesp
xe: call xbfxgetpcthunk.bx
xe: add $xebx
xeb : call xf
xe: mov eax,xebp
xe: call xf
xe: mov eax,xcebp
xeb : call xf
xe: mov eax,edx
xe: mov xebpeax
xe: cmp eax,edx
xe: je xed
xe: sub $xcesp
xec : lea xcebxeax
xe: push eax
xe: call xa
xe: add $xesp
xeb : jmp xe
xed : mov xcebpedx
xe: mov xebxeax
xe: cmp eax,edx
xe: jne xee
xea : sub $xesp
xed : pushl xcebp
xe: lea xebxeax
xe: push eax
xe: call x
xec : add $xesp
xef : sub $xcesp
xe: push $x
xe: call xe
xe: add $xesp
xec : jmp xe
xee : sub $xesp
xe: pushl xcebp
xe: lea xebxeax
xea : push eax
xeb : call x
xe: add $xesp
xe: nop
xe: mov x ebpebx
xe: leave
Step 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