Reverse Engineering for Beginners

(avery) #1
CHAPTER 68. WINDOWS NT CHAPTER 68. WINDOWS NT

23 cmp [eax+4000E8h], ecx
24 setnz cl
25 mov [ebp+var_1C], ecx
26 jmp short loc_40109A
27
28
29 loc_401096: ; CODE XREF: tmainCRTStartup+18
30 ;
tmainCRTStartup+29 ...
31 and [ebp+var_1C], 0
32
33 loc_40109A: ; CODE XREF: _tmainCRTStartup+50
34 push 1
35 call __heap_init
36 pop ecx
37 test eax, eax
38 jnz short loc_4010AE
39 push 1Ch
40 call _fast_error_exit
41 pop ecx
42
43 loc4010AE: ; CODE XREF:
tmainCRTStartup+60
44 call mtinit
45 test eax, eax
46 jnz short loc_4010BF
47 push 10h
48 call _fast_error_exit
49 pop ecx
50
51 loc4010BF: ; CODE XREF:
tmainCRTStartup+71
52 call sub_401F2B
53 and [ebp+ms_exc.disabled], 0
54 call ioinit
55 test eax, eax
56 jge short loc_4010D9
57 push 1Bh
58 call __amsg_exit
59 pop ecx
60
61 loc4010D9: ; CODE XREF:
tmainCRTStartup+8B
62 call ds:GetCommandLineA
63 mov dword_40B7F8, eax
64 call _crtGetEnvironmentStringsA
65 mov dword_40AC60, eax
66 call
setargv
67 test eax, eax
68 jge short loc_4010FF
69 push 8
70 call amsg_exit
71 pop ecx
72
73 loc_4010FF: ; CODE XREF: _tmainCRTStartup+B1
74 call
setenvp
75 test eax, eax
76 jge short loc_401110
77 push 9
78 call
amsg_exit
79 pop ecx
80
81 loc_401110: ; CODE XREF: _tmainCRTStartup+C2
82 push 1
83 call __cinit
84 pop ecx
85 test eax, eax
86 jz short loc_401123
87 push eax
88 call
amsg_exit
89 pop ecx
90
91 loc_401123: ; CODE XREF: ___tmainCRTStartup+D6
92 mov eax, envp

Free download pdf