Question: Here is all the assembly code you'll need. I am trying to debug a binary bomb and phase 4 ' s solution should be two
Here is all the assembly code you'll need. I am trying to debug a binary bomb and phase s solution should be two integers:
gdb disassemble phase
Dump of assembler code for function phase:
x: sub $xrsp
x: leaxrsprcx
xa : leaxcrsprdx
xf : mov $xeesi
x: mov $xeax
x: callqxcisocsscanf@plt
xe : cmp $xeax
x: jnexa
x: cmpl $xexcrsp
x: jbexf
xa : callqxcd
xf : mov $xeedx
x: mov $xesi
x: movxcrspedi
xd : callqxd
x: cmp $xdeax
x: jnexe
x: cmpl $xdxrsp
xc : je x
xe : callqxcd
x: add $xrsp
x: retq
End of assembler dump.
gdb disassemble func
Dump of assembler code for function func:
xd : push rbx
xe : movedx,eax
x: subesi,eax
x: moveax,ebx
x: shr $xfebx
x: addeax,ebx
x: sarebx
xb : addesi,ebx
xd : cmpedi,ebx
xf : jg x
x: jl x
x: movedi,eax
x: poprbx
x: retq
x: leaxrbxedx
xa : callqxd
xf : learax,rbxedi
x: jmpx
x: leax
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
