Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help matching assembly code to its matching function in a program. Below is the assembly code for a program and we have to

I need help matching assembly code to its matching function in a program. Below is the assembly code for a program and we have to line up the code with certain functions and I'm completely lost. we just have to match the assembly code below to these 4 functions:

main function

ChangeCustomerChoice function

CheckUserPermissionAccess function

DisplayInfo function

0x0000000000000000 <+0>: push %rbp 0x0000000000000001 <+1>: mov %rsp,%rbp 0x0000000000000004 <+4>: lea 0x0(%rip),%rsi # 0xb 0x000000000000000b <+11>: lea 0x0(%rip),%rdi # 0x12 0x0000000000000012 <+18>: callq 0x17 0x0000000000000017 <+23>: callq 0x1c 0x000000000000001c <+28>: mov %eax,0x0(%rip) # 0x22 0x0000000000000022 <+34>: mov 0x0(%rip),%eax # 0x28 0x0000000000000028 <+40>: cmp $0x1,%eax 0x000000000000002b <+43>: je 0x40 0x000000000000002d <+45>: lea 0x0(%rip),%rsi # 0x34 0x0000000000000034 <+52>: lea 0x0(%rip),%rdi # 0x3b 0x000000000000003b <+59>: callq 0x40 0x0000000000000040 <+64>: mov 0x0(%rip),%eax # 0x46 0x0000000000000046 <+70>: cmp $0x1,%eax 0x0000000000000049 <+73>: je 0x4d 0x000000000000004b <+75>: jmp 0x17 0x000000000000004d <+77>: lea 0x0(%rip),%rsi # 0x54 0x0000000000000054 <+84>: lea 0x0(%rip),%rdi # 0x5b 0x000000000000005b <+91>: callq 0x60 0x0000000000000060 <+96>: lea 0x0(%rip),%rsi # 0x67 0x0000000000000067 <+103>: lea 0x0(%rip),%rdi # 0x6e 0x000000000000006e <+110>: callq 0x73 0x0000000000000073 <+115>: lea 0x0(%rip),%rsi # 0x7a 0x000000000000007a <+122>: lea 0x0(%rip),%rdi # 0x81 0x0000000000000081 <+129>: callq 0x86 0x0000000000000086 <+134>: lea 0x0(%rip),%rsi # 0x8d 0x000000000000008d <+141>: lea 0x0(%rip),%rdi # 0x94 0x0000000000000094 <+148>: callq 0x99 0x0000000000000099 <+153>: lea 0x0(%rip),%rsi # 0xa0 0x00000000000000a0 <+160>: lea 0x0(%rip),%rdi # 0xa7 0x00000000000000a7 <+167>: callq 0xac 0x00000000000000ac <+172>: lea 0x0(%rip),%rsi # 0xb3 0x00000000000000b3 <+179>: lea 0x0(%rip),%rdi # 0xba 0x00000000000000ba <+186>: callq 0xbf 0x00000000000000bf <+191>: mov %rax,%rdx 0x00000000000000c2 <+194>: mov 0x0(%rip),%eax # 0xc8 0x00000000000000c8 <+200>: mov %eax,%esi 0x00000000000000ca <+202>: mov %rdx,%rdi 0x00000000000000cd <+205>: callq 0xd2 0x00000000000000d2 <+210>: mov %rax,%rdx 0x00000000000000d5 <+213>: mov 0x0(%rip),%rax # 0xdc 0x00000000000000dc <+220>: mov %rax,%rsi 0x00000000000000df <+223>: mov %rdx,%rdi 0x00000000000000e2 <+226>: callq 0xe7 0x00000000000000e7 <+231>: mov 0x0(%rip),%eax # 0xed 0x00000000000000ed <+237>: cmp $0x1,%eax 0x00000000000000f0 <+240>: jne 0xf9 0x00000000000000f2 <+242>: callq 0xf7 0x00000000000000f7 <+247>: jmp 0x109 0x00000000000000f9 <+249>: mov 0x0(%rip),%eax # 0xff 0x00000000000000ff <+255>: cmp $0x2,%eax 0x0000000000000102 <+258>: jne 0x109 0x0000000000000104 <+260>: callq 0x109 0x0000000000000109 <+265>: mov 0x0(%rip),%eax # 0x10f 0x000000000000010f <+271>: cmp $0x3,%eax 0x0000000000000112 <+274>: je 0x119 0x0000000000000114 <+276>: jmpq 0x4d 0x0000000000000119 <+281>: mov $0x0,%eax 0x000000000000011e <+286>: pop %rbp 0x000000000000011f <+287>: retq

*** IF I NEED TO ADD ANYTHING ELSE PLEASE REACH OUT AND LET ME KNOW WHAT YOU WOULD NEED ***

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Microsoft SQL Server 2012 Programming

Authors: Paul Atkinson, Robert Vieira

1st Edition

1118102282, 9781118102282

Students also viewed these Databases questions