Thread: binary bomb

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Sep 2006
    Posts
    18

    binary bomb

    i'm working on the binary bomb assignment, i've defused phase_1 bomb , but not phase_2.

    Please help me on doing so

    this following is the disassmbled code using objdump

    Code:
    08048b80 <phase_2>:
     8048b80:       55                      push   %ebp
     8048b81:       89 e5                   mov    %esp,%ebp
     8048b83:       56                      push   %esi
     8048b84:       53                      push   %ebx
     8048b85:       83 ec 30                sub    $0x30,%esp
     8048b88:       be 00 00 00 00          mov    $0x0,%esi
     8048b8d:       8d 45 d8                lea    0xffffffd8(%ebp),%eax
     8048b90:       89 44 24 04             mov    %eax,0x4(%esp)
     8048b94:       8b 45 08                mov    0x8(%ebp),%eax
     8048b97:       89 04 24                mov    %eax,(%esp)
     8048b9a:       e8 d5 03 00 00          call   8048f74 <read_six_numbers>
     8048b9f:       bb 00 00 00 00          mov    $0x0,%ebx
     8048ba4:       8b 44 9d d8             mov    0xffffffd8(%ebp,%ebx,4),%eax
     8048ba8:       3b 44 9d e4             cmp    0xffffffe4(%ebp,%ebx,4),%eax
     8048bac:       74 05                   je     8048bb3 <phase_2+0x33>
     8048bae:       e8 f2 07 00 00          call   80493a5 <explode_bomb>
     8048bb3:       03 74 9d d8             add    0xffffffd8(%ebp,%ebx,4),%esi
     8048bb7:       43                      inc    %ebx
     8048bb8:       83 fb 02                cmp    $0x2,%ebx
     8048bbb:       7e e7                   jle    8048ba4 <phase_2+0x24>
     8048bbd:       85 f6                   test   %esi,%esi
     8048bbf:       75 05                   jne    8048bc6 <phase_2+0x46>
     8048bc1:       e8 df 07 00 00          call   80493a5 <explode_bomb>
     8048bc6:       83 c4 30                add    $0x30,%esp
     8048bc9:       5b                      pop    %ebx
     8048bca:       5e                      pop    %esi
     8048bcb:       5d                      pop    %ebp
     8048bcc:       c3                      ret
    and the following using gdb

    Code:
    08048b80 <phase_2>:
     8048b80:       55                      push   %ebp
     8048b81:       89 e5                   mov    %esp,%ebp
     8048b83:       56                      push   %esi
     8048b84:       53                      push   %ebx
     8048b85:       83 ec 30                sub    $0x30,%esp
     8048b88:       be 00 00 00 00          mov    $0x0,%esi
     8048b8d:       8d 45 d8                lea    0xffffffd8(%ebp),%eax
     8048b90:       89 44 24 04             mov    %eax,0x4(%esp)
     8048b94:       8b 45 08                mov    0x8(%ebp),%eax
     8048b97:       89 04 24                mov    %eax,(%esp)
     8048b9a:       e8 d5 03 00 00          call   8048f74 <read_six_numbers>
     8048b9f:       bb 00 00 00 00          mov    $0x0,%ebx
     8048ba4:       8b 44 9d d8             mov    0xffffffd8(%ebp,%ebx,4),%eax
     8048ba8:       3b 44 9d e4             cmp    0xffffffe4(%ebp,%ebx,4),%eax
     8048bac:       74 05                   je     8048bb3 <phase_2+0x33>
     8048bae:       e8 f2 07 00 00          call   80493a5 <explode_bomb>
     8048bb3:       03 74 9d d8             add    0xffffffd8(%ebp,%ebx,4),%esi
     8048bb7:       43                      inc    %ebx
     8048bb8:       83 fb 02                cmp    $0x2,%ebx
     8048bbb:       7e e7                   jle    8048ba4 <phase_2+0x24>
     8048bbd:       85 f6                   test   %esi,%esi
     8048bbf:       75 05                   jne    8048bc6 <phase_2+0x46>
     8048bc1:       e8 df 07 00 00          call   80493a5 <explode_bomb>
     8048bc6:       83 c4 30                add    $0x30,%esp
     8048bc9:       5b                      pop    %ebx
     8048bca:       5e                      pop    %esi
     8048bcb:       5d                      pop    %ebp
     8048bcc:       c3                      ret
    Last edited by Dave_Sinkula; 09-24-2006 at 02:53 PM. Reason: Added [code][/code] tags -- learn to use them yourself.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. binary bomb help
    By uscuba2 in forum Tech Board
    Replies: 8
    Last Post: 05-22-2009, 10:04 PM
  2. The destructive power of a nuclear bomb
    By InvariantLoop in forum A Brief History of Cprogramming.com
    Replies: 30
    Last Post: 03-24-2005, 02:46 AM
  3. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  4. Tutorial review
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 03-22-2004, 09:40 PM
  5. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM