Function at 0x40cf70
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1d8
push ebx
push esi
push edi
mov dword [ebp - 0x1d8], 3
mov dword [ebp - 0x1d4], 0x40da70
mov dword [ebp - 0x1d0], 0
mov dword [ebp - 0x1cc], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c8], eax
push 0x7f00
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
mov dword [ebp - 0x1c4], eax
push 0x7f00
push 0
call dword [sym.imp.USER32.dll_LoadCursorA]
mov dword [ebp - 0x1c0], eax
push 4
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [ebp - 0x1bc], eax
mov dword [ebp - 0x1b8], 0x4228e8
mov dword [ebp - 0x1b4], 0x4228e8
lea eax, [ebp - 0x1d8]
push eax
call dword [sym.imp.USER32.dll_RegisterClassA]
push 0
mov eax, dword [ebp + 8]
push eax
push 0
push 0
push 0x1e0
push 0x280
push 0
push 0
push 0x80000000
push 0x4228e8
push 0x4228e8
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov dword [0x438b18], eax
cmp dword [0x438b18], 0
jne 0x40d04c
xor eax, eax
jmp 0x40d4aa
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_UpdateWindow]
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_SetFocus]
push 0
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov eax, dword [0x438b18]
push eax
call fcn.004050f0
add esp, 4
push 5
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
push 0x4228b0
push 0
call sub.DDRAW.dll_DirectDrawCreate
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40d0f2
push 0
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
push 0x4228f0
push 0x4228f8
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
jmp 0x40d4aa
push 0x11
mov eax, dword [0x438b18]
push eax
mov eax, dword [0x4228b0]
push eax
mov eax, dword [0x4228b0]
mov eax, dword [eax]
call dword [eax + 0x50]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40d150
push 0
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
push 0x42292c
push str.Direct_X_could_not_initialize.__Exclusive_Fullscreen_failed_
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
jmp 0x40d4aa
push 8
push 0x1e0
push 0x280
mov eax, dword [0x4228b0]
push eax
mov eax, dword [0x4228b0]
mov eax, dword [eax]
call dword [eax + 0x54]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40d1b2
push 0
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
push 0x422974
push str.Direct_X_could_not_initialize.__640x480_failed_
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
jmp 0x40d4aa
mov dword [0x4228d0], 0
mov dword [ebp - 0x1b0], 0x13c
push 0
lea eax, [ebp - 0x1b0]
push eax
mov eax, dword [0x4228b0]
push eax
mov eax, dword [0x4228b0]
mov eax, dword [eax]
call dword [eax + 0x2c]
mov dword [ebp - 8], eax
test byte [ebp - 0x1a9], 2
je 0x40d208
mov dword [0x4228d4], 1
mov dword [0x4228d8], 1
jmp 0x40d21c
mov dword [0x4228d4], 0
mov dword [0x4228d8], 0
cmp dword [0x4228d4], 0
jne 0x40d24d
cmp dword [ebp - 0x170], 0x4baf0
jae 0x40d24d
mov dword [0x4228d8], 1
mov dword [0x4228dc], 1
cmp dword [0x4228a0], 0
jne 0x40d274
mov dword [ebp - 0x74], 0x6c
mov dword [ebp - 0x70], 1
mov dword [ebp - 0xc], 0x200
jmp 0x40d291
mov dword [ebp - 0x74], 0x6c
mov dword [ebp - 0x70], 0x21
mov dword [ebp - 0xc], 0x218
mov eax, dword [0x4228a0]
mov dword [ebp - 0x60], eax
push 0
push 0x4228b4
lea eax, [ebp - 0x74]
push eax
mov eax, dword [0x4228b0]
push eax
mov eax, dword [0x4228b0]
mov eax, dword [eax]
call dword [eax + 0x18]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40d2f2
push 0
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 0
push 0x4229ac
push str.Direct_X_could_not_initialize.__Primary_Failed_
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
jmp 0x40d4aa
cmp dword [0x4228a0], 0
je 0x40d33f
mov dword [ebp - 4], 4
push 0x4228b8
lea eax, [ebp - 4]
push eax
mov eax, dword [0x4228b4]
push eax
mov eax, dword [0x4228b4]
mov eax, dword [eax]
call dword [eax + 0x30]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40d33f
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
jmp 0x40d4aa
mov dword [ebp - 0x70], 7
mov dword [ebp - 0xc], 0x40
mov dword [ebp - 0x6c], 0x1e0
mov dword [ebp - 0x68], 0x280
push 0
push 0x4228bc
lea eax, [ebp - 0x74]
push eax
mov eax, dword [0x4228b0]
push eax
mov eax, dword [0x4228b0]
mov eax, dword [eax]
call dword [eax + 0x18]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40d396
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
jmp 0x40d4aa
cmp dword [0x42289c], 1
jne 0x40d48d
push 0
push 0x4228c4
push 0
mov eax, dword [0x4228b0]
push eax
mov eax, dword [0x4228b0]
mov eax, dword [eax]
call dword [eax + 0x10]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40d3dc
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
jmp 0x40d4aa
mov eax, dword [0x438b18]
push eax
push 0
mov eax, dword [0x4228c4]
push eax
mov eax, dword [0x4228c4]
mov eax, dword [eax]
call dword [eax + 0x20]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40d414
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
jmp 0x40d4aa
mov eax, dword [0x4228c4]
push eax
mov eax, dword [0x4228b4]
push eax
mov eax, dword [0x4228b4]
mov eax, dword [eax]
call dword [eax + 0x70]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40d44a
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
jmp 0x40d4aa
cmp dword [0x4228b8], 0
je 0x40d48d
mov eax, dword [0x4228c4]
push eax
mov eax, dword [0x4228b8]
push eax
mov eax, dword [0x4228b8]
mov eax, dword [eax]
call dword [eax + 0x70]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40d48d
mov eax, dword [0x438b18]
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
jmp 0x40d4aa
call fcn.00403c20
mov eax, dword [0x4228b4]
push eax
call fcn.00403e50
add esp, 4
mov eax, 1
jmp 0x40d4aa
pop edi
pop esi
pop ebx
leave
ret