[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!

8.9

binary bomb phase 6

Asked by braker15 in Assembly Programming Language, C Programming Language, Open Source Programming

i'm stuck on phase6, i think it is the linked list that is giving me problems


node1           db 76h, 3, 2 dup(0), 1, 3 dup(0), 0F0h, 0A5h, 4, 8

I can get to the last bomb explosion function.... but i can't get past it

when i use either of these inputs ( 2 3 1 6 4 5 or 1 3 2 6 4 5) i bypass all bomb explosions... but i keep hitting *0x08048da8  with really high values in the register

eax            0xb4     180
ecx            0x804a5f0        134522352
edx            0x804a5fc        134522364
ebx            0x804a5f0        134522352
esp            0xbffff7d0       0xbffff7d0
ebp            0xbffff818       0xbffff818
esi            0x0      0
edi            0x6      6
eip            0x8048da8        0x8048da8 <phase_6+201>
eflags         0x293    [ CF AF SF IF ]
cs             0x73     115
ss             0x7b     123
ds             0x7b     123
es             0x7b     123
fs             0x0      0
gs             0x33     51
(gdb)

(gdb) info registers
eax            0xb4     180
ecx            0x804a5f0        134522352
edx            0x804a5e4        134522340
ebx            0x804a5f0        134522352
esp            0xbffff7d0       0xbffff7d0
ebp            0xbffff818       0xbffff818
esi            0x0      0
edi            0x6      6
eip            0x8048da8        0x8048da8 <phase_6+201>
eflags         0x297    [ CF PF AF SF IF ]
cs             0x73     115
ss             0x7b     123
ds             0x7b     123
es             0x7b     123
fs             0x0      0
gs             0x33     51



could someone please give me a push in the right direction?

thank you
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
Dump of assembler code for function phase_6:
0x08048cdf <phase_6+0>: push   %ebp
0x08048ce0 <phase_6+1>: mov    %esp,%ebp
0x08048ce2 <phase_6+3>: push   %edi
0x08048ce3 <phase_6+4>: push   %esi
0x08048ce4 <phase_6+5>: push   %ebx
0x08048ce5 <phase_6+6>: sub    $0x3c,%esp
0x08048ce8 <phase_6+9>: lea    -0x24(%ebp),%eax
0x08048ceb <phase_6+12>:        mov    %eax,0x4(%esp)
0x08048cef <phase_6+16>:        mov    0x8(%ebp),%eax
0x08048cf2 <phase_6+19>:        mov    %eax,(%esp)
0x08048cf5 <phase_6+22>:        call   0x8049393 <read_six_numbers>
0x08048cfa <phase_6+27>:        mov    $0x0,%ebx
0x08048cff <phase_6+32>:        mov    -0x24(%ebp,%ebx,4),%eax
0x08048d03 <phase_6+36>:        sub    $0x1,%eax
0x08048d06 <phase_6+39>:        cmp    $0x5,%eax
0x08048d09 <phase_6+42>:        jbe    0x8048d10 <phase_6+49>
0x08048d0b <phase_6+44>:        call   0x8049351 <explode_bomb>
0x08048d10 <phase_6+49>:        lea    0x1(%ebx),%edi
0x08048d13 <phase_6+52>:        cmp    $0x6,%edi
0x08048d16 <phase_6+55>:        jne    0x8048d29 <phase_6+74>
0x08048d18 <phase_6+57>:        mov    $0x804a5fc,%ecx
0x08048d1d <phase_6+62>:        mov    $0x1,%eax
0x08048d22 <phase_6+67>:        mov    $0x0,%edx
0x08048d27 <phase_6+72>:        jmp    0x8048d52 <phase_6+115>
0x08048d29 <phase_6+74>:        lea    -0x24(%ebp,%ebx,4),%esi
0x08048d2d <phase_6+78>:        mov    %edi,%ebx
0x08048d2f <phase_6+80>:        mov    -0x28(%ebp,%edi,4),%eax
0x08048d33 <phase_6+84>:        cmp    0x4(%esi),%eax
0x08048d36 <phase_6+87>:        jne    0x8048d3d <phase_6+94>
0x08048d38 <phase_6+89>:        call   0x8049351 <explode_bomb>
0x08048d3d <phase_6+94>:        add    $0x1,%ebx
0x08048d40 <phase_6+97>:        add    $0x4,%esi
0x08048d43 <phase_6+100>:       cmp    $0x5,%ebx
0x08048d46 <phase_6+103>:       jle    0x8048d2f <phase_6+80>
0x08048d48 <phase_6+105>:       mov    %edi,%ebx
0x08048d4a <phase_6+107>:       jmp    0x8048cff <phase_6+32>
0x08048d4c <phase_6+109>:       mov    0x8(%ecx),%ecx
0x08048d4f <phase_6+112>:       add    $0x1,%eax
0x08048d52 <phase_6+115>:       cmp    -0x24(%ebp,%edx,4),%eax
0x08048d56 <phase_6+119>:       jl     0x8048d4c <phase_6+109>
0x08048d58 <phase_6+121>:       mov    %ecx,-0x3c(%ebp,%edx,4)
0x08048d5c <phase_6+125>:       add    $0x1,%edx
0x08048d5f <phase_6+128>:       cmp    $0x5,%edx
0x08048d62 <phase_6+131>:       jg     0x8048d70 <phase_6+145>
0x08048d64 <phase_6+133>:       mov    $0x804a5fc,%ecx
0x08048d69 <phase_6+138>:       mov    $0x1,%eax
---Type <return> to continue, or q <return> to quit---
0x08048d6e <phase_6+143>:       jmp    0x8048d52 <phase_6+115>
0x08048d70 <phase_6+145>:       mov    -0x3c(%ebp),%ecx
0x08048d73 <phase_6+148>:       mov    -0x38(%ebp),%eax
0x08048d76 <phase_6+151>:       mov    %eax,0x8(%ecx)
0x08048d79 <phase_6+154>:       mov    -0x34(%ebp),%edx
0x08048d7c <phase_6+157>:       mov    %edx,0x8(%eax)
0x08048d7f <phase_6+160>:       mov    -0x30(%ebp),%eax
0x08048d82 <phase_6+163>:       mov    %eax,0x8(%edx)
0x08048d85 <phase_6+166>:       mov    -0x2c(%ebp),%edx
0x08048d88 <phase_6+169>:       mov    %edx,0x8(%eax)
0x08048d8b <phase_6+172>:       mov    -0x28(%ebp),%eax
0x08048d8e <phase_6+175>:       mov    %eax,0x8(%edx)
0x08048d91 <phase_6+178>:       movl   $0x0,0x8(%eax)
0x08048d98 <phase_6+185>:       mov    %ecx,%ebx
0x08048d9a <phase_6+187>:       mov    $0x0,%esi
0x08048d9f <phase_6+192>:       mov    0x8(%ebx),%edx
0x08048da2 <phase_6+195>:       mov    (%ebx),%eax
0x08048da4 <phase_6+197>:       cmp    (%edx),%eax
0x08048da6 <phase_6+199>:       jge    0x8048dad <phase_6+206>
0x08048da8 <phase_6+201>:       call   0x8049351 <explode_bomb>
0x08048dad <phase_6+206>:       mov    0x8(%ebx),%ebx
0x08048db0 <phase_6+209>:       add    $0x1,%esi
0x08048db3 <phase_6+212>:       cmp    $0x5,%esi
0x08048db6 <phase_6+215>:       jne    0x8048d9f <phase_6+192>
0x08048db8 <phase_6+217>:       add    $0x3c,%esp
0x08048dbb <phase_6+220>:       pop    %ebx
0x08048dbc <phase_6+221>:       pop    %esi
0x08048dbd <phase_6+222>:       pop    %edi
0x08048dbe <phase_6+223>:       pop    %ebp
0x08048dbf <phase_6+224>:       ret
End of assembler dump.
 
(gdb) disas 0x804a5fc
Dump of assembler code for function node1:
0x0804a5fc <node1+0>:   jbe    0x804a601 <node1+5>
0x0804a5fe <node1+2>:   add    %al,(%eax)
0x0804a600 <node1+4>:   add    %eax,(%eax)
0x0804a602 <node1+6>:   add    %al,(%eax)
0x0804a604 <node1+8>:   lock movsl %ds:(%esi),%es:(%edi)
0x0804a606 <node1+10>:  add    $0x8,%al
End of assembler dump.
 
Loading Advertisement...
 
[+][-]05/17/09 12:50 PM, ID: 24407366Accepted 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

Zones: Assembly Programming Language, C Programming Language, Open Source Programming
Sign Up Now!
Solution Provided By: demi-os
Participating Experts: 2
Solution Grade: A
 
[+][-]05/18/09 02:31 AM, ID: 24410201Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625