Binary bomb - phase 2
<p>Hey I am working on defusing a binary bomb and am at phase 2 now and trying to figure out how the defuse should happen. I have added comments about what i think is actually happening in this but correct me if I am wrong and help me understand how this works. This is the phase_2: </p>

<pre><code>08048763 &lt;phase_2&gt;:
 8048763:   55                      push   %ebp
 8048764:   89 e5                   mov    %esp,%ebp
 8048766:   83 ec 28                sub    $0x28,%esp
 ; read 6 numbers
 8048769:   8d 45 dc                lea    -0x24(%ebp),%eax
 804876c:   83 c0 14                add    $0x14,%eax
 804876f:   50                      push   %eax
 8048770:   8d 45 dc                lea    -0x24(%ebp),%eax
 8048773:   83 c0 10                add    $0x10,%eax
 8048776:   50                      push   %eax
 8048777:   8d 45 dc                lea    -0x24(%ebp),%eax
 804877a:   83 c0 0c                add    $0xc,%eax
 804877d:   50                      push   %eax
 804877e:   8d 45 dc                lea    -0x24(%ebp),%eax
 8048781:   83 c0 08                add    $0x8,%eax
 8048784:   50                      push   %eax
 8048785:   8d 45 dc                lea    -0x24(%ebp),%eax
 8048788:   83 c0 04                add    $0x4,%eax
 804878b:   50                      push   %eax
 804878c:   8d 45 dc                lea    -0x24(%ebp),%eax
 804878f:   50                      push   %eax
 8048790:   68 18 94 04 08          push   $0x8049418
 8048795:   ff 75 08                pushl  0x8(%ebp)

 ; call scanf()
 8048798:   e8 53 fd ff ff          call   80484f0 &lt;sscanf@plt&gt;
 804879d:   83 c4 20                add    $0x20,%esp
 ; check if first number is greater than 5
 80487a0:   83 f8 05                cmp    $0x5,%eax
 80487a3:   7f 05                   jg     80487aa &lt;phase_2+0x47&gt;
 80487a5:   e8 ad fe ff ff          call   8048657 &lt;explode&gt;
 80487aa:   8b 45 dc                mov    -0x24(%ebp),%eax
 ; check if the 2nd number is 9 ; jump if equals
 80487ad:   83 f8 09                cmp    $0x9,%eax
 80487b0:   74 05                   je     80487b7 &lt;phase_2+0x54&gt;
 80487b2:   e8 a0 fe ff ff          call   8048657 &lt;explode&gt;
 80487b7:   c7 45 f4 01 00 00 00    movl   $0x1,-0xc(%ebp)

 ; BEGIN LOOP 
 80487be:   eb 22                   jmp    80487e2 &lt;phase_2+0x7f&gt;
 80487c0:   8b 45 f4                mov    -0xc(%ebp),%eax
 80487c3:   8b 54 85 dc             mov    -0x24(%ebp,%eax,4),%edx
 80487c7:   8b 45 f4                mov    -0xc(%ebp),%eax
 80487ca:   83 e8 01                sub    $0x1,%eax
 80487cd:   8b 44 85 dc             mov    -0x24(%ebp,%eax,4),%eax
 ; what is it that gets multiplied here?
 80487d1:   0f af 45 f4             imul   -0xc(%ebp),%eax
 ; compare eax with edx but not clear what happens here. jump when equals
 80487d5:   39 c2                   cmp    %eax,%edx
 80487d7:   74 05                   je     80487de &lt;phase_2+0x7b&gt;
 80487d9:   e8 79 fe ff ff          call   8048657 &lt;explode&gt;
 ; we add 1 before comparing with 5?
 80487de:   83 45 f4 01             addl   $0x1,-0xc(%ebp)
 ; compare jump next if number &lt;= 5
 80487e2:   83 7d f4 05             cmpl   $0x5,-0xc(%ebp)
 80487e6:   7e d8                   jle    80487c0 &lt;phase_2+0x5d&gt;
 80487e8:   83 ec 0c                sub    $0xc,%esp
 80487eb:   68 2a 94 04 08          push   $0x804942a
 80487f0:   e8 16 fe ff ff          call   804860b &lt;say&gt;
 80487f5:   83 c4 10                add    $0x10,%esp
 80487f8:   c9                      leave  
 80487f9:   c3                      ret    
</code></pre>