Question: I need help analyzing what these assembly instructions are doing in phase 5 of a bomb lab. Dump of assembler code for function phase_5: =>

I need help analyzing what these assembly instructions are doing in phase 5 of a bomb lab.

Dump of assembler code for function phase_5: => 0x00005555555553c1 <+0>: sub $0x18,%rsp 0x00005555555553c5 <+4>: lea 0x8(%rsp),%rcx 0x00005555555553ca <+9>: lea 0xc(%rsp),%rdx 0x00005555555553cf <+14>: lea 0x170d(%rip),%rsi # 0x555555556ae3 0x00005555555553d6 <+21>: mov $0x0,%eax 0x00005555555553db <+26>: callq 0x555555554e60 <__isoc99_sscanf@plt> 0x00005555555553e0 <+31>: cmp $0x1,%eax 0x00005555555553e3 <+34>: jle 0x555555555432 0x00005555555553e5 <+36>: mov 0xc(%rsp),%eax 0x00005555555553e9 <+40>: and $0xf,%eax 0x00005555555553ec <+43>: mov %eax,0xc(%rsp) 0x00005555555553f0 <+47>: cmp $0xf,%eax 0x00005555555553f3 <+50>: je 0x555555555428 0x00005555555553f5 <+52>: mov $0x0,%ecx 0x00005555555553fa <+57>: mov $0x0,%edx 0x00005555555553ff <+62>: lea 0x14da(%rip),%rsi # 0x5555555568e0 0x0000555555555406 <+69>: add $0x1,%edx 0x0000555555555409 <+72>: cltq 0x000055555555540b <+74>: mov (%rsi,%rax,4),%eax 0x000055555555540e <+77>: add %eax,%ecx 0x0000555555555410 <+79>: cmp $0xf,%eax 0x0000555555555413 <+82>: jne 0x555555555406 0x0000555555555415 <+84>: movl $0xf,0xc(%rsp) 0x000055555555541d <+92>: cmp $0xf,%edx 0x0000555555555420 <+95>: jne 0x555555555428 0x0000555555555422 <+97>: cmp %ecx,0x8(%rsp) 0x0000555555555426 <+101>: je 0x55555555542d 0x0000555555555428 <+103>: callq 0x555555555897 0x000055555555542d <+108>: add $0x18,%rsp 0x0000555555555431 <+112>: retq 0x0000555555555432 <+113>: callq 0x555555555897 0x0000555555555437 <+118>: jmp 0x5555555553e5

Dump of assembler code for function __isoc99_sscanf@plt: => 0x0000555555554e60 <+0>: jmpq *0x203122(%rip) # 0x555555757f88 0x0000555555554e66 <+6>: pushq $0xe 0x0000555555554e6b <+11>: jmpq 0x555555554d70

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!