Assembly Language for Beginners

(Jeff_L) #1
6.5. WINDOWS NT

12 cmp ds:400000h, ax
13 jnz short loc_401096
14 mov eax, ds:40003Ch
15 cmp dword ptr [eax+400000h], 4550h
16 jnz short loc_401096
17 mov ecx, 10Bh
18 cmp [eax+400018h], cx
19 jnz short loc_401096
20 cmp dword ptr [eax+400074h], 0Eh
21 jbe short loc_401096
22 xor ecx, ecx
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

Free download pdf