Doing code puzzles online and i'm very lost on this. Could someone help convert this check into something resembling normal c code, just to help me understand what it's asking for a little better? Ideally maybe offer some kind of formula I could use to figure out what numbers are needed to solve this puzzle?push   %rbppush   %rbxsub    $0x18,%rspmov    %fs:0x28,%raxmov    %rax,0x8(%rsp)xor    %eax,%eaxcall   401cd0 <next_line>mov    %rax,%rdilea    0x4(%rsp),%rdxlea    0x95ed1(%rip),%rsi        # 498103 <__rseq_flags+0xfb>mov    $0x0,%eaxcall   401da1 <sscanf_pb>test   %eax,%eaxjle    40226c <phase03+0x64>mov    $0x0,%eaxcall   4019ea <pb_rand>mov    %eax,%ebxmov    $0xcccccccd,%edximul   %rdx,%rbxshr    $0x23,%rbxlea    (%rbx,%rbx,4),%edxadd    %edx,%edxsub    %edx,%eaxmov    %eax,%ebxadd    $0x1,%ebxmov    $0x0,%ebpjmp    4022a1 <phase03+0x99>lea    0x95e4a(%rip),%rdicall   40204a <failure>jmp    402240 <phase03+0x38>add    $0x1,%ebxjmp    40229e <phase03+0x96>add    $0x5,%ebxjmp    40229e <phase03+0x96>add    %ebx,%ebxjmp    40229e <phase03+0x96>sub    $0x7,%ebxjmp    40229e <phase03+0x96>add    $0x2,%ebxlea    0x0(,%rbx,8),%eaxsub    %ebx,%eaxmov    %eax,%ebxsub    $0x3,%ebxadd    $0x1,%ebpcmp    $0x4,%ebpjg     4022e3 <phase03+0xdb>mov    $0x0,%eaxcall   4019ea <pb_rand>mov    %eax,%edxmov    $0x88888889,%ecximul   %rcx,%rdxshr    $0x23,%rdxmov    %edx,%ecxshl    $0x4,%ecxsub    %edx,%ecxsub    %ecx,%eaxcmp    $0xe,%eaxja     4022df <phase03+0xd7>mov    %eax,%edxlea    0x9d262(%rip),%rcx        # 49f538 <__PRETTY_FUNCTION__.0+0x40>movslq (%rcx,%rdx,4),%raxadd    %rcx,%raxjmp    *%raxneg    %ebxjmp    40229e <phase03+0x96>cmp    %ebx,0x4(%rsp)jne    402300 <phase03+0xf8>mov    0x8(%rsp),%raxsub    %fs:0x28,%rax jne    40230e <phase03+0x106>add    $0x18,%rsppop    %rbxpop    %rbpret    lea    0x98371(%rip),%rdicall   40204a <failure>jmp    4022e9 <phase03+0xe1>call   430f10 <__stack_chk_fail>

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section: Chapter Questions
Problem 14PP
icon
Related questions
Topic Video
Question

Doing code puzzles online and i'm very lost on this. Could someone help convert this check into something resembling normal c code, just to help me understand what it's asking for a little better? Ideally maybe offer some kind of formula I could use to figure out what numbers are needed to solve this puzzle?


push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %fs:0x28,%rax
mov    %rax,0x8(%rsp)
xor    %eax,%eax
call   401cd0 <next_line>
mov    %rax,%rdi
lea    0x4(%rsp),%rdx
lea    0x95ed1(%rip),%rsi        # 498103 <__rseq_flags+0xfb>
mov    $0x0,%eax
call   401da1 <sscanf_pb>
test   %eax,%eax
jle    40226c <phase03+0x64>
mov    $0x0,%eax
call   4019ea <pb_rand>
mov    %eax,%ebx
mov    $0xcccccccd,%edx
imul   %rdx,%rbx
shr    $0x23,%rbx
lea    (%rbx,%rbx,4),%edx
add    %edx,%edx
sub    %edx,%eax
mov    %eax,%ebx
add    $0x1,%ebx
mov    $0x0,%ebp
jmp    4022a1 <phase03+0x99>
lea    0x95e4a(%rip),%rdi
call   40204a <failure>
jmp    402240 <phase03+0x38>
add    $0x1,%ebx
jmp    40229e <phase03+0x96>
add    $0x5,%ebx
jmp    40229e <phase03+0x96>
add    %ebx,%ebx
jmp    40229e <phase03+0x96>
sub    $0x7,%ebx
jmp    40229e <phase03+0x96>
add    $0x2,%ebx
lea    0x0(,%rbx,8),%eax
sub    %ebx,%eax
mov    %eax,%ebx
sub    $0x3,%ebx
add    $0x1,%ebp
cmp    $0x4,%ebp
jg     4022e3 <phase03+0xdb>
mov    $0x0,%eax
call   4019ea <pb_rand>
mov    %eax,%edx
mov    $0x88888889,%ecx
imul   %rcx,%rdx
shr    $0x23,%rdx
mov    %edx,%ecx
shl    $0x4,%ecx
sub    %edx,%ecx
sub    %ecx,%eax
cmp    $0xe,%eax
ja     4022df <phase03+0xd7>
mov    %eax,%edx
lea    0x9d262(%rip),%rcx        # 49f538 <__PRETTY_FUNCTION__.0+0x40>
movslq (%rcx,%rdx,4),%rax
add    %rcx,%rax
jmp    *%rax
neg    %ebx
jmp    40229e <phase03+0x96>
cmp    %ebx,0x4(%rsp)
jne    402300 <phase03+0xf8>
mov    0x8(%rsp),%rax
sub    %fs:0x28,%rax

jne    40230e <phase03+0x106>
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret    
lea    0x98371(%rip),%rdi
call   40204a <failure>
jmp    4022e9 <phase03+0xe1>
call   430f10 <__stack_chk_fail>

Expert Solution
steps

Step by step

Solved in 1 steps

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr