Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This question and the previous one use the same code. 0x401050 : push %ebp 0x401051 : mov %esp,%ebp 0x401053 : sub $0xc,%esp 0x401056 : mov

This question and the previous one use the same code.

0x401050 : push %ebp 0x401051 : mov %esp,%ebp 0x401053 : sub $0xc,%esp 0x401056 : mov 0x8(%ebp),%eax 0x401059 : add $0x4,%eax 0x40105c : mov %eax,0xfffffffc(%ebp) 0x40105f : mov 0x8(%ebp),%eax 0x401062 : imul 0xc(%ebp),%eax 0x401066 : mov %eax,0xfffffff8(%ebp) 0x401069 : mov 0xc(%ebp),%edx 0x40106c : mov 0x8(%ebp),%eax 0x40106f : sub %edx,%eax 0x401071 : mov %eax,0xfffffff4(%ebp) 0x401074 : mov 0xfffffff8(%ebp),%eax 0x401077 : add 0xfffffffc(%ebp),%eax 0x40107a : add 0xfffffff4(%ebp),%eax 0x40107d : leave 0x40107e : ret 0x401089 
: push %ebp 0x40108a : mov %esp,%ebp 0x40108c : sub $0x18,%esp 0x40108f : and $0xfffffff0,%esp 0x401092 : mov $0x0,%eax 0x401097 : mov %eax,0xfffffff0(%ebp) 0x40109a : mov 0xfffffff0(%ebp),%eax 0x40109d : call 0x401420 <_alloca> 0x4010a2 : call 0x4014b0 <__main> 0x4010a7 : mov 0xc(%ebp),%eax 0x4010aa : add $0x4,%eax 0x4010ad : mov (%eax),%eax 0x4010af : mov %eax,(%esp) 0x4010b2 : call 0x4014d0 0x4010b7 : mov %eax,0xfffffffc(%ebp) 0x4010ba : mov 0xc(%ebp),%eax 0x4010bd : add $0x8,%eax 0x4010c0 : mov (%eax),%eax 0x4010c2 : mov %eax,(%esp) 0x4010c5 : call 0x4014d0 0x4010ca : mov %eax,0xfffffff8(%ebp) 0x4010cd : mov 0xfffffff8(%ebp),%eax 0x4010d0 : inc %eax 0x4010d1 : mov %eax,0x4(%esp) 0x4010d5 : mov 0xfffffffc(%ebp),%eax 0x4010d8 : add $0x2,%eax 0x4010db : mov %eax,(%esp) 0x4010de : call 0x401050 0x4010e3 : mov %eax,0xfffffff4(%ebp) 0x4010e6 : mov 0xfffffff4(%ebp),%eax 0x4010e9 : mov %eax,0x4(%esp) 0x4010ed : movl $0x40107f,(%esp) 0x4010f4 : call 0x4014c0 0x4010f9 : mov $0x0,%eax 0x4010fe : leave 0x4010ff : ret

This program is invoked from the command line as shown:

./program 5 7 

The procedure named what is called from main, and returns to main with the value:

1)

11

2)

24

3)

42

4)

66

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

Description of the effects of business networking on Emirates

Answered: 1 week ago