#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void overflow(void)
{
char buf[10];
strcpy(buf,"aaaaaaaaaa");
}//end overflow
int main(void)
{
overflow();
return 0;
}//end main
yh.exe: file format pei-i386
Disassembly of section .text:
00401000 <___crt_xc_end__>:
401000: 55 push %ebp
401001: 89 e5 mov %esp,%ebp
401003: 83 ec 18 sub $0x18,%esp
401006: 89 5d f8 mov %ebx,0xfffffff8(%ebp)
401009: 8b 55 08 mov 0x8(%ebp),%edx
40100c: 31 db xor %ebx,%ebx
40100e: 89 75 fc mov %esi,0xfffffffc(%ebp)
401011: 8b 02 mov (%edx),%eax
401013: 31 f6 xor %esi,%esi
401015: 8b 00 mov (%eax),%eax
401017: 3d 91 00 00 c0 cmp $0xc0000091,%eax
40101c: 77 43 ja 401061 <___crt_xc_end__+0x61>
40101e: 3d 8d 00 00 c0 cmp $0xc000008d,%eax
401023: 72 5b jb 401080 <___crt_xc_end__+0x80>
401025: be 01 00 00 00 mov $0x1,%esi
40102a: c7 04 24 08 00 00 00 movl $0x8,(%esp)
401031: 31 c0 xor %eax,%eax
401033: 89 44 24 04 mov %eax,0x4(%esp)
401037: e8 a4 07 00 00 call 4017e0 <_signal>
40103c: 83 f8 01 cmp $0x1,%eax
40103f: 74 6c je 4010ad <___crt_xc_end__+0xad>
401041: 85 c0 test %eax,%eax
401043: 74 2a je 40106f <___crt_xc_end__+0x6f>
401045: c7 04 24 08 00 00 00 movl $0x8,(%esp)
40104c: ff d0 call *%eax
40104e: bb ff ff ff ff mov $0xffffffff,%ebx
401053: 89 d8 mov %ebx,%eax
401055: 8b 75 fc mov 0xfffffffc(%ebp),%esi
401058: 8b 5d f8 mov 0xfffffff8(%ebp),%ebx
40105b: 89 ec mov %ebp,%esp
40105d: 5d pop %ebp
40105e: c2 04 00 ret $0x4
401061: 3d 93 00 00 c0 cmp $0xc0000093,%eax
401066: 74 bd je 401025 <___crt_xc_end__+0x25>
401068: 3d 94 00 00 c0 cmp $0xc0000094,%eax
40106d: 74 bb je 40102a <___crt_xc_end__+0x2a>
40106f: 89 d8 mov %ebx,%eax
401071: 8b 75 fc mov 0xfffffffc(%ebp),%esi
401074: 8b 5d f8 mov 0xfffffff8(%ebp),%ebx
401077: 89 ec mov %ebp,%esp
401079: 5d pop %ebp
40107a: c2 04 00 ret $0x4
40107d: 8d 76 00 lea 0x0(%esi),%esi
401080: 3d 05 00 00 c0 cmp $0xc0000005,%eax
401085: 75 e8 jne 40106f <___crt_xc_end__+0x6f>
401087: c7 04 24 0b 00 00 00 movl $0xb,(%esp)
40108e: 31 f6 xor %esi,%esi
401090: 89 74 24 04 mov %esi,0x4(%esp)
401094: e8 47 07 00 00 call 4017e0 <_signal>
401099: 83 f8 01 cmp $0x1,%eax
40109c: 74 34 je 4010d2 <___crt_xc_end__+0xd2>
40109e: 85 c0 test %eax,%eax
4010a0: 74 cd je 40106f <___crt_xc_end__+0x6f>
4010a2: c7 04 24 0b 00 00 00 movl $0xb,(%esp)
4010a9: ff d0 call *%eax
4010ab: eb a1 jmp 40104e <___crt_xc_end__+0x4e>
4010ad: c7 04 24 08 00 00 00 movl $0x8,(%esp)
4010b4: bb 01 00 00 00 mov $0x1,%ebx
4010b9: 89 5c 24 04 mov %ebx,0x4(%esp)
4010bd: e8 1e 07 00 00 call 4017e0 <_signal>
4010c2: 85 f6 test %esi,%esi
4010c4: 74 88 je 40104e <___crt_xc_end__+0x4e>
4010c6: e8 55 02 00 00 call 401320 <__fpreset>
4010cb: bb ff ff ff ff mov $0xffffffff,%ebx
4010d0: eb 81 jmp 401053 <___crt_xc_end__+0x53>
4010d2: c7 04 24 0b 00 00 00 movl $0xb,(%esp)
4010d9: b9 01 00 00 00 mov $0x1,%ecx
4010de: bb ff ff ff ff mov $0xffffffff,%ebx
4010e3: 89 4c 24 04 mov %ecx,0x4(%esp)
4010e7: e8 f4 06 00 00 call 4017e0 <_signal>
4010ec: e9 62 ff ff ff jmp 401053 <___crt_xc_end__+0x53>
4010f1: eb 0d jmp 401100 <___mingw_CRTStartup>
4010f3: 90 nop
4010f4: 90 nop
4010f5: 90 nop
4010f6: 90 nop
4010f7: 90 nop
4010f8: 90 nop
4010f9: 90 nop
4010fa: 90 nop
4010fb: 90 nop
4010fc: 90 nop
4010fd: 90 nop
4010fe: 90 nop
4010ff: 90 nop
00401100 <___mingw_CRTStartup>:
401100: 55 push %ebp
401101: 89 e5 mov %esp,%ebp
401103: 53 push %ebx
401104: 83 ec 24 sub $0x24,%esp
401107: 8d 5d f8 lea 0xfffffff8(%ebp),%ebx
40110a: c7 04 24 00 10 40 00 movl $0x401000,(%esp)
401111: e8 6a 07 00 00 call 401880 <_SetUnhandledExceptionFilter@4>
401116: 83 ec 04 sub $0x4,%esp
401119: e8 02 02 00 00 call 401320 <__fpreset>
40111e: c7 45 f8 00 00 00 00 movl $0x0,0xfffffff8(%ebp)
401125: b8 00 40 40 00 mov $0x404000,%eax
40112a: 8d 55 f4 lea 0xfffffff4(%ebp),%edx
40112d: 89 5c 24 10 mov %ebx,0x10(%esp)
401131: 8b 0d 00 20 40 00 mov 0x402000,%ecx
401137: 89 44 24 04 mov %eax,0x4(%esp)
40113b: 89 54 24 08 mov %edx,0x8(%esp)
40113f: 89 4c 24 0c mov %ecx,0xc(%esp)
401143: c7 04 24 04 40 40 00 movl $0x404004,(%esp)
40114a: e8 c1 06 00 00 call 401810 <___getmainargs>
40114f: a1 10 40 40 00 mov 0x404010,%eax
401154: 85 c0 test %eax,%eax
401156: 74 58 je 4011b0 <___mingw_CRTStartup+0xb0>
401158: a3 10 20 40 00 mov %eax,0x402010
40115d: 8b 15 d4 50 40 00 mov 0x4050d4,%edx
401163: 85 d2 test %edx,%edx
401165: 0f 85 8b 00 00 00 jne 4011f6 <___mingw_CRTStartup+0xf6>
40116b: 83 fa e0 cmp $0xffffffe0,%edx
40116e: 74 20 je 401190 <___mingw_CRTStartup+0x90>
401170: a1 10 40 40 00 mov 0x404010,%eax
401175: 89 44 24 04 mov %eax,0x4(%esp)
401179: 8b 1d d4 50 40 00 mov 0x4050d4,%ebx
40117f: 8b 4b 30 mov 0x30(%ebx),%ecx
401182: 89 0c 24 mov %ecx,(%esp)
401185: e8 76 06 00 00 call 401800 <__setmode>
40118a: 8b 15 d4 50 40 00 mov 0x4050d4,%edx
401190: 83 fa c0 cmp $0xffffffc0,%edx
401193: 74 1b je 4011b0 <___mingw_CRTStartup+0xb0>
401195: 8b 1d 10 40 40 00 mov 0x404010,%ebx
40119b: 89 5c 24 04 mov %ebx,0x4(%esp)
40119f: 8b 0d d4 50 40 00 mov 0x4050d4,%ecx
4011a5: 8b 51 50 mov 0x50(%ecx),%edx
4011a8: 89 14 24 mov %edx,(%esp)
4011ab: e8 50 06 00 00 call 401800 <__setmode>
4011b0: e8 3b 06 00 00 call 4017f0 <___p__fmode>
4011b5: 8b 1d 10 20 40 00 mov 0x402010,%ebx
4011bb: 89 18 mov %ebx,(%eax)
4011bd: e8 2e 01 00 00 call 4012f0 <__pei386_runtime_relocator>
4011c2: 83 e4 f0 and $0xfffffff0,%esp
4011c5: e8 06 06 00 00 call 4017d0 <