08048518 <main>:
8048518: 8d 4c 24 04 lea 0x4(%esp),%ecx
804851c: 83 e4 f0 and $0xfffffff0,%esp
804851f: ff 71 fc pushl -0x4(%ecx)
8048522: 55 push %ebp
8048523: 89 e5 mov %esp,%ebp
8048525: 51 push %ecx
8048526: 81 ec 24 80 00 00 sub $0x8024,%esp
804852c: 89 8d e4 7f ff ff mov %ecx,-0x801c(%ebp)
8048532: 8d 95 f3 7f ff ff lea -0x800d(%ebp),%edx
8048538: b8 ff 7f 00 00 mov $0x7fff,%eax
804853d: 89 44 24 08 mov %eax,0x8(%esp)
8048541: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
8048548: 00
8048549: 89 14 24 mov %edx,(%esp)
804854c: e8 6f fe ff ff call 80483c0 <
memset@plt>
8048551: 8b 85 e4 7f ff ff mov -0x801c(%ebp),%eax
8048557: 83 38 04 cmpl $0x4,(%eax) argc 와 4를 cmp
804855a: 74 27 je 8048583 <main+0x6b>
804855c: 8b 95 e4 7f ff ff mov -0x801c(%ebp),%edx
8048562: 8b 42 04 mov 0x4(%edx),%eax
8048565: 8b 00 mov (%eax),%eax
8048567: 89 44 24 04 mov %eax,0x4(%esp)
804856b: c7 04 24 20 87 04 08 movl $0x8048720,(%esp)
8048572: e8 89 fe ff ff call 8048400 <
printf@plt>
argc가 4가 아니면 usuage... 를 찍고 종료
8048577: c7 04 24 00 00 00 00 movl $0x0,(%esp)
804857e: e8 ad fe ff ff call 8048430 <
exit@plt>
8048583: 8b 8d e4 7f ff ff mov -0x801c(%ebp),%ecx
8048589: 8b 41 04 mov 0x4(%ecx),%eax
804858c: 83 c0 08 add $0x8,%eax
804858f: 8b 00 mov (%eax),%eax
8048591: 89 04 24 mov %eax,(%esp)
8048594: e8 77 fe ff ff call 8048410 <atoi@plt> argv[2]를 atoi
8048599: 66 89 45 f2 mov %ax,-0xe(%ebp) 리턴값을 ebp -0xe로
804859d: 8b 95 e4 7f ff ff mov -0x801c(%ebp),%edx
80485a3: 8b 42 04 mov 0x4(%edx),%eax
80485a6: 83 c0 0c add $0xc,%eax
80485a9: 8b 00 mov (%eax),%eax
80485ab: 89 04 24 mov %eax,(%esp)
80485ae: e8 5d fe ff ff call 8048410 <atoi@plt> argv[3]을 atoi
80485b3: 89 45 f4 mov %eax,-0xc(%ebp) 리턴값을 ebp-0xc로
80485b6: 8b 8d e4 7f ff ff mov -0x801c(%ebp),%ecx
80485bc: 8b 41 04 mov 0x4(%ecx),%eax
80485bf: 83 c0 04 add $0x4,%eax
80485c2: 8b 00 mov (%eax),%eax
80485c4: 89 04 24 mov %eax,(%esp)
80485c7: e8 24 fe ff ff call 80483f0 <strlen@plt> strlen(argv[1]) 호출
80485cc: 89 45 f8 mov %eax,-0x8(%ebp) 리턴값을 ebp-0x8로
80485cf: 81 7d f8 ff 7f 00 00 cmpl $0x7fff,-0x8(%ebp) 0x7fff(32767)와 ebp-0x8을 비교
80485d6: 7e 18 jle 80485f0 <main+0xd8>
80485d8: c7 04 24 3f 87 04 08 movl $0x804873f,(%esp)
80485df: e8 3c fe ff ff call 8048420 <
puts@plt> 07fff 보다 크면 string is too long 을 찍고 종료
80485e4: c7 04 24 00 00 00 00 movl $0x0,(%esp)
80485eb: e8 40 fe ff ff call 8048430 <
exit@plt>
80485f0: 8b 55 f8 mov -0x8(%ebp),%edx
80485f3: 8b 8d e4 7f ff ff mov -0x801c(%ebp),%ecx
80485f9: 8b 41 04 mov 0x4(%ecx),%eax
80485fc: 83 c0 04 add $0x4,%eax
80485ff: 8b 00 mov (%eax),%eax
8048601: 89 54 24 08 mov %edx,0x8(%esp)
strlen(argv[1]) 의 리턴값을 esp+8로 (size)
8048605: 89 44 24 04 mov %eax,0x4(%esp)
argv[1]을 esp+4로 (src)
8048609: 8d 85 f3 7f ff ff lea -0x800d(%ebp),%eax
804860f: 89 04 24 mov %eax,(%esp)
ebp-0x800d 를 esp로 (dest)
8048612: e8 c9 fd ff ff call 80483e0 <
memcpy@plt>
call memcpy
8048617: 0f b7 45 f2 movzwl -0xe(%ebp),%eax
804861b: 0f bf d0 movswl %ax,%edx
804861e: 8b 45 f4 mov -0xc(%ebp),%eax
8048621: 89 44 24 08 mov %eax,0x8(%esp) atoi(argv[3])의 리턴값을 esp+8에
8048625: 89 54 24 04 mov %edx,0x4(%esp) atoi(argv[2])의 리턴값을 esp+4에
8048629: 8d 85 f3 7f ff ff lea -0x800d(%ebp),%eax ebp-0x800d 를 esp로
804862f: 89 04 24 mov %eax,(%esp)
8048632: e8 bd fe ff ff call 80484f4 <cpy>
8048637: 8d 85 f3 7f ff ff lea -0x800d(%ebp),%eax
804863d: 89 04 24 mov %eax,(%esp)
8048640: e8 db fd ff ff call 8048420 <
puts@plt>
8048645: 81 c4 24 80 00 00 add $0x8024,%esp
804864b: 59 pop %ecx
804864c: 5d pop %ebp
804864d: 8d 61 fc lea -0x4(%ecx),%esp
8048650: c3 ret