[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

6.2

binary bomb assignment, figuring out assembly

Asked by kenbond in Assembly Programming Language

Tags: bomb, binary, phase_2, read_six_numbers

OK im sure of u guys might of encountered this little exercise before. Anyways, I'm having trouble figuring out one of the phases.

Anyways here's the code:

 /* The second phase is harder.  No one will ever figure out
     * how to defuse this... */
    input = read_line();
    phase_2(input);
    phase_defused();

And here's the assembly of phase_2():
0x08048bbd <phase_2+4>: sub    $0x2c,%esp
0x08048bc0 <phase_2+7>: lea    0xffffffd8(%ebp),%eax
0x08048bc3 <phase_2+10>:        push   %eax
0x08048bc4 <phase_2+11>:        pushl  0x8(%ebp)
0x08048bc7 <phase_2+14>:        call   0x8048f1d <read_six_numbers>
0x08048bcc <phase_2+19>:        add    $0x10,%esp
0x08048bcf <phase_2+22>:        cmpl   $0x1,0xffffffd8(%ebp)
0x08048bd3 <phase_2+26>:        je     0x8048bda <phase_2+33>
0x08048bd5 <phase_2+28>:        call   0x8049449 <explode_bomb>
0x08048bda <phase_2+33>:        mov    $0x1,%ebx
0x08048bdf <phase_2+38>:        lea    0x1(%ebx),%eax
0x08048be2 <phase_2+41>:        imul   0xffffffd4(%ebp,%ebx,4),%eax
0x08048be7 <phase_2+46>:        cmp    %eax,0xffffffd8(%ebp,%ebx,4)
0x08048beb <phase_2+50>:        je     0x8048bf2 <phase_2+57>
0x08048bed <phase_2+52>:        call   0x8049449 <explode_bomb>
0x08048bf2 <phase_2+57>:        inc    %ebx
0x08048bf3 <phase_2+58>:        cmp    $0x5,%ebx
0x08048bf6 <phase_2+61>:        jle    0x8048bdf <phase_2+38>
0x08048bf8 <phase_2+63>:        mov    0xfffffffc(%ebp),%ebx
0x08048bfb <phase_2+66>:        leave  
0x08048bfc <phase_2+67>:        ret    
End of assembler dump.

And here's the assembly of read_six_numbers:
0x08048f1d <read_six_numbers+0>:        push   %ebp
0x08048f1e <read_six_numbers+1>:        mov    %esp,%ebp
0x08048f20 <read_six_numbers+3>:        sub    $0x8,%esp
0x08048f23 <read_six_numbers+6>:        mov    0xc(%ebp),%edx
0x08048f26 <read_six_numbers+9>:        lea    0x14(%edx),%eax
0x08048f29 <read_six_numbers+12>:       push   %eax
0x08048f2a <read_six_numbers+13>:       lea    0x10(%edx),%eax
0x08048f2d <read_six_numbers+16>:       push   %eax
0x08048f2e <read_six_numbers+17>:       lea    0xc(%edx),%eax
0x08048f31 <read_six_numbers+20>:       push   %eax
0x08048f32 <read_six_numbers+21>:       lea    0x8(%edx),%eax
0x08048f35 <read_six_numbers+24>:       push   %eax
0x08048f36 <read_six_numbers+25>:       lea    0x4(%edx),%eax
0x08048f39 <read_six_numbers+28>:       push   %eax
0x08048f3a <read_six_numbers+29>:       push   %edx
0x08048f3b <read_six_numbers+30>:       push   $0x80498bd
0x08048f40 <read_six_numbers+35>:       pushl  0x8(%ebp)
0x08048f43 <read_six_numbers+38>:       call   0x80488f4 <_init+376>
0x08048f48 <read_six_numbers+43>:       add    $0x20,%esp
0x08048f4b <read_six_numbers+46>:       cmp    $0x5,%eax
0x08048f4e <read_six_numbers+49>:       jg     0x8048f55 <read_six_numbers+56>
0x08048f50 <read_six_numbers+51>:       call   0x8049449 <explode_bomb>
0x08048f55 <read_six_numbers+56>:       leave  
0x08048f56 <read_six_numbers+57>:       ret  

It's quite obvious that the answers are going to be 6 separate numbers. Any hints on what to do?



 
Related Solutions
 
Loading Advertisement...
 
[+][-]01/29/05 06:39 PM, ID: 13174226Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Assembly Programming Language
Tags: bomb, binary, phase_2, read_six_numbers
Sign Up Now!
Solution Provided By: aib_42
Participating Experts: 3
Solution Grade: C
 
[+][-]01/29/05 07:17 AM, ID: 13171785Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01/29/05 12:26 PM, ID: 13173016Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/29/05 06:06 PM, ID: 13174154Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]01/29/05 11:29 PM, ID: 13174870Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/09/05 05:25 AM, ID: 15047564Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/09/05 05:52 AM, ID: 15047639Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92