Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

What string do I need to input in order to avoid <explode_bomb>? Dump of assembl

ID: 3594964 • Letter: W

Question

What string do I need to input in order to avoid <explode_bomb>?

Dump of assembler code for function phase_5:
=> 0x0000000000401105 <+0>:   push   %rbx
   0x0000000000401106 <+1>:   mov    %rdi,%rbx
   0x0000000000401109 <+4>:   callq 0x40135a <string_length>
   0x000000000040110e <+9>:   cmp    $0x6,%eax
   0x0000000000401111 <+12>:   je     0x401118 <phase_5+19>
   0x0000000000401113 <+14>:   callq 0x40164c <explode_bomb>
   0x0000000000401118 <+19>:   mov    %rbx,%rax
   0x000000000040111b <+22>:   lea    0x6(%rbx),%rdi
   0x000000000040111f <+26>:   mov    $0x0,%ecx
   0x0000000000401124 <+31>:   movzbl (%rax),%edx
   0x0000000000401127 <+34>:   and    $0xf,%edx
   0x000000000040112a <+37>:   add    0x4026c0(,%rdx,4),%ecx
   0x0000000000401131 <+44>:   add    $0x1,%rax
   0x0000000000401135 <+48>:   cmp    %rdi,%rax
   0x0000000000401138 <+51>:   jne    0x401124 <phase_5+31>
   0x000000000040113a <+53>:   cmp    $0x2d,%ecx
   0x000000000040113d <+56>:   je     0x401144 <phase_5+63>
   0x000000000040113f <+58>:   callq 0x40164c <explode_bomb>
   0x0000000000401144 <+63>:   pop    %rbx
   0x0000000000401145 <+64>:   retq
End of assembler dump.

Explanation / Answer

void phase_2(struct s0* rdi, struct s0* rsi, struct s0* rdx, struct s0* rcx, struct s0** r8, void* r9) {
struct s0* rsp7;
struct s0* rsi8;
int32_t* rsp9;
int32_t v10;
struct s0** v11;
struct s0** v12;
int64_t v13;
int32_t* rbx14;
int32_t* rbp15;
int32_t v16;
int32_t v17;
struct s0** v18;
struct s0** v19;
int64_t v20;

rsp7 = reinterpret_cast<struct s0*>(reinterpret_cast<int64_t>(__zero_stack_offset()) - 8 - 8 - 40);
rsi8 = rsp7;
read_six_numbers(rdi, rsi8);
rsp9 = reinterpret_cast<int32_t*>(reinterpret_cast<unsigned char>(rsp7) - 8 + 8);
if (v10 != 1) {
explode_bomb(rdi, rsi8, rdx, rcx, r8, r9, v11, v12, v13);
rsp9 = rsp9 - 2 + 2;
}
rbx14 = rsp9 + 1;
rbp15 = rsp9 + 6;
do {
if (v16 != v17 + v17) {
explode_bomb(rdi, rsi8, rdx, rcx, r8, r9, v18, v19, v20);
}
++rbx14;
} while (rbx14 != rbp15);
return;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote