首页
社区
课程
招聘
[求助]为什么一句简单的Hello World的C程序反汇编后有这么多的代码呢
发表于: 2007-9-14 07:47 5666

[求助]为什么一句简单的Hello World的C程序反汇编后有这么多的代码呢

2007-9-14 07:47
5666
// TEST.cpp : Defines the entry point for the console application.
//

//#include "stdafx.h"

void box(int a, int b)
{
        int c=a+b;
}
int main(int argc, char* argv[])
{
        box(1,2);
        return 0;
}
VC编译链接后,反汇编如下:
(节选部分)

004010F0 >/$  55            push    ebp
004010F1  |.  8BEC          mov     ebp, esp
004010F3  |.  6A FF         push    -1
004010F5  |.  68 10214200   push    00422110
004010FA  |.  68 002F4000   push    _except_handler3                 ;  SE 处理程序安装
004010FF  |.  64:A1 0000000>mov     eax, dword ptr fs:[0]
00401105  |.  50            push    eax
00401106  |.  64:8925 00000>mov     dword ptr fs:[0], esp
0040110D  |.  83C4 F0       add     esp, -10
00401110  |.  53            push    ebx
00401111  |.  56            push    esi
00401112  |.  57            push    edi
00401113  |.  8965 E8       mov     dword ptr [ebp-18], esp
00401116  |.  FF15 4CA14200 call    dword ptr [<&KERNEL32.GetVersion>;  kernel32.GetVersion
0040111C  |.  A3 6C7C4200   mov     dword ptr [_osver], eax
00401121  |.  A1 6C7C4200   mov     eax, dword ptr [_osver]
00401126  |.  C1E8 08       shr     eax, 8
00401129  |.  25 FF000000   and     eax, 0FF
0040112E  |.  A3 787C4200   mov     dword ptr [_winminor], eax
00401133  |.  8B0D 6C7C4200 mov     ecx, dword ptr [_osver]
00401139  |.  81E1 FF000000 and     ecx, 0FF
0040113F  |.  890D 747C4200 mov     dword ptr [_winmajor], ecx
00401145  |.  8B15 747C4200 mov     edx, dword ptr [_winmajor]
0040114B  |.  C1E2 08       shl     edx, 8
0040114E  |.  0315 787C4200 add     edx, dword ptr [_winminor]
00401154  |.  8915 707C4200 mov     dword ptr [_winver], edx
0040115A  |.  A1 6C7C4200   mov     eax, dword ptr [_osver]
0040115F  |.  C1E8 10       shr     eax, 10
00401162  |.  25 FFFF0000   and     eax, 0FFFF
00401167  |.  A3 6C7C4200   mov     dword ptr [_osver], eax
0040116C  |.  6A 00         push    0                                ; /Arg1 = 00000000
0040116E  |.  E8 1D1B0000   call    _heap_init                       ; \_heap_init
00401173  |.  83C4 04       add     esp, 4
00401176  |.  85C0          test    eax, eax
00401178  |.  75 0A         jnz     short 00401184
0040117A  |.  6A 1C         push    1C
0040117C  |.  E8 CF000000   call    fast_error_exit
00401181  |.  83C4 04       add     esp, 4
00401184  |>  C745 FC 00000>mov     dword ptr [ebp-4], 0
0040118B  |.  E8 00150000   call    _ioinit
00401190  |.  FF15 48A14200 call    dword ptr [<&KERNEL32.GetCommand>; [GetCommandLineA
00401196  |.  A3 EC954200   mov     dword ptr [_acmdln], eax
0040119B  |.  E8 D0120000   call    __crtGetEnvironmentStringsA
004011A0  |.  A3 507C4200   mov     dword ptr [_aenvptr], eax
004011A5  |.  E8 B60D0000   call    _setargv
004011AA  |.  E8 610C0000   call    _setenvp
004011AF  |.  E8 7C080000   call    _cinit
004011B4  |.  8B0D 887C4200 mov     ecx, dword ptr [_environ]
004011BA  |.  890D 8C7C4200 mov     dword ptr [__initenv], ecx
004011C0  |.  8B15 887C4200 mov     edx, dword ptr [_environ]
004011C6  |.  52            push    edx
004011C7  |.  A1 807C4200   mov     eax, dword ptr [__argv]
004011CC  |.  50            push    eax
004011CD  |.  8B0D 7C7C4200 mov     ecx, dword ptr [__argc]
004011D3  |.  51            push    ecx
004011D4  |.  E8 31FEFFFF   call    0040100A
004011D9  |.  83C4 0C       add     esp, 0C
004011DC  |.  8945 E4       mov     dword ptr [ebp-1C], eax
004011DF  |.  8B55 E4       mov     edx, dword ptr [ebp-1C]
004011E2  |.  52            push    edx                              ; /status
004011E3  |.  E8 88080000   call    exit                             ; \exit
004011E8  |.  8B45 EC       mov     eax, dword ptr [ebp-14]
004011EB  |.  8B08          mov     ecx, dword ptr [eax]
004011ED  |.  8B11          mov     edx, dword ptr [ecx]
004011EF  |.  8955 E0       mov     dword ptr [ebp-20], edx
004011F2  |.  8B45 EC       mov     eax, dword ptr [ebp-14]
004011F5  |.  50            push    eax                              ; /Arg2
004011F6  |.  8B4D E0       mov     ecx, dword ptr [ebp-20]          ; |
004011F9  |.  51            push    ecx                              ; |Arg1
004011FA  |.  E8 010A0000   call    _XcptFilter                      ; \_XcptFilter
004011FF  |.  83C4 08       add     esp, 8
00401202  \.  C3            retn
00401203   .  8B65 E8       mov     esp, dword ptr [ebp-18]
00401206   .  8B55 E0       mov     edx, dword ptr [ebp-20]
00401209   .  52            push    edx                              ; /status
0040120A   .  E8 81080000   call    _exit                            ; \_exit
0040120F   .  8B4D F0       mov     ecx, dword ptr [ebp-10]
00401212   .  64:890D 00000>mov     dword ptr fs:[0], ecx
00401219   .  5F            pop     edi
0040121A   .  5E            pop     esi
0040121B   .  5B            pop     ebx
0040121C   .  8BE5          mov     esp, ebp
0040121E   .  5D            pop     ebp
0040121F   .  C3            retn
00401220 >/$  55            push    ebp
00401221  |.  8BEC          mov     ebp, esp
00401223  |.  833D 587C4200>cmp     dword ptr [__error_mode], 2
0040122A  |.  74 05         je      short 00401231
0040122C  |.  E8 AF1D0000   call    _FF_MSGBANNER
00401231  |>  8B45 08       mov     eax, dword ptr [ebp+8]
00401234  |.  50            push    eax                              ; /Arg1
00401235  |.  E8 F61D0000   call    _NMSG_WRITE                      ; \_NMSG_WRITE
0040123A  |.  83C4 04       add     esp, 4
0040123D  |.  68 FF000000   push    0FF                              ; /status = FF (255.)
00401242  |.  FF15 304A4200 call    dword ptr [_aexit_rtn]           ; \_exit
00401248  |.  83C4 04       add     esp, 4
0040124B  |.  5D            pop     ebp
0040124C  \.  C3            retn
0040124D      CC            int3
0040124E      CC            int3
0040124F      CC            int3
00401250 >/$  55            push    ebp
00401251  |.  8BEC          mov     ebp, esp
00401253  |.  833D 587C4200>cmp     dword ptr [__error_mode], 2
0040125A  |.  74 05         je      short 00401261
0040125C  |.  E8 7F1D0000   call    _FF_MSGBANNER
00401261  |>  8B45 08       mov     eax, dword ptr [ebp+8]
00401264  |.  50            push    eax                              ; /Arg1
00401265  |.  E8 C61D0000   call    _NMSG_WRITE                      ; \_NMSG_WRITE
0040126A  |.  83C4 04       add     esp, 4
0040126D  |.  68 FF000000   push    0FF                              ; /ExitCode = FF
00401272  \.  FF15 50A14200 call    dword ptr [<&KERNEL32.ExitProces>; \ExitProcess
00401278   .  5D            pop     ebp
00401279   .  C3            retn
0040127A      CC            int3
0040127B      CC            int3
0040127C      CC            int3
0040127D      CC            int3
0040127E      CC            int3
0040127F      CC            int3
00401280 >/$  55            push    ebp
00401281  |.  8BEC          mov     ebp, esp
00401283  |.  FF15 54A14200 call    dword ptr [<&KERNEL32.DebugBreak>; [DebugBreak
00401289  |.  5D            pop     ebp
0040128A  \.  C3            retn
0040128B      CC            int3
0040128C      CC            int3
0040128D      CC            int3
0040128E      CC            int3
0040128F      CC            int3
00401290 >/.  55            push    ebp
00401291  |.  8BEC          mov     ebp, esp
00401293  |.  51            push    ecx
00401294  |.  837D 08 00    cmp     dword ptr [ebp+8], 0
00401298  |.  7C 06         jl      short 004012A0
0040129A  |.  837D 08 03    cmp     dword ptr [ebp+8], 3
0040129E  |.  7C 05         jl      short 004012A5
004012A0  |>  83C8 FF       or      eax, FFFFFFFF
004012A3  |.  EB 3E         jmp     short 004012E3
004012A5  |>  837D 0C FF    cmp     dword ptr [ebp+C], -1
004012A9  |.  75 0C         jnz     short 004012B7
004012AB  |.  8B45 08       mov     eax, dword ptr [ebp+8]
004012AE  |.  8B0485 3C4A42>mov     eax, dword ptr [eax*4+_CrtDbgMod>
004012B5  |.  EB 2C         jmp     short 004012E3
004012B7  |>  8B4D 0C       mov     ecx, dword ptr [ebp+C]
004012BA  |.  83E1 F8       and     ecx, FFFFFFF8
004012BD  |.  85C9          test    ecx, ecx
004012BF  |.  74 05         je      short 004012C6
004012C1  |.  83C8 FF       or      eax, FFFFFFFF
004012C4  |.  EB 1D         jmp     short 004012E3
004012C6  |>  8B55 08       mov     edx, dword ptr [ebp+8]
004012C9  |.  8B0495 3C4A42>mov     eax, dword ptr [edx*4+_CrtDbgMod>
004012D0  |.  8945 FC       mov     dword ptr [ebp-4], eax
004012D3  |.  8B4D 08       mov     ecx, dword ptr [ebp+8]
004012D6  |.  8B55 0C       mov     edx, dword ptr [ebp+C]
004012D9  |.  89148D 3C4A42>mov     dword ptr [ecx*4+_CrtDbgMode], e>
004012E0  |.  8B45 FC       mov     eax, dword ptr [ebp-4]
004012E3  |>  8BE5          mov     esp, ebp
004012E5  |.  5D            pop     ebp
004012E6  \.  C3            retn
004012E7      CC            int3
004012E8      CC            int3
004012E9      CC            int3
004012EA      CC            int3
004012EB      CC            int3
004012EC      CC            int3
004012ED      CC            int3
004012EE      CC            int3
004012EF      CC            int3
004012F0 >/.  55            push    ebp
004012F1  |.  8BEC          mov     ebp, esp
004012F3  |.  51            push    ecx
004012F4  |.  837D 08 00    cmp     dword ptr [ebp+8], 0
004012F8  |.  7C 06         jl      short 00401300
004012FA  |.  837D 08 03    cmp     dword ptr [ebp+8], 3
004012FE  |.  7C 07         jl      short 00401307
00401300  |>  B8 FEFFFFFF   mov     eax, -2
00401305  |.  EB 63         jmp     short 0040136A
00401307  |>  837D 0C FA    cmp     dword ptr [ebp+C], -6
0040130B  |.  75 0C         jnz     short 00401319
0040130D  |.  8B45 08       mov     eax, dword ptr [ebp+8]
00401310  |.  8B0485 484A42>mov     eax, dword ptr [eax*4+_CrtDbgFil>
00401317  |.  EB 51         jmp     short 0040136A
00401319  |>  8B4D 08       mov     ecx, dword ptr [ebp+8]
0040131C  |.  8B148D 484A42>mov     edx, dword ptr [ecx*4+_CrtDbgFil>
00401323  |.  8955 FC       mov     dword ptr [ebp-4], edx
00401326  |.  837D 0C FC    cmp     dword ptr [ebp+C], -4
0040132A  |.  75 14         jnz     short 00401340
0040132C  |.  6A F5         push    -0B                              ; /DevType = STD_OUTPUT_HANDLE
0040132E  |.  FF15 58A14200 call    dword ptr [<&KERNEL32.GetStdHand>; \GetStdHandle
00401334  |.  8B4D 08       mov     ecx, dword ptr [ebp+8]
00401337  |.  89048D 484A42>mov     dword ptr [ecx*4+_CrtDbgFile], e>
0040133E  |.  EB 27         jmp     short 00401367
00401340  |>  837D 0C FB    cmp     dword ptr [ebp+C], -5
00401344  |.  75 14         jnz     short 0040135A
00401346  |.  6A F4         push    -0C                              ; /DevType = STD_ERROR_HANDLE
00401348  |.  FF15 58A14200 call    dword ptr [<&KERNEL32.GetStdHand>; \GetStdHandle
0040134E  |.  8B55 08       mov     edx, dword ptr [ebp+8]
00401351  |.  890495 484A42>mov     dword ptr [edx*4+_CrtDbgFile], e>
00401358  |.  EB 0D         jmp     short 00401367
0040135A  |>  8B45 08       mov     eax, dword ptr [ebp+8]
0040135D  |.  8B4D 0C       mov     ecx, dword ptr [ebp+C]
00401360  |.  890C85 484A42>mov     dword ptr [eax*4+_CrtDbgFile], e>
00401367  |>  8B45 FC       mov     eax, dword ptr [ebp-4]
0040136A  |>  8BE5          mov     esp, ebp
0040136C  |.  5D            pop     ebp
0040136D  \.  C3            retn
0040136E      CC            int3
0040136F      CC            int3
00401370 >/.  55            push    ebp
00401371  |.  8BEC          mov     ebp, esp
00401373  |.  51            push    ecx
00401374  |.  A1 E0954200   mov     eax, dword ptr [_pfnReportHook]
00401379  |.  8945 FC       mov     dword ptr [ebp-4], eax
0040137C  |.  8B4D 08       mov     ecx, dword ptr [ebp+8]
0040137F  |.  890D E0954200 mov     dword ptr [_pfnReportHook], ecx
00401385  |.  8B45 FC       mov     eax, dword ptr [ebp-4]
00401388  |.  8BE5          mov     esp, ebp
0040138A  |.  5D            pop     ebp
0040138B  \.  C3            retn
0040138C      CC            int3
0040138D      CC            int3
0040138E      CC            int3
0040138F      CC            int3
00401390 >/$  55            push    ebp
00401391  |.  8BEC          mov     ebp, esp
00401393  |.  B8 2C300000   mov     eax, 302C
00401398  |.  E8 03250000   call    _chkstk
0040139D  |.  57            push    edi
0040139E  |.  C685 F8CFFFFF>mov     byte ptr [ebp-3008], 0
004013A5  |.  B9 FF030000   mov     ecx, 3FF
004013AA  |.  33C0          xor     eax, eax
004013AC  |.  8DBD F9CFFFFF lea     edi, dword ptr [ebp-3007]
004013B2  |.  F3:AB         rep     stos dword ptr es:[edi]
004013B4  |.  66:AB         stos    word ptr es:[edi]
004013B6  |.  AA            stos    byte ptr es:[edi]
004013B7  |.  C685 F8DFFFFF>mov     byte ptr [ebp-2008], 0
004013BE  |.  B9 FF030000   mov     ecx, 3FF
004013C3  |.  33C0          xor     eax, eax
004013C5  |.  8DBD F9DFFFFF lea     edi, dword ptr [ebp-2007]
004013CB  |.  F3:AB         rep     stos dword ptr es:[edi]
004013CD  |.  66:AB         stos    word ptr es:[edi]
004013CF  |.  AA            stos    byte ptr es:[edi]
004013D0  |.  C685 00F0FFFF>mov     byte ptr [ebp-1000], 0
004013D7  |.  B9 FF030000   mov     ecx, 3FF
004013DC  |.  33C0          xor     eax, eax
004013DE  |.  8DBD 01F0FFFF lea     edi, dword ptr [ebp-FFF]
004013E4  |.  F3:AB         rep     stos dword ptr es:[edi]
004013E6  |.  66:AB         stos    word ptr es:[edi]
004013E8  |.  AA            stos    byte ptr es:[edi]
004013E9  |.  8D45 1C       lea     eax, dword ptr [ebp+1C]
004013EC  |.  8985 FCEFFFFF mov     dword ptr [ebp-1004], eax
004013F2  |.  837D 08 00    cmp     dword ptr [ebp+8], 0
004013F6  |.  7C 06         jl      short 004013FE
004013F8  |.  837D 08 03    cmp     dword ptr [ebp+8], 3
004013FC  |.  7C 08         jl      short 00401406
004013FE  |>  83C8 FF       or      eax, FFFFFFFF
00401401  |.  E9 15030000   jmp     0040171B
00401406  |>  837D 08 02    cmp     dword ptr [ebp+8], 2
0040140A  |.  0F85 A0000000 jnz     004014B0
00401410  |.  68 384A4200   push    offset _crtAssertBusy            ; /pVar = offset TEST._crtAssertBusy
00401415  |.  FF15 70A14200 call    dword ptr [<&KERNEL32.Interlocke>; \InterlockedIncrement
0040141B  |.  85C0          test    eax, eax
0040141D  |.  0F8E 8D000000 jle     004014B0
00401423  |.  833D 5C7C4200>cmp     dword ptr [427C5C], 0
0040142A  |.  75 42         jnz     short 0040146E
0040142C  |.  68 E8214200   push    004221E8                         ; /FileName = "user32.dll"
00401431  |.  FF15 6CA14200 call    dword ptr [<&KERNEL32.LoadLibrar>; \LoadLibraryA
00401437  |.  8985 F4CFFFFF mov     dword ptr [ebp-300C], eax
0040143D  |.  83BD F4CFFFFF>cmp     dword ptr [ebp-300C], 0
00401444  |.  74 20         je      short 00401466
00401446  |.  68 DC214200   push    004221DC                         ; /ProcNameOrOrdinal = "wsprintfA"
0040144B  |.  8B8D F4CFFFFF mov     ecx, dword ptr [ebp-300C]        ; |
00401451  |.  51            push    ecx                              ; |hModule
00401452  |.  FF15 68A14200 call    dword ptr [<&KERNEL32.GetProcAdd>; \GetProcAddress
00401458  |.  A3 5C7C4200   mov     dword ptr [427C5C], eax
0040145D  |.  833D 5C7C4200>cmp     dword ptr [427C5C], 0
00401464  |.  75 08         jnz     short 0040146E
00401466  |>  83C8 FF       or      eax, FFFFFFFF
00401469  |.  E9 AD020000   jmp     0040171B
0040146E  |>  8B55 10       mov     edx, dword ptr [ebp+10]
00401471  |.  52            push    edx
00401472  |.  8B45 0C       mov     eax, dword ptr [ebp+C]
00401475  |.  50            push    eax
00401476  |.  68 A8214200   push    004221A8                         ;  ASCII "Second Chance Assertion Failed: File %s, Line %d",LF
0040147B  |.  8D8D F8DFFFFF lea     ecx, dword ptr [ebp-2008]
00401481  |.  51            push    ecx
00401482  |.  FF15 5C7C4200 call    dword ptr [427C5C]
00401488  |.  83C4 10       add     esp, 10
0040148B  |.  8D95 F8DFFFFF lea     edx, dword ptr [ebp-2008]
00401491  |.  52            push    edx                              ; /String
00401492  |.  FF15 64A14200 call    dword ptr [<&KERNEL32.OutputDebu>; \OutputDebugStringA
00401498  |.  68 384A4200   push    offset _crtAssertBusy            ; /pVar = offset TEST._crtAssertBusy
0040149D  |.  FF15 60A14200 call    dword ptr [<&KERNEL32.Interlocke>; \InterlockedDecrement
004014A3  |.  E8 D8FDFFFF   call    _CrtDbgBreak
004014A8  |.  83C8 FF       or      eax, FFFFFFFF
004014AB  |.  E9 6B020000   jmp     0040171B
004014B0  |>  837D 18 00    cmp     dword ptr [ebp+18], 0
004014B4  |.  74 37         je      short 004014ED
004014B6  |.  8B85 FCEFFFFF mov     eax, dword ptr [ebp-1004]
004014BC  |.  50            push    eax                              ; /arglist
004014BD  |.  8B4D 18       mov     ecx, dword ptr [ebp+18]          ; |
004014C0  |.  51            push    ecx                              ; |format
004014C1  |.  68 ED0F0000   push    0FED                             ; |count = FED (4077.)
004014C6  |.  8D95 00F0FFFF lea     edx, dword ptr [ebp-1000]        ; |
004014CC  |.  52            push    edx                              ; |buffer
004014CD  |.  E8 CE220000   call    _vsnprintf                       ; \_vsnprintf
004014D2  |.  83C4 10       add     esp, 10
004014D5  |.  85C0          test    eax, eax
004014D7  |.  7D 14         jge     short 004014ED
004014D9  |.  68 7C214200   push    0042217C                         ; /src = "_CrtDbgReport: String too long or IO Error"
004014DE  |.  8D85 00F0FFFF lea     eax, dword ptr [ebp-1000]        ; |
004014E4  |.  50            push    eax                              ; |dest
004014E5  |.  E8 C6210000   call    strcpy                           ; \strcpy
004014EA  |.  83C4 08       add     esp, 8
004014ED  |>  837D 08 02    cmp     dword ptr [ebp+8], 2
004014F1  |.  75 32         jnz     short 00401525
004014F3  |.  837D 18 00    cmp     dword ptr [ebp+18], 0
004014F7  |.  74 0C         je      short 00401505
004014F9  |.  C785 D8CFFFFF>mov     dword ptr [ebp-3028], 00422168   ;  ASCII "Assertion failed: "
00401503  |.  EB 0A         jmp     short 0040150F
00401505  |>  C785 D8CFFFFF>mov     dword ptr [ebp-3028], 00422154   ;  ASCII "Assertion failed!"
0040150F  |>  8B8D D8CFFFFF mov     ecx, dword ptr [ebp-3028]
00401515  |.  51            push    ecx                              ; /src
00401516  |.  8D95 F8CFFFFF lea     edx, dword ptr [ebp-3008]        ; |
0040151C  |.  52            push    edx                              ; |dest
0040151D  |.  E8 8E210000   call    strcpy                           ; \strcpy
00401522  |.  83C4 08       add     esp, 8
00401525  |>  8D85 00F0FFFF lea     eax, dword ptr [ebp-1000]
0040152B  |.  50            push    eax                              ; /src
0040152C  |.  8D8D F8CFFFFF lea     ecx, dword ptr [ebp-3008]        ; |
00401532  |.  51            push    ecx                              ; |dest
00401533  |.  E8 88210000   call    strcat                           ; \strcat
00401538  |.  83C4 08       add     esp, 8
0040153B  |.  837D 08 02    cmp     dword ptr [ebp+8], 2
0040153F  |.  75 39         jnz     short 0040157A
00401541  |.  8B55 08       mov     edx, dword ptr [ebp+8]
00401544  |.  8B0495 3C4A42>mov     eax, dword ptr [edx*4+_CrtDbgMod>
0040154B  |.  83E0 01       and     eax, 1
0040154E  |.  85C0          test    eax, eax
00401550  |.  74 14         je      short 00401566
00401552  |.  68 50214200   push    00422150                         ; /src = CR,""
00401557  |.  8D8D F8CFFFFF lea     ecx, dword ptr [ebp-3008]        ; |
0040155D  |.  51            push    ecx                              ; |dest
0040155E  |.  E8 5D210000   call    strcat                           ; \strcat
00401563  |.  83C4 08       add     esp, 8
00401566  |>  68 4C214200   push    0042214C                         ; /src = LF,""
0040156B  |.  8D95 F8CFFFFF lea     edx, dword ptr [ebp-3008]        ; |
00401571  |.  52            push    edx                              ; |dest
00401572  |.  E8 49210000   call    strcat                           ; \strcat
00401577  |.  83C4 08       add     esp, 8
0040157A  |>  837D 0C 00    cmp     dword ptr [ebp+C], 0
0040157E  |.  74 42         je      short 004015C2
00401580  |.  8D85 F8CFFFFF lea     eax, dword ptr [ebp-3008]
00401586  |.  50            push    eax                              ; /<%s>
00401587  |.  8B4D 10       mov     ecx, dword ptr [ebp+10]          ; |
0040158A  |.  51            push    ecx                              ; |<%d>
0040158B  |.  8B55 0C       mov     edx, dword ptr [ebp+C]           ; |
0040158E  |.  52            push    edx                              ; |<%s>
0040158F  |.  68 40214200   push    00422140                         ; |format = "%s(%d) : %s"
00401594  |.  68 00100000   push    1000                             ; |count = 1000 (4096.)
00401599  |.  8D85 F8DFFFFF lea     eax, dword ptr [ebp-2008]        ; |
0040159F  |.  50            push    eax                              ; |s
004015A0  |.  E8 0B200000   call    _snprintf                        ; \_snprintf
004015A5  |.  83C4 18       add     esp, 18
004015A8  |.  85C0          test    eax, eax
004015AA  |.  7D 14         jge     short 004015C0
004015AC  |.  68 7C214200   push    0042217C                         ; /src = "_CrtDbgReport: String too long or IO Error"
004015B1  |.  8D8D F8DFFFFF lea     ecx, dword ptr [ebp-2008]        ; |
004015B7  |.  51            push    ecx                              ; |dest
004015B8  |.  E8 F3200000   call    strcpy                           ; \strcpy
004015BD  |.  83C4 08       add     esp, 8
004015C0  |>  EB 16         jmp     short 004015D8
004015C2  |>  8D95 F8CFFFFF lea     edx, dword ptr [ebp-3008]
004015C8  |.  52            push    edx                              ; /src
004015C9  |.  8D85 F8DFFFFF lea     eax, dword ptr [ebp-2008]        ; |
004015CF  |.  50            push    eax                              ; |dest
004015D0  |.  E8 DB200000   call    strcpy                           ; \strcpy
004015D5  |.  83C4 08       add     esp, 8
004015D8  |>  833D E0954200>cmp     dword ptr [_pfnReportHook], 0
004015DF  |.  74 3B         je      short 0040161C
004015E1  |.  8D8D F8EFFFFF lea     ecx, dword ptr [ebp-1008]
004015E7  |.  51            push    ecx
004015E8  |.  8D95 F8DFFFFF lea     edx, dword ptr [ebp-2008]
004015EE  |.  52            push    edx
004015EF  |.  8B45 08       mov     eax, dword ptr [ebp+8]
004015F2  |.  50            push    eax
004015F3  |.  FF15 E0954200 call    dword ptr [_pfnReportHook]
004015F9  |.  83C4 0C       add     esp, 0C
004015FC  |.  85C0          test    eax, eax
004015FE  |.  74 1C         je      short 0040161C
00401600  |.  837D 08 02    cmp     dword ptr [ebp+8], 2
00401604  |.  75 0B         jnz     short 00401611
00401606  |.  68 384A4200   push    offset _crtAssertBusy            ; /pVar = offset TEST._crtAssertBusy
0040160B  |.  FF15 60A14200 call    dword ptr [<&KERNEL32.Interlocke>; \InterlockedDecrement
00401611  |>  8B85 F8EFFFFF mov     eax, dword ptr [ebp-1008]
00401617  |.  E9 FF000000   jmp     0040171B
0040161C  |>  8B4D 08       mov     ecx, dword ptr [ebp+8]
0040161F  |.  8B148D 3C4A42>mov     edx, dword ptr [ecx*4+_CrtDbgMod>
00401626  |.  83E2 01       and     edx, 1
00401629  |.  85D2          test    edx, edx
0040162B  |.  74 3E         je      short 0040166B
0040162D  |.  8B45 08       mov     eax, dword ptr [ebp+8]
00401630  |.  833C85 484A42>cmp     dword ptr [eax*4+_CrtDbgFile], ->
00401638  |.  74 31         je      short 0040166B
0040163A  |.  6A 00         push    0
0040163C  |.  8D8D F0CFFFFF lea     ecx, dword ptr [ebp-3010]
00401642  |.  51            push    ecx
00401643  |.  8D95 F8DFFFFF lea     edx, dword ptr [ebp-2008]
00401649  |.  52            push    edx                              ; /s
0040164A  |.  E8 E11E0000   call    strlen                           ; \strlen
0040164F  |.  83C4 04       add     esp, 4
00401652  |.  50            push    eax                              ; |nBytesToWrite
00401653  |.  8D85 F8DFFFFF lea     eax, dword ptr [ebp-2008]        ; |
00401659  |.  50            push    eax                              ; |Buffer
0040165A  |.  8B4D 08       mov     ecx, dword ptr [ebp+8]           ; |
0040165D  |.  8B148D 484A42>mov     edx, dword ptr [ecx*4+_CrtDbgFil>; |
00401664  |.  52            push    edx                              ; |hFile
00401665  |.  FF15 5CA14200 call    dword ptr [<&KERNEL32.WriteFile>>; \WriteFile
0040166B  |>  8B45 08       mov     eax, dword ptr [ebp+8]
0040166E  |.  8B0C85 3C4A42>mov     ecx, dword ptr [eax*4+_CrtDbgMod>
00401675  |.  83E1 02       and     ecx, 2
00401678  |.  85C9          test    ecx, ecx
0040167A  |.  74 0D         je      short 00401689
0040167C  |.  8D95 F8DFFFFF lea     edx, dword ptr [ebp-2008]
00401682  |.  52            push    edx                              ; /String
00401683  |.  FF15 64A14200 call    dword ptr [<&KERNEL32.OutputDebu>; \OutputDebugStringA
00401689  |>  8B45 08       mov     eax, dword ptr [ebp+8]
0040168C  |.  8B0C85 3C4A42>mov     ecx, dword ptr [eax*4+_CrtDbgMod>
00401693  |.  83E1 04       and     ecx, 4
00401696  |.  85C9          test    ecx, ecx
00401698  |.  74 6E         je      short 00401708
0040169A  |.  837D 10 00    cmp     dword ptr [ebp+10], 0
0040169E  |.  74 1D         je      short 004016BD
004016A0  |.  6A 0A         push    0A                               ; /radix = A (10.)
004016A2  |.  8D95 DCCFFFFF lea     edx, dword ptr [ebp-3024]        ; |
004016A8  |.  52            push    edx                              ; |string
004016A9  |.  8B45 10       mov     eax, dword ptr [ebp+10]          ; |
004016AC  |.  50            push    eax                              ; |value
004016AD  |.  E8 8E1B0000   call    _itoa                            ; \_itoa
004016B2  |.  83C4 0C       add     esp, 0C
004016B5  |.  8985 D4CFFFFF mov     dword ptr [ebp-302C], eax
004016BB  |.  EB 0A         jmp     short 004016C7
004016BD  |>  C785 D4CFFFFF>mov     dword ptr [ebp-302C], 0
004016C7  |>  8D8D 00F0FFFF lea     ecx, dword ptr [ebp-1000]
004016CD  |.  51            push    ecx                              ; /Arg5
004016CE  |.  8B55 14       mov     edx, dword ptr [ebp+14]          ; |
004016D1  |.  52            push    edx                              ; |Arg4
004016D2  |.  8B85 D4CFFFFF mov     eax, dword ptr [ebp-302C]        ; |
004016D8  |.  50            push    eax                              ; |Arg3
004016D9  |.  8B4D 0C       mov     ecx, dword ptr [ebp+C]           ; |
004016DC  |.  51            push    ecx                              ; |Arg2
004016DD  |.  8B55 08       mov     edx, dword ptr [ebp+8]           ; |
004016E0  |.  52            push    edx                              ; |Arg1
004016E1  |.  E8 3A000000   call    CrtMessageWindow                 ; \CrtMessageWindow
004016E6  |.  83C4 14       add     esp, 14
004016E9  |.  8985 F8EFFFFF mov     dword ptr [ebp-1008], eax
004016EF  |.  837D 08 02    cmp     dword ptr [ebp+8], 2
004016F3  |.  75 0B         jnz     short 00401700
004016F5  |.  68 384A4200   push    offset _crtAssertBusy            ; /pVar = offset TEST._crtAssertBusy
004016FA  |.  FF15 60A14200 call    dword ptr [<&KERNEL32.Interlocke>; \InterlockedDecrement
00401700  |>  8B85 F8EFFFFF mov     eax, dword ptr [ebp-1008]
00401706  |.  EB 13         jmp     short 0040171B
00401708  |>  837D 08 02    cmp     dword ptr [ebp+8], 2
0040170C  |.  75 0B         jnz     short 00401719
0040170E  |.  68 384A4200   push    offset _crtAssertBusy            ; /pVar = offset TEST._crtAssertBusy
00401713  |.  FF15 60A14200 call    dword ptr [<&KERNEL32.Interlocke>; \InterlockedDecrement
00401719  |>  33C0          xor     eax, eax
0040171B  |>  5F            pop     edi
0040171C  |.  8BE5          mov     esp, ebp
0040171E  |.  5D            pop     ebp
0040171F  \.  C3            retn
00401720 >/$  55            push    ebp
00401721  |.  8BEC          mov     ebp, esp
00401723  |.  B8 38110000   mov     eax, 1138
00401728  |.  E8 73210000   call    _chkstk
0040172D  |>  837D 18 00    /cmp     dword ptr [ebp+18], 0
00401731  |.  75 25         |jnz     short 00401758
00401733  |.  68 38234200   |push    00422338                        ; /Arg5 = 00422338 ASCII "szUserMessage != NULL"
00401738  |.  6A 00         |push    0                               ; |Arg4 = 00000000
0040173A  |.  68 DA010000   |push    1DA                             ; |Arg3 = 000001DA
0040173F  |.  68 2C234200   |push    0042232C                        ; |Arg2 = 0042232C ASCII "dbgrpt.c"
00401744  |.  6A 02         |push    2                               ; |Arg1 = 00000002
00401746  |.  E8 45FCFFFF   |call    _CrtDbgReport                   ; \_CrtDbgReport
0040174B  |.  83C4 14       |add     esp, 14
0040174E  |.  83F8 01       |cmp     eax, 1
00401751  |.  75 05         |jnz     short 00401758
00401753  |.  E8 28FBFFFF   |call    _CrtDbgBreak
00401758  |>  33C0          |xor     eax, eax
0040175A  |.  85C0          |test    eax, eax
0040175C  |.^ 75 CF         \jnz     short 0040172D
0040175E  |.  68 04010000   push    104                              ; /BufSize = 104 (260.)
00401763  |.  8D8D F8FEFFFF lea     ecx, dword ptr [ebp-108]         ; |
00401769  |.  51            push    ecx                              ; |PathBuffer
0040176A  |.  6A 00         push    0                                ; |hModule = NULL
0040176C  |.  FF15 74A14200 call    dword ptr [<&KERNEL32.GetModuleF>; \GetModuleFileNameA
00401772  |.  85C0          test    eax, eax
00401774  |.  75 14         jnz     short 0040178A
00401776  |.  68 14234200   push    00422314                         ; /src = "<program name unknown>"
0040177B  |.  8D95 F8FEFFFF lea     edx, dword ptr [ebp-108]         ; |
00401781  |.  52            push    edx                              ; |dest
00401782  |.  E8 291F0000   call    strcpy                           ; \strcpy
00401787  |.  83C4 08       add     esp, 8
0040178A  |>  8D85 F8FEFFFF lea     eax, dword ptr [ebp-108]
00401790  |.  8945 FC       mov     dword ptr [ebp-4], eax
00401793  |.  8B4D FC       mov     ecx, dword ptr [ebp-4]
00401796  |.  51            push    ecx                              ; /s
00401797  |.  E8 941D0000   call    strlen                           ; \strlen
0040179C  |.  83C4 04       add     esp, 4
0040179F  |.  83F8 40       cmp     eax, 40
004017A2  |.  76 29         jbe     short 004017CD
004017A4  |.  8B55 FC       mov     edx, dword ptr [ebp-4]
004017A7  |.  52            push    edx                              ; /s
004017A8  |.  E8 831D0000   call    strlen                           ; \strlen
004017AD  |.  83C4 04       add     esp, 4
004017B0  |.  8B4D FC       mov     ecx, dword ptr [ebp-4]
004017B3  |.  8D5401 C0     lea     edx, dword ptr [ecx+eax-40]
004017B7  |.  8955 FC       mov     dword ptr [ebp-4], edx
004017BA  |.  6A 03         push    3                                ; /maxlen = 3
004017BC  |.  68 10234200   push    00422310                         ; |src = "..."
004017C1  |.  8B45 FC       mov     eax, dword ptr [ebp-4]           ; |
004017C4  |.  50            push    eax                              ; |dest
004017C5  |.  E8 F6250000   call    strncpy                          ; \strncpy
004017CA  |.  83C4 0C       add     esp, 0C
004017CD  |>  8B4D 14       mov     ecx, dword ptr [ebp+14]
004017D0  |.  898D F0EEFFFF mov     dword ptr [ebp-1110], ecx
004017D6  |.  83BD F0EEFFFF>cmp     dword ptr [ebp-1110], 0
004017DD  |.  74 49         je      short 00401828
004017DF  |.  8B95 F0EEFFFF mov     edx, dword ptr [ebp-1110]
004017E5  |.  52            push    edx                              ; /s
004017E6  |.  E8 451D0000   call    strlen                           ; \strlen
004017EB  |.  83C4 04       add     esp, 4
004017EE  |.  83F8 40       cmp     eax, 40
004017F1  |.  76 35         jbe     short 00401828
004017F3  |.  8B85 F0EEFFFF mov     eax, dword ptr [ebp-1110]
004017F9  |.  50            push    eax                              ; /s
004017FA  |.  E8 311D0000   call    strlen                           ; \strlen
004017FF  |.  83C4 04       add     esp, 4
00401802  |.  8B8D F0EEFFFF mov     ecx, dword ptr [ebp-1110]
00401808  |.  8D5401 C0     lea     edx, dword ptr [ecx+eax-40]
0040180C  |.  8995 F0EEFFFF mov     dword ptr [ebp-1110], edx
00401812  |.  6A 03         push    3                                ; /maxlen = 3
00401814  |.  68 10234200   push    00422310                         ; |src = "..."
00401819  |.  8B85 F0EEFFFF mov     eax, dword ptr [ebp-1110]        ; |
0040181F  |.  50            push    eax                              ; |dest
00401820  |.  E8 9B250000   call    strncpy                          ; \strncpy
00401825  |.  83C4 0C       add     esp, 0C
00401828  |>  837D 08 02    cmp     dword ptr [ebp+8], 2
0040182C  |.  75 0C         jnz     short 0040183A
0040182E  |.  C785 ECEEFFFF>mov     dword ptr [ebp-1114], 0042229C   ;  ASCII LF,LF,"For information on how your program can cause an assertion",LF,"failure, see the Visual C++ documentation on asserts."
00401838  |.  EB 0A         jmp     short 00401844
0040183A  |>  C785 ECEEFFFF>mov     dword ptr [ebp-1114], 0042202C
00401844  |>  8B4D 18       mov     ecx, dword ptr [ebp+18]
00401847  |.  0FBE11        movsx   edx, byte ptr [ecx]
0040184A  |.  85D2          test    edx, edx
0040184C  |.  74 0B         je      short 00401859
0040184E  |.  8B45 18       mov     eax, dword ptr [ebp+18]
00401851  |.  8985 E8EEFFFF mov     dword ptr [ebp-1118], eax
00401857  |.  EB 0A         jmp     short 00401863
00401859  |>  C785 E8EEFFFF>mov     dword ptr [ebp-1118], 0042202C
00401863  |>  8B4D 18       mov     ecx, dword ptr [ebp+18]
00401866  |.  0FBE11        movsx   edx, byte ptr [ecx]
00401869  |.  85D2          test    edx, edx
0040186B  |.  74 12         je      short 0040187F
0040186D  |.  837D 08 02    cmp     dword ptr [ebp+8], 2
00401871  |.  75 0C         jnz     short 0040187F
00401873  |.  C785 E4EEFFFF>mov     dword ptr [ebp-111C], 0042228C   ;  ASCII "Expression: "
0040187D  |.  EB 0A         jmp     short 00401889
0040187F  |>  C785 E4EEFFFF>mov     dword ptr [ebp-111C], 0042202C
00401889  |>  8B45 18       mov     eax, dword ptr [ebp+18]
0040188C  |.  0FBE08        movsx   ecx, byte ptr [eax]
0040188F  |.  85C9          test    ecx, ecx
00401891  |.  74 0C         je      short 0040189F
00401893  |.  C785 E0EEFFFF>mov     dword ptr [ebp-1120], 00422288   ;  ASCII LF,LF
0040189D  |.  EB 0A         jmp     short 004018A9
0040189F  |>  C785 E0EEFFFF>mov     dword ptr [ebp-1120], 0042202C
004018A9  |>  837D 10 00    cmp     dword ptr [ebp+10], 0
004018AD  |.  74 0B         je      short 004018BA
004018AF  |.  8B55 10       mov     edx, dword ptr [ebp+10]
004018B2  |.  8995 DCEEFFFF mov     dword ptr [ebp-1124], edx
004018B8  |.  EB 0A         jmp     short 004018C4
004018BA  |>  C785 DCEEFFFF>mov     dword ptr [ebp-1124], 0042202C
004018C4  |>  837D 10 00    cmp     dword ptr [ebp+10], 0
004018C8  |.  74 0C         je      short 004018D6
004018CA  |.  C785 D8EEFFFF>mov     dword ptr [ebp-1128], 00422280   ;  ASCII LF,"Line: "
004018D4  |.  EB 0A         jmp     short 004018E0
004018D6  |>  C785 D8EEFFFF>mov     dword ptr [ebp-1128], 0042202C
004018E0  |>  837D 0C 00    cmp     dword ptr [ebp+C], 0
004018E4  |.  74 0B         je      short 004018F1
004018E6  |.  8B45 0C       mov     eax, dword ptr [ebp+C]
004018E9  |.  8985 D4EEFFFF mov     dword ptr [ebp-112C], eax
004018EF  |.  EB 0A         jmp     short 004018FB
004018F1  |>  C785 D4EEFFFF>mov     dword ptr [ebp-112C], 0042202C
004018FB  |>  837D 0C 00    cmp     dword ptr [ebp+C], 0
004018FF  |.  74 0C         je      short 0040190D
00401901  |.  C785 D0EEFFFF>mov     dword ptr [ebp-1130], 00422278   ;  ASCII LF,"File: "
0040190B  |.  EB 0A         jmp     short 00401917
0040190D  |>  C785 D0EEFFFF>mov     dword ptr [ebp-1130], 0042202C
00401917  |>  83BD F0EEFFFF>cmp     dword ptr [ebp-1110], 0
0040191E  |.  74 0E         je      short 0040192E
00401920  |.  8B8D F0EEFFFF mov     ecx, dword ptr [ebp-1110]
00401926  |.  898D CCEEFFFF mov     dword ptr [ebp-1134], ecx
0040192C  |.  EB 0A         jmp     short 00401938
0040192E  |>  C785 CCEEFFFF>mov     dword ptr [ebp-1134], 0042202C
00401938  |>  83BD F0EEFFFF>cmp     dword ptr [ebp-1110], 0
0040193F  |.  74 0C         je      short 0040194D
00401941  |.  C785 C8EEFFFF>mov     dword ptr [ebp-1138], 0042226C   ;  ASCII LF,"Module: "
0040194B  |.  EB 0A         jmp     short 00401957
0040194D  |>  C785 C8EEFFFF>mov     dword ptr [ebp-1138], 0042202C
00401957  |>  8B95 ECEEFFFF mov     edx, dword ptr [ebp-1114]
0040195D  |.  52            push    edx                              ; /<%s>
0040195E  |.  8B85 E8EEFFFF mov     eax, dword ptr [ebp-1118]        ; |
00401964  |.  50            push    eax                              ; |<%s>
00401965  |.  8B8D E4EEFFFF mov     ecx, dword ptr [ebp-111C]        ; |
0040196B  |.  51            push    ecx                              ; |<%s>
0040196C  |.  8B95 E0EEFFFF mov     edx, dword ptr [ebp-1120]        ; |
00401972  |.  52            push    edx                              ; |<%s>
00401973  |.  8B85 DCEEFFFF mov     eax, dword ptr [ebp-1124]        ; |
00401979  |.  50            push    eax                              ; |<%s>
0040197A  |.  8B8D D8EEFFFF mov     ecx, dword ptr [ebp-1128]        ; |
00401980  |.  51            push    ecx                              ; |<%s>
00401981  |.  8B95 D4EEFFFF mov     edx, dword ptr [ebp-112C]        ; |
00401987  |.  52            push    edx                              ; |<%s>
00401988  |.  8B85 D0EEFFFF mov     eax, dword ptr [ebp-1130]        ; |
0040198E  |.  50            push    eax                              ; |<%s>
0040198F  |.  8B8D CCEEFFFF mov     ecx, dword ptr [ebp-1134]        ; |
00401995  |.  51            push    ecx                              ; |<%s>
00401996  |.  8B95 C8EEFFFF mov     edx, dword ptr [ebp-1138]        ; |
0040199C  |.  52            push    edx                              ; |<%s>
0040199D  |.  8B45 FC       mov     eax, dword ptr [ebp-4]           ; |
004019A0  |.  50            push    eax                              ; |<%s>
004019A1  |.  8B4D 08       mov     ecx, dword ptr [ebp+8]           ; |
004019A4  |.  8B148D 544A42>mov     edx, dword ptr [ecx*4+_CrtDbgMod>; |
004019AB  |.  52            push    edx                              ; |<%s>
004019AC  |.  68 18224200   push    00422218                         ; |format = "Debug %s!",LF,LF,"Program: %s%s%s%s%s%s%s%s%s%s%s",LF,LF,"(Press Retry to debug the application)"
004019B1  |.  68 00100000   push    1000                             ; |count = 1000 (4096.)
004019B6  |.  8D85 F4EEFFFF lea     eax, dword ptr [ebp-110C]        ; |
004019BC  |.  50            push    eax                              ; |s
004019BD  |.  E8 EE1B0000   call    _snprintf                        ; \_snprintf
004019C2  |.  83C4 3C       add     esp, 3C
004019C5  |.  85C0          test    eax, eax
004019C7  |.  7D 14         jge     short 004019DD
004019C9  |.  68 7C214200   push    0042217C                         ; /src = "_CrtDbgReport: String too long or IO Error"
004019CE  |.  8D8D F4EEFFFF lea     ecx, dword ptr [ebp-110C]        ; |
004019D4  |.  51            push    ecx                              ; |dest
004019D5  |.  E8 D61C0000   call    strcpy                           ; \strcpy
004019DA  |.  83C4 08       add     esp, 8
004019DD  |>  68 12200100   push    12012                            ; /Arg3 = 00012012
004019E2  |.  68 F4214200   push    004221F4                         ; |Arg2 = 004221F4 ASCII "Microsoft Visual C++ Debug Library"
004019E7  |.  8D95 F4EEFFFF lea     edx, dword ptr [ebp-110C]        ; |
004019ED  |.  52            push    edx                              ; |Arg1
004019EE  |.  E8 0D230000   call    __crtMessageBoxA                 ; \__crtMessageBoxA
004019F3  |.  83C4 0C       add     esp, 0C
004019F6  |.  8985 F4FEFFFF mov     dword ptr [ebp-10C], eax
004019FC  |.  83BD F4FEFFFF>cmp     dword ptr [ebp-10C], 3
00401A03  |.  75 11         jnz     short 00401A16
00401A05  |.  6A 16         push    16                               ; /sig = SIGABRT
00401A07  |.  E8 D4200000   call    raise                            ; \raise
00401A0C  |.  83C4 04       add     esp, 4
00401A0F  |.  6A 03         push    3                                ; /status = 3
00401A11  |.  E8 7A000000   call    _exit                            ; \_exit
00401A16  |>  83BD F4FEFFFF>cmp     dword ptr [ebp-10C], 4
00401A1D  |.  75 07         jnz     short 00401A26
00401A1F  |.  B8 01000000   mov     eax, 1
00401A24  |.  EB 02         jmp     short 00401A28
00401A26  |>  33C0          xor     eax, eax
00401A28  |>  8BE5          mov     esp, ebp
00401A2A  |.  5D            pop     ebp
00401A2B  \.  C3            retn
00401A2C      CC            int3
00401A2D      CC            int3
00401A2E      CC            int3
00401A2F      CC            int3
00401A30 >/$  55            push    ebp
00401A31  |.  8BEC          mov     ebp, esp
00401A33  |.  833D DC954200>cmp     dword ptr [_FPinit], 0
00401A3A  |.  74 06         je      short 00401A42
00401A3C  |.  FF15 DC954200 call    dword ptr [_FPinit]
00401A42  |>  68 18444200   push    offset __xi_z                    ; /Arg2 = 00424418
00401A47  |.  68 08424200   push    offset __xi_a                    ; |Arg1 = 00424208
00401A4C  |.  E8 7F010000   call    _initterm                        ; \_initterm
00401A51  |.  83C4 08       add     esp, 8
00401A54  |.  68 04414200   push    offset __xc_z                    ; /Arg2 = 00424104
00401A59  |.  68 00404200   push    offset __xc_a                    ; |Arg1 = 00424000
00401A5E  |.  E8 6D010000   call    _initterm                        ; \_initterm
00401A63  |.  83C4 08       add     esp, 8
00401A66  |.  5D            pop     ebp
00401A67  \.  C3            retn
00401A68      CC            int3
00401A69      CC            int3
00401A6A      CC            int3
00401A6B      CC            int3
00401A6C      CC            int3
00401A6D      CC            int3
00401A6E      CC            int3
00401A6F      CC            int3
00401A70 >/$  55            push    ebp
00401A71  |.  8BEC          mov     ebp, esp
00401A73  |.  6A 00         push    0                                ; /Arg3 = 00000000
00401A75  |.  6A 00         push    0                                ; |Arg2 = 00000000
00401A77  |.  8B45 08       mov     eax, dword ptr [ebp+8]           ; |
00401A7A  |.  50            push    eax                              ; |Arg1
00401A7B  |.  E8 70000000   call    doexit                           ; \doexit
00401A80  |.  83C4 0C       add     esp, 0C
00401A83  |.  5D            pop     ebp
00401A84  \.  C3            retn
00401A85      CC            int3
00401A86      CC            int3
00401A87      CC            int3
00401A88      CC            int3
00401A89      CC            int3
00401A8A      CC            int3
00401A8B      CC            int3
00401A8C      CC            int3
00401A8D      CC            int3
00401A8E      CC            int3
00401A8F      CC            int3
00401A90 >/$  55            push    ebp
00401A91  |.  8BEC          mov     ebp, esp
00401A93  |.  6A 00         push    0                                ; /Arg3 = 00000000
00401A95  |.  6A 01         push    1                                ; |Arg2 = 00000001
00401A97  |.  8B45 08       mov     eax, dword ptr [ebp+8]           ; |
00401A9A  |.  50            push    eax                              ; |Arg1
00401A9B  |.  E8 50000000   call    doexit                           ; \doexit
00401AA0  |.  83C4 0C       add     esp, 0C
00401AA3  |.  5D            pop     ebp
00401AA4  \.  C3            retn
00401AA5      CC            int3
00401AA6      CC            int3
00401AA7      CC            int3
00401AA8      CC            int3
00401AA9      CC            int3
00401AAA      CC            int3
00401AAB      CC            int3
00401AAC      CC            int3
00401AAD      CC            int3
00401AAE      CC            int3
00401AAF      CC            int3
00401AB0 >/.  55            push    ebp
00401AB1  |.  8BEC          mov     ebp, esp
00401AB3  |.  6A 01         push    1                                ; /Arg3 = 00000001
00401AB5  |.  6A 00         push    0                                ; |Arg2 = 00000000
00401AB7  |.  6A 00         push    0                                ; |Arg1 = 00000000
00401AB9  |.  E8 32000000   call    doexit                           ; \doexit
00401ABE  |.  83C4 0C       add     esp, 0C
00401AC1  |.  5D            pop     ebp
00401AC2  \.  C3            retn
00401AC3      CC            int3
00401AC4      CC            int3
00401AC5      CC            int3
00401AC6      CC            int3
00401AC7      CC            int3
00401AC8      CC            int3
00401AC9      CC            int3
00401ACA      CC            int3
00401ACB      CC            int3
00401ACC      CC            int3
00401ACD      CC            int3
00401ACE      CC            int3
00401ACF      CC            int3
00401AD0 >/.  55            push    ebp
00401AD1  |.  8BEC          mov     ebp, esp
00401AD3  |.  6A 01         push    1                                ; /Arg3 = 00000001
00401AD5  |.  6A 01         push    1                                ; |Arg2 = 00000001
00401AD7  |.  6A 00         push    0                                ; |Arg1 = 00000000
00401AD9  |.  E8 12000000   call    doexit                           ; \doexit
00401ADE  |.  83C4 0C       add     esp, 0C
00401AE1  |.  5D            pop     ebp
00401AE2  \.  C3            retn
00401AE3      CC            int3
00401AE4      CC            int3
00401AE5      CC            int3
00401AE6      CC            int3
00401AE7      CC            int3
00401AE8      CC            int3
00401AE9      CC            int3
00401AEA      CC            int3
00401AEB      CC            int3
00401AEC      CC            int3
00401AED      CC            int3
00401AEE      CC            int3
00401AEF      CC            int3
00401AF0 >/$  55            push    ebp
00401AF1  |.  8BEC          mov     ebp, esp
00401AF3  |.  51            push    ecx
00401AF4  |.  833D A87C4200>cmp     dword ptr [_C_Exit_Done], 1
00401AFB  |.  75 11         jnz     short 00401B0E
00401AFD  |.  8B45 08       mov     eax, dword ptr [ebp+8]
00401B00  |.  50            push    eax                              ; /ExitCode
00401B01  |.  FF15 7CA14200 call    dword ptr [<&KERNEL32.GetCurrent>; |[GetCurrentProcess
00401B07  |.  50            push    eax                              ; |hProcess
00401B08  |.  FF15 78A14200 call    dword ptr [<&KERNEL32.TerminateP>; \TerminateProcess
00401B0E  |>  C705 A47C4200>mov     dword ptr [_C_Termination_Done],>
00401B18  |.  8A4D 10       mov     cl, byte ptr [ebp+10]
00401B1B  |.  880D A07C4200 mov     byte ptr [_exitflag], cl
00401B21  |.  837D 0C 00    cmp     dword ptr [ebp+C], 0
00401B25  |.  75 47         jnz     short 00401B6E
00401B27  |.  833D D8954200>cmp     dword ptr [__onexitbegin], 0
00401B2E  |.  74 2C         je      short 00401B5C
00401B30  |.  8B15 D4954200 mov     edx, dword ptr [__onexitend]
00401B36  |.  8955 FC       mov     dword ptr [ebp-4], edx
00401B39  |>  8B45 FC       /mov     eax, dword ptr [ebp-4]
00401B3C  |.  83E8 04       |sub     eax, 4
00401B3F  |.  8945 FC       |mov     dword ptr [ebp-4], eax
00401B42  |.  8B4D FC       |mov     ecx, dword ptr [ebp-4]
00401B45  |.  3B0D D8954200 |cmp     ecx, dword ptr [__onexitbegin]
00401B4B  |.  72 0F         |jb      short 00401B5C
00401B4D  |.  8B55 FC       |mov     edx, dword ptr [ebp-4]
00401B50  |.  833A 00       |cmp     dword ptr [edx], 0
00401B53  |.  74 05         |je      short 00401B5A
00401B55  |.  8B45 FC       |mov     eax, dword ptr [ebp-4]
00401B58  |.  FF10          |call    dword ptr [eax]
00401B5A  |>^ EB DD         \jmp     short 00401B39
00401B5C  |>  68 24474200   push    offset __xp_z                    ; /Arg2 = 00424724
00401B61  |.  68 1C454200   push    offset __xp_a                    ; |Arg1 = 0042451C
00401B66  |.  E8 65000000   call    _initterm                        ; \_initterm
00401B6B  |.  83C4 08       add     esp, 8
00401B6E  |>  68 2C494200   push    offset __xt_z                    ; /Arg2 = 0042492C
00401B73  |.  68 28484200   push    offset __xt_a                    ; |Arg1 = 00424828
00401B78  |.  E8 53000000   call    _initterm                        ; \_initterm
00401B7D  |.  83C4 08       add     esp, 8
00401B80  |.  833D AC7C4200>cmp     dword ptr [fExit], 0
00401B87  |.  75 20         jnz     short 00401BA9
00401B89  |.  6A FF         push    -1                               ; /Arg1 = FFFFFFFF
00401B8B  |.  E8 F0370000   call    _CrtSetDbgFlag                   ; \_CrtSetDbgFlag
00401B90  |.  83C4 04       add     esp, 4
00401B93  |.  83E0 20       and     eax, 20
00401B96  |.  85C0          test    eax, eax
00401B98  |.  74 0F         je      short 00401BA9
00401B9A  |.  C705 AC7C4200>mov     dword ptr [fExit], 1
00401BA4  |.  E8 47410000   call    _CrtDumpMemoryLeaks
00401BA9  |>  837D 10 00    cmp     dword ptr [ebp+10], 0
00401BAD  |.  74 02         je      short 00401BB1
00401BAF  |.  EB 14         jmp     short 00401BC5
00401BB1  |>  C705 A87C4200>mov     dword ptr [_C_Exit_Done], 1
00401BBB  |.  8B4D 08       mov     ecx, dword ptr [ebp+8]
00401BBE  |.  51            push    ecx                              ; /ExitCode
00401BBF  |.  FF15 50A14200 call    dword ptr [<&KERNEL32.ExitProces>; \ExitProcess
00401BC5  |>  8BE5          mov     esp, ebp
00401BC7  |.  5D            pop     ebp
00401BC8  \.  C3            retn
00401BC9      CC            int3
00401BCA      CC            int3
00401BCB      CC            int3
00401BCC      CC            int3
00401BCD      CC            int3
00401BCE      CC            int3
00401BCF      CC            int3
00401BD0 >/$  55            push    ebp
00401BD1  |.  8BEC          mov     ebp, esp
00401BD3  |>  8B45 08       /mov     eax, dword ptr [ebp+8]
00401BD6  |.  3B45 0C       |cmp     eax, dword ptr [ebp+C]
00401BD9  |.  73 18         |jnb     short 00401BF3
00401BDB  |.  8B4D 08       |mov     ecx, dword ptr [ebp+8]
00401BDE  |.  8339 00       |cmp     dword ptr [ecx], 0
00401BE1  |.  74 05         |je      short 00401BE8
00401BE3  |.  8B55 08       |mov     edx, dword ptr [ebp+8]
00401BE6  |.  FF12          |call    dword ptr [edx]
00401BE8  |>  8B45 08       |mov     eax, dword ptr [ebp+8]
00401BEB  |.  83C0 04       |add     eax, 4
00401BEE  |.  8945 08       |mov     dword ptr [ebp+8], eax
00401BF1  |.^ EB E0         \jmp     short 00401BD3
00401BF3  |>  5D            pop     ebp
00401BF4  \.  C3            retn
00401BF5      CC            int3
00401BF6      CC            int3
00401BF7      CC            int3
00401BF8      CC            int3

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 0
支持
分享
最新回复 (10)
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
不好意思,题目写错了!

不是HelloWorld程序,而是一个简短程序!
2007-9-14 07:50
0
雪    币: 331
活跃值: (56)
能力值: ( LV13,RANK:410 )
在线值:
发帖
回帖
粉丝
3
麻雀虽小,五脏俱全。
CRT的代码占了80%
2007-9-14 09:41
0
雪    币: 141
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
4
一般,一个小程序(HelloWorld)就有3~5K大(与编译器、语言有关)

初始化呀 载入链接库呀.....  垃圾代码超多(没有垃圾代码压缩壳就没有用了)
2007-9-14 12:46
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
5
请问有没有哪本书对这些代码进行解释或者对WINDOWDS程序进行深入分析的书籍?

请高手推荐,谢谢!
2007-9-15 11:01
0
雪    币: 215
活跃值: (26)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
6
后缀名不要写.CPP,改test.c。不然编译器会调用c++的编译器,会加入很多不必要的代码。用c编译器的话,反汇编的结果就会很简单。
2007-9-15 22:57
0
雪    币: 846
活跃值: (221)
能力值: (RANK:570 )
在线值:
发帖
回帖
粉丝
7
那些东西都不是我们关心的。。。。
当然,如果你对写一个高级语言,如何稳定的提供各种高级特性有兴趣。。。
2007-9-15 23:15
0
雪    币: 44229
活跃值: (19960)
能力值: (RANK:350 )
在线值:
发帖
回帖
粉丝
8
这个是启动函数。
标准编译器通常包含启动代码在内的库文件源码,例如Visual C++中,启动代码存放在CRT\SRC\crt0.c文件中。
2007-9-16 09:43
0
雪    币: 205
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
9
中文版的有
jeffrey richter "核心编程" (看完了写个PFE之内的没问题)
Solomon  深入解析Windows操作系统 第4版——Microsoft Windows Server 2003/Windows XP/Windows 2000技术内幕 (Windows内部结构权威书籍。看看什么人给它写的序言就知道了,初学的建议先看核心编程)
英文的有
Walter Oney,“Programming the Microsoft Windows Driver Model”,2e,
Parasad Dabak, “Undocumented Windows NT”,(看雪有下的,翻译过的中文)
还有MSDN上Matt Pietrek 的文章是必读的
2007-9-16 13:48
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
10
非常感谢楼上的建议,这么好心的人版主应该奖励啊!
2007-9-16 17:08
0
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
11
昨天浏览了“核心编程”和“高级编程”,那都是都WINDOWS程序的原理进行解析,但是没有对汇编级别进行解析啊
2007-9-17 07:46
0
游客
登录 | 注册 方可回帖
返回
//