Question: Binary Bomb phase 4 Assembly code Dump of assembler code for function phase_4: > 0x0000000000400fe7 : sub $0x18,%rsp 0x0000000000400feb : lea 0x8(%rsp),%rcx 0x0000000000400ff0 : lea

Binary Bomb phase 4 Assembly code

Dump of assembler code for function phase_4: > 0x0000000000400fe7 <+0>: sub $0x18,%rsp 0x0000000000400feb <+4>: lea 0x8(%rsp),%rcx 0x0000000000400ff0 <+9>: lea 0xc(%rsp),%rdx 0x0000000000400ff5 <+14>: mov $0x40290d,%esi 0x0000000000400ffa <+19>: mov $0x0,%eax 0x0000000000400fff <+24>: callq 0x400c00 <__isoc99_sscanf@plt> 0x0000000000401004 <+29>: cmp $0x2,%eax 0x0000000000401007 <+32>: jne 0x401010 0x0000000000401009 <+34>: cmpl $0xe,0xc(%rsp) 0x000000000040100e <+39>: jbe 0x401015 0x0000000000401010 <+41>: callq 0x401662 0x0000000000401015 <+46>: mov $0xe,%edx 0x000000000040101a <+51>: mov $0x0,%esi 0x000000000040101f <+56>: mov 0xc(%rsp),%edi 0x0000000000401023 <+60>: callq 0x400fb4 0x0000000000401028 <+65>: cmp $0x12,%eax 0x000000000040102b <+68>: jne 0x401034 0x000000000040102d <+70>: cmpl $0x12,0x8(%rsp) 0x0000000000401032 <+75>: je 0x401039 0x0000000000401034 <+77>: callq 0x401662 0x0000000000401039 <+82>: add $0x18,%rsp 0x000000000040103d <+86>: retq End of assembler dump. (gdb) disassemble /m func4

Dump of assembler code for function func4: 0x0000000000400fb4 <+0>: push %rbx 0x0000000000400fb5 <+1>: mov %edx,%eax 0x0000000000400fb7 <+3>: sub %esi,%eax 0x0000000000400fb9 <+5>: mov %eax,%ebx 0x0000000000400fbb <+7>: shr $0x1f,%ebx 0x0000000000400fbe <+10>: add %ebx,%eax 0x0000000000400fc0 <+12>: sar %eax 0x0000000000400fc2 <+14>: lea (%rax,%rsi,1),%ebx 0x0000000000400fc5 <+17>: cmp %edi,%ebx 0x0000000000400fc7 <+19>: jle 0x400fd5 0x0000000000400fc9 <+21>: lea -0x1(%rbx),%edx 0x0000000000400fcc <+24>: callq 0x400fb4 0x0000000000400fd1 <+29>: add %ebx,%eax 0x0000000000400fd3 <+31>: jmp 0x400fe5 0x0000000000400fd5 <+33>: mov %ebx,%eax 0x0000000000400fd7 <+35>: cmp %edi,%ebx 0x0000000000400fd9 <+37>: jge 0x400fe5 0x0000000000400fdb <+39>: lea 0x1(%rbx),%esi 0x0000000000400fde <+42>: callq 0x400fb4 0x0000000000400fe3 <+47>: add %ebx,%eax 0x0000000000400fe5 <+49>: pop %rbx 0x0000000000400fe6 <+50>: retq End of assembler dump.

So what is the answer for bomb 4. Is it 0 7 ?

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!