Question

Please help with this problem, been stuck for a couple of days. What should the 6...

Please help with this problem, been stuck for a couple of days. What should the 6 digits be in order to difuse this Phase_2?

Dump of assembler code for function phase_2:
0x0000000000400afd <+0>: push %rbp               
0x0000000000400afe <+1>: mov %rsp,%rbp           
0x0000000000400b01 <+4>: sub $0x30,%rsp          
0x0000000000400b05 <+8>: mov %rdi,-0x28(%rbp)
0x0000000000400b09 <+12>: lea -0x20(%rbp),%rdx
0x0000000000400b0d <+16>: mov -0x28(%rbp),%rax
0x0000000000400b11 <+20>: mov %rdx,%rsi
0x0000000000400b14 <+23>: mov %rax,%rdi
0x0000000000400b17 <+26>: callq 0x40104e <read_six_numbers>
0x0000000000400b1c <+31>: mov -0x20(%rbp),%eax
0x0000000000400b1f <+34>: test %eax,%eax
0x0000000000400b21 <+36>: jns 0x400b28 <phase_2+43>
0x0000000000400b23 <+38>: callq 0x4013ac <explode_bomb>
0x0000000000400b28 <+43>: movl $0x1,-0x4(%rbp)
0x0000000000400b2f <+50>: jmp 0x400b58 <phase_2+91>
0x0000000000400b31 <+52>: mov -0x4(%rbp),%eax
0x0000000000400b34 <+55>: cltq
0x0000000000400b36 <+57>: mov -0x20(%rbp,%rax,4),%edx
0x0000000000400b3a <+61>: mov -0x4(%rbp),%eax
0x0000000000400b3d <+64>: sub $0x1,%eax
0x0000000000400b40 <+67>: cltq
0x0000000000400b42 <+69>: mov -0x20(%rbp,%rax,4),%ecx


this assembly language is in C. i do not need to code it but deduce which values it reads (1-6). figure out the pattern.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

This one was rather tricky after an easy step one. First, we found that it was looking for 6 numbers, from the scanf function looking 6 times. We eventually figured out that it the code consisted of a repeat of 3 decreasing numbers. 10 9 8 10 9 8, for example. That did the trick for us.

Solution: 10 9 8 10 9 8

Add a comment
Know the answer?
Add Answer to:
Please help with this problem, been stuck for a couple of days. What should the 6...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT