Function at 0x4020d0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e8
mov dword [ebp - 0x270], 0
push 0x1a4
push 0
lea eax, [ebp - 0x26c]
push eax
call fcn.004241c0
add esp, 0xc
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x26c], ecx
push 0x4367e4
push 0x42e790
mov edx, dword [0x4367e0]
mov eax, dword [edx]
mov ecx, dword [0x4367e0]
push ecx
call dword [eax]
test eax, eax
jge 0x40214f
push str.D3Z:Error:Failed_to_QI_Direct3D2_from_DirectDraw_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edx, dword [0x4367e0]
mov eax, dword [edx]
mov ecx, dword [0x4367e0]
push ecx
call dword [eax + 8]
mov dword [0x4367e0], 0
xor eax, eax
jmp 0x402371
mov dword [0x4377ec], 0
lea edx, [ebp - 0x26c]
push edx
push 0x402375
mov eax, dword [0x4367e4]
mov ecx, dword [eax]
mov edx, dword [0x4367e4]
push edx
call dword [ecx + 0xc]
mov dword [ebp - 0x278], eax
cmp dword [ebp - 0x268], 0
je 0x402247
cmp dword [0x436fac], 0
jne 0x402247
mov dword [ebp - 0x27c], 0x4000
mov eax, dword [ebp - 0x1c4]
and eax, 0x400
test eax, eax
je 0x4021bb
mov dword [ebp - 0x274], 0x10
jmp 0x4021fd
mov ecx, dword [ebp - 0x1c4]
and ecx, 0x200
test ecx, ecx
je 0x4021d7
mov dword [ebp - 0x274], 0x18
jmp 0x4021fd
mov edx, dword [ebp - 0x1c4]
and edx, 0x100
test edx, edx
je 0x4021f3
mov dword [ebp - 0x274], 0x20
jmp 0x4021fd
mov dword [ebp - 0x274], 0
mov eax, dword [ebp - 0x268]
mov ecx, dword [eax]
mov dword [0x4377d0], ecx
mov edx, dword [eax + 4]
mov dword [0x4377d4], edx
mov ecx, dword [eax + 8]
mov dword [0x4377d8], ecx
mov edx, dword [eax + 0xc]
mov dword [0x4377dc], edx
mov dword [ebp - 0x270], 0x4377d0
push str.D3Z:Ill_use_HAL_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [0x4377bc], 1
jmp 0x402299
mov dword [ebp - 0x27c], 0x800
mov dword [ebp - 0x274], 0x10
mov eax, dword [ebp - 0x198]
mov ecx, dword [eax]
mov dword [0x4377d0], ecx
mov edx, dword [eax + 4]
mov dword [0x4377d4], edx
mov ecx, dword [eax + 8]
mov dword [0x4377d8], ecx
mov edx, dword [eax + 0xc]
mov dword [0x4377dc], edx
mov dword [ebp - 0x270], 0x4377d0
push str.D3Z:Ill_use_HEL_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x4377d0]
push eax
push str.D3Z:DeviceGuid__x_n
lea ecx, [ebp - 0xc8]
push ecx
call fcn.00424218
add esp, 0xc
lea edx, [ebp - 0xc8]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
cmp dword [ebp - 0x274], 0
je 0x40236b
push 0x6c
push 0
lea eax, [ebp - 0x2e8]
push eax
call fcn.004241c0
add esp, 0xc
mov dword [ebp - 0x2e8], 0x6c
lea ecx, [ebp - 0x2e8]
push ecx
mov edx, dword [0x4367f8]
mov eax, dword [edx]
mov ecx, dword [0x4367f8]
push ecx
call dword [eax + 0x58]
mov dword [ebp - 0x2e4], 0x47
mov edx, dword [ebp - 0x27c]
or edx, 0x20000
mov dword [ebp - 0x280], edx
mov eax, dword [ebp - 0x274]
mov dword [ebp - 0x2d0], eax
push 0
push 0x4367fc
lea ecx, [ebp - 0x2e8]
push ecx
mov edx, dword [0x4367e0]
mov eax, dword [edx]
mov ecx, dword [0x4367e0]
push ecx
call dword [eax + 0x18]
mov edx, dword [0x4367fc]
push edx
mov eax, dword [0x4367f8]
mov ecx, dword [eax]
mov edx, dword [0x4367f8]
push edx
call dword [ecx + 0xc]
test eax, eax
je 0x40236b
xor eax, eax
jmp 0x402371
mov eax, dword [ebp - 0x270]
mov esp, ebp
pop ebp
ret