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

I am trying to defuse phase_2 in the bomblab project.Is there someone that can h

ID: 3637633 • Letter: I

Question

I am trying to defuse phase_2 in the bomblab project.Is there someone that can help me get started.; I know ofcourse that I am supposed to enter six numbers with space between.

0x08048d02 <+0>: push %ebp
0x08048d03 <+1>: mov %esp,%ebp
0x08048d05 <+3>: push %esi
0x08048d06 <+4>: push %ebx
0x08048d07 <+5>: sub $0x30,%esp
0x08048d0a <+8>: lea -0x20(%ebp),%eax
0x08048d0d <+11>: mov %eax,0x4(%esp)
0x08048d11 <+15>: mov 0x8(%ebp),%eax
0x08048d14 <+18>: mov %eax,(%esp)**// esp = eax (esp point to eax)
0x08048d17 <+21>: call 0x804912a ** //call function
0x08048d1c <+26>: cmpl $0x0,-0x20(%ebp) **// ????
0x08048d20 <+30>: jns 0x8048d27 ** // safe
0x08048d22 <+32>: call 0x80490e8 **// NO!!
0x08048d27 <+37>: mov $0x1,%ebx
0x08048d2c <+42>: lea -0x20(%ebp),%esi
0x08048d2f <+45>: mov %ebx,%eax
0x08048d31 <+47>: add -0x4(%esi,%ebx,4),%eax **does this subtract 4 from my input.??
0x08048d35 <+51>: cmp %eax,(%esi,%ebx,4)
0x08048d38 <+54>: je 0x8048d3f
0x08048d3a <+56>: call 0x80490e8 ** // NO!!!
0x08048d3f <+61>: add $0x1,%ebx **//ebx += 1
0x08048d42 <+64>: cmp $0x6,%ebx **// if ebx !=6
0x08048d45 <+67>: jne 0x8048d2f **// lopp
0x08048d47 <+69>: add $0x30,%esp
0x08048d4a <+72>: pop %ebx
0x08048d4b <+73>: pop %esi
0x08048d4c <+74>: pop %ebp
0x08048d4d <+75>: ret

What does thease lines do: 0x08048d1c <+26>: cmpl $0x0,-0x20(%ebp)
0x08048d35 <+51>: cmp %eax,(%esi,%ebx,4)

Explanation / Answer

I hope that these instructions are in x86 assembly.. 0x08048d1c : cmpl $0x0,-0x20(%ebp) cmpl instruction stands for compare long, which implies that two 32 bit numbers are to be compared. The instruction compares 0 and the number at memory location -x20(%ebp) and sets some flags. The next instruction jns 0x8048d27 means jump if not signed and the number is the destination memory location to jump. So the jns instructions looks for sign flag and jumps if sign flag = 0 or goes to next instruction if sign flag = 1. 0x08048d35 : cmp %eax,(%esi,%ebx,4) this is also the same instruction compare. this compares value in register %eax with %esi+%ebx+4 and sets the flags. The next instruction 0x08048d38 : je 0x8048d3f stand for jump on equal and jumps to 0x8048d3f if both are equal Please rate lifesaver. :)
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