Question: This is binary Bomb lab phase 4 , please give me solution to defuse the bomb ( gdb ) disas phase _ 4 Dump of

This is binary Bomb lab phase 4, please give me solution to defuse the bomb
(gdb) disas phase_4
Dump of assembler code for function phase_4:
0x0000000000401014<+0>: sub $0x18,%rsp
0x0000000000401018<+4>: lea 0x8(%rsp),%rcx
0x000000000040101d <+9>: lea 0xc(%rsp),%rdx
0x0000000000401022<+14>: mov $0x402705,%esi
0x0000000000401027<+19>: mov $0x0,%eax
0x000000000040102c <+24>: callq 0x400c30<__isoc99_sscanf@plt>
0x0000000000401031<+29>: cmp $0x2,%eax
0x0000000000401034<+32>: jne 0x40103d
0x0000000000401036<+34>: cmpl $0xe,0xc(%rsp)
0x000000000040103b <+39>: jbe 0x401042
0x000000000040103d <+41>: callq 0x401512
0x0000000000401042<+46>: mov $0xe,%edx
0x0000000000401047<+51>: mov $0x0,%esi
0x000000000040104c <+56>: mov 0xc(%rsp),%edi
0x0000000000401050<+60>: callq 0x400fe2
0x0000000000401055<+65>: cmp $0x7,%eax
0x0000000000401058<+68>: jne 0x401061
0x000000000040105a <+70>: cmpl $0x7,0x8(%rsp)
0x000000000040105f <+75>: je 0x401066
0x0000000000401061<+77>: callq 0x401512
0x0000000000401066<+82>: add $0x18,%rsp
0x000000000040106a <+86>: retq
End of assembler dump.
(gdb) disas func4
Dump of assembler code for function func4:
0x0000000000400fe2<+0>: push %rbx
0x0000000000400fe3<+1>: mov %edx,%eax
0x0000000000400fe5<+3>: sub %esi,%eax
0x0000000000400fe7<+5>: mov %eax,%ebx
0x0000000000400fe9<+7>: shr $0x1f,%ebx
0x0000000000400fec <+10>: add %eax,%ebx
0x0000000000400fee <+12>: sar %ebx
0x0000000000400ff0<+14>: add %esi,%ebx
0x0000000000400ff2<+16>: cmp %edi,%ebx
0x0000000000400ff4<+18>: jg 0x400ffc
0x0000000000400ff6<+20>: jl 0x401008
0x0000000000400ff8<+22>: mov %ebx,%eax
0x0000000000400ffa <+24>: pop %rbx
0x0000000000400ffb <+25>: retq
0x0000000000400ffc <+26>: lea -0x1(%rbx),%edx
0x0000000000400fff <+29>: callq 0x400fe2
0x0000000000401004<+34>: add %eax,%ebx
0x0000000000401006<+36>: jmp 0x400ff8
0x0000000000401008<+38>: lea 0x1(%rbx),%esi
0x000000000040100b <+41>: callq 0x400fe2
0x0000000000401010<+46>: add %eax,%ebx
0x0000000000401012<+48>: jmp 0x400ff8
End of assembler dump.

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!