Function at 0x401823
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x36c
mov eax, dword [ebp + 8]
mov dword [0x4377cc], eax
push str.D3Z:CreateDirectDrawWin_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call fcn.004011f7
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_GetDC]
mov dword [ebp - 0x1e4], eax
push 0xc
mov edx, dword [ebp - 0x1e4]
push edx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov dword [0x4377c8], eax
mov eax, dword [ebp - 0x1e4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.USER32.dll_ReleaseDC]
push 0x436c28
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_GetClientRect]
mov dword [ebp - 0x1dc], 0
mov eax, dword [ebp - 0x1dc]
mov dword [ebp - 0x1e0], eax
lea ecx, [ebp - 0x1e0]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.USER32.dll_ClientToScreen]
mov eax, dword [0x436c28]
add eax, dword [ebp - 0x1e0]
mov dword [0x436c28], eax
mov ecx, dword [0x436c2c]
add ecx, dword [ebp - 0x1dc]
mov dword [0x436c2c], ecx
mov edx, dword [0x436c30]
add edx, dword [ebp - 0x1e0]
mov dword [0x436c30], edx
mov eax, dword [0x436c34]
add eax, dword [ebp - 0x1dc]
mov dword [0x436c34], eax
mov ecx, dword [0x436c30]
sub ecx, dword [0x436c28]
mov dword [0x4377c0], ecx
mov edx, dword [0x436c34]
sub edx, dword [0x436c2c]
mov dword [0x4377c4], edx
push 0
push 0x4367e0
push 0
call sub.DDRAW.dll_DirectDrawCreate
mov dword [ebp - 0x354], eax
cmp dword [ebp - 0x354], 0
je 0x401959
push 0x1b2
push 0x431314
mov eax, dword [ebp - 0x354]
push eax
call fcn.00403ead
add esp, 0xc
call fcn.004011f7
xor eax, eax
jmp 0x401c6e
push 0x16c
push 0
lea ecx, [ebp - 0x16c]
push ecx
call fcn.004241c0
add esp, 0xc
mov dword [ebp - 0x16c], 0x16c
push 0x16c
push 0
lea edx, [ebp - 0x350]
push edx
call fcn.004241c0
add esp, 0xc
mov dword [ebp - 0x350], 0x16c
lea eax, [ebp - 0x350]
push eax
lea ecx, [ebp - 0x16c]
push ecx
mov edx, dword [0x4367e0]
mov eax, dword [edx]
mov ecx, dword [0x4367e0]
push ecx
call dword [eax + 0x2c]
cmp dword [0x436fa0], 0
jne 0x4019ce
mov dword [0x436c24], 1
jmp 0x4019d8
mov dword [0x436c24], 2
cmp dword [0x436f9c], 0
jne 0x401a07
mov edx, dword [ebp - 0x168]
and edx, 1
test edx, edx
je 0x401a07
mov eax, dword [ebp - 0xe8]
and eax, 0x1000
test eax, eax
je 0x401a07
mov dword [0x436c24], 2
push 8
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [0x4367e0]
mov eax, dword [edx]
mov ecx, dword [0x4367e0]
push ecx
call dword [eax + 0x50]
mov dword [ebp - 0x358], eax
cmp dword [ebp - 0x358], 0
je 0x401a53
push 0x1ce
push 0x431334
mov edx, dword [ebp - 0x358]
push edx
call fcn.00403ead
add esp, 0xc
call fcn.004011f7
xor eax, eax
jmp 0x401c6e
push 0x6c
push 0
lea eax, [ebp - 0x1d8]
push eax
call fcn.004241c0
add esp, 0xc
mov dword [ebp - 0x1d8], 0x6c
mov dword [ebp - 0x1d4], 1
mov dword [ebp - 0x170], 0x200
push 0
push 0x4367f4
lea ecx, [ebp - 0x1d8]
push ecx
mov edx, dword [0x4367e0]
mov eax, dword [edx]
mov ecx, dword [0x4367e0]
push ecx
call dword [eax + 0x18]
mov dword [ebp - 0x35c], eax
cmp dword [ebp - 0x35c], 0
je 0x401ad8
push 0x1d8
push 0x431354
mov edx, dword [ebp - 0x35c]
push edx
call fcn.00403ead
add esp, 0xc
call fcn.004011f7
xor eax, eax
jmp 0x401c6e
mov dword [ebp - 0x1d4], 7
mov eax, dword [0x4377c0]
mov dword [ebp - 0x1cc], eax
mov ecx, dword [0x4377c4]
mov dword [ebp - 0x1d0], ecx
mov dword [ebp - 0x170], 0x2040
cmp dword [0x436f98], 0
je 0x401b1d
mov edx, dword [ebp - 0x170]
or dh, 0x40
mov dword [ebp - 0x170], edx
jmp 0x401b2c
mov eax, dword [ebp - 0x170]
or ah, 8
mov dword [ebp - 0x170], eax
push 0
push 0x4367f8
lea ecx, [ebp - 0x1d8]
push ecx
mov edx, dword [0x4367e0]
mov eax, dword [edx]
mov ecx, dword [0x4367e0]
push ecx
call dword [eax + 0x18]
mov dword [ebp - 0x360], eax
cmp dword [ebp - 0x360], 0
je 0x401b80
push 0x1e6
push 0x431374
mov edx, dword [ebp - 0x360]
push edx
call fcn.00403ead
add esp, 0xc
call fcn.004011f7
xor eax, eax
jmp 0x401c6e
push 0
push 0x436c04
push 0
mov eax, dword [0x4367e0]
mov ecx, dword [eax]
mov edx, dword [0x4367e0]
push edx
call dword [ecx + 0x10]
mov dword [ebp - 0x364], eax
cmp dword [ebp - 0x364], 0
je 0x401bce
push 0x1ea
push 0x431394
mov eax, dword [ebp - 0x364]
push eax
call fcn.00403ead
add esp, 0xc
call fcn.004011f7
xor eax, eax
jmp 0x401c6e
mov ecx, dword [ebp + 8]
push ecx
push 0
mov edx, dword [0x436c04]
mov eax, dword [edx]
mov ecx, dword [0x436c04]
push ecx
call dword [eax + 0x20]
mov dword [ebp - 0x368], eax
cmp dword [ebp - 0x368], 0
je 0x401c17
push 0x1eb
push 0x4313b4
mov edx, dword [ebp - 0x368]
push edx
call fcn.00403ead
add esp, 0xc
call fcn.004011f7
xor eax, eax
jmp 0x401c6e
mov eax, dword [0x436c04]
push eax
mov ecx, dword [0x4367f4]
mov edx, dword [ecx]
mov eax, dword [0x4367f4]
push eax
call dword [edx + 0x70]
mov dword [ebp - 0x36c], eax
cmp dword [ebp - 0x36c], 0
je 0x401c5f
push 0x1ec
push 0x4313d4
mov ecx, dword [ebp - 0x36c]
push ecx
call fcn.00403ead
add esp, 0xc
call fcn.004011f7
xor eax, eax
jmp 0x401c6e
mov dword [0x436fac], 1
mov eax, 1
mov esp, ebp
pop ebp
ret