Function at 0x411ac0
Capabilities:
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x43652c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x144
push ebx
push ebp
push esi
lea eax, [esp + 0xbc]
push edi
xor ebp, ebp
mov dword [esp + 0x40], ecx
push eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x34], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0xc4], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x411b2d
mov ecx, dword [esp + 0x168]
mov edx, dword [esp + 0x164]
mov dword [ecx], ebp
mov dword [edx], ebp
jmp 0x41204b
mov eax, dword [esp + 0xd0]
mov edi, dword [esp + 0x168]
cmp eax, 2
jne 0x411bc8
mov eax, dword [esp + 0xc4]
mov dword [edi], 2
cmp eax, 4
jae 0x411b64
mov eax, dword [esp + 0x164]
mov dword [eax], ebp
jmp 0x41204b
jne 0x411bce
mov ebx, dword [esp + 0x164]
push str.DINPUT.DLL
mov dword [ebx], 0x200
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebp
jne 0x411b94
push str.Couldnt_LoadLibrary_DInput_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x41204b
push str.DirectInputCreateA
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp edi, ebp
jne 0x411bbd
push str.Couldnt_GetProcAddress_DInputCreate_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x41204b
mov dword [ebx], 0x300
jmp 0x41204b
mov dword [edi], 1
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.DDRAW.DLL
call ebx
mov esi, eax
cmp esi, ebp
mov dword [esp + 0x38], esi
jne 0x411bfc
mov ecx, dword [esp + 0x164]
push ebp
mov dword [ecx], ebp
mov dword [edi], ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x41204b
push str.DirectDrawCreate
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebp
jne 0x411c2e
mov edx, dword [esp + 0x164]
push esi
mov dword [edx], ebp
mov dword [edi], ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.Couldnt_LoadLibrary_DDraw_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x41204b
lea ecx, [esp + 0x10]
push ebp
push ecx
push ebp
call eax
test eax, eax
jge 0x411c5d
mov edx, dword [esp + 0x164]
push esi
mov dword [edx], ebp
mov dword [edi], ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.Couldnt_create_DDraw_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x41204b
mov ebp, dword [esp + 0x164]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x30]
mov dword [ebp], 0x100
mov ecx, dword [eax]
push edx
push 0x439ab8
push eax
call dword [ecx]
test eax, eax
jge 0x411ca3
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.Couldnt_QI_DDraw2_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x41204b
mov eax, dword [esp + 0x30]
push eax
mov edx, dword [eax]
call dword [edx + 8]
push str.DINPUT.DLL
mov dword [ebp], 0x200
call ebx
mov edi, eax
test edi, edi
jne 0x411ce2
push str.Couldnt_LoadLibrary_DInput_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x41204b
push str.DirectInputCreateA
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x411d18
push edi
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call edi
push esi
call edi
mov eax, dword [esp + 0x10]
push eax
mov edx, dword [eax]
call dword [edx + 8]
push str.Couldnt_GetProcAddress_DInputCreate_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x41204b
mov ebx, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edi
mov dword [ebp], 0x300
call ebx
mov ecx, 0x1b
xor eax, eax
lea edi, [esp + 0x54]
push 8
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x14]
xor edi, edi
mov dword [esp + 0x58], 0x6c
mov dword [esp + 0x5c], 1
mov dword [esp + 0xc0], 0x200
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x50]
test eax, eax
mov eax, dword [esp + 0x10]
jge 0x411d83
mov edx, dword [eax]
push eax
call dword [edx + 8]
push esi
call ebx
push str.Couldnt_Set_coop_level_r_n
mov dword [ebp], edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x41204b
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edi
push edx
lea edx, [esp + 0x5c]
push edx
push eax
call dword [ecx + 0x18]
test eax, eax
jge 0x411db8
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push esi
call ebx
push str.Couldnt_CreateSurface_r_n
mov dword [ebp], edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x41204b
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x3c]
push ecx
push 0x439a98
mov edx, dword [eax]
push eax
call dword [edx]
test eax, eax
jge 0x411de1
mov eax, dword [esp + 0x10]
push eax
mov edx, dword [eax]
call dword [edx + 8]
push esi
call ebx
jmp 0x41204b
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x34]
mov dword [ebp], 0x500
push edx
mov ecx, dword [eax]
push 0x439a88
push eax
call dword [ecx]
test eax, eax
jge 0x411e11
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push esi
call ebx
jmp 0x41204b
mov eax, dword [esp + 0x18]
mov dword [ebp], 0x600
push eax
mov edx, dword [eax]
call dword [edx + 8]
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push edi
mov dword [esp + 0x28], edi
call dword [sym.imp.ole32.dll_CoInitialize]
lea edx, [esp + 0x24]
push edx
push 0x439a68
push 1
push edi
push 0x439a78
call dword [sym.imp.ole32.dll_CoCreateInstance]
cmp eax, edi
jge 0x411e66
push str.Couldnt_create_CLSID_DirectMusic_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call ebx
jmp 0x41204b
mov eax, dword [esp + 0x24]
mov dword [ebp], 0x601
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
push str.DirectDrawCreateEx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, edi
jne 0x411e95
push esi
call ebx
jmp 0x41204b
push edi
lea edx, [esp + 0x48]
push 0x439aa8
push edx
push edi
call eax
test eax, eax
jge 0x411eaf
push esi
call ebx
jmp 0x41204b
mov eax, dword [esp + 0x44]
mov dword [ebp], 0x700
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov esi, dword [esp + 0x40]
mov ecx, esi
call fcn.00412490
add esi, 0x14
lea ecx, [esp + 0x14]
push esi
call fcn.0042b5cb
push edi
push 0x453700
lea ecx, [esp + 0x1c]
mov dword [esp + 0x164], edi
call fcn.004266c9
mov edi, eax
lea ecx, [esp + 0x14]
lea ebx, [edi + 1]
push ebx
push 0x453700
call fcn.004266c9
mov esi, eax
lea ecx, [esp + 0x14]
lea eax, [esi + 1]
push eax
push 0x453700
call fcn.004266c9
push edi
lea edx, [esp + 0x20]
push 0
push edx
lea ecx, [esp + 0x20]
mov dword [esp + 0x5c], eax
call fcn.0042650f
mov eax, esi
lea ecx, [esp + 0x28]
sub eax, edi
mov byte [esp + 0x15c], 1
dec eax
push eax
push ebx
push ecx
lea ecx, [esp + 0x20]
call fcn.0042650f
mov edi, dword [esp + 0x50]
lea eax, [esi + 1]
mov edx, edi
lea ecx, [esp + 0x14]
sub edx, esi
mov byte [esp + 0x15c], 2
dec edx
push edx
push eax
lea eax, [esp + 0x28]
push eax
call fcn.0042650f
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x2c]
mov byte [esp + 0x15c], 3
mov eax, dword [ecx - 8]
lea ecx, [esp + 0x14]
sub eax, esi
dec eax
inc edi
push eax
push edi
push edx
call fcn.0042650f
mov eax, dword [esp + 0x1c]
push eax
call fcn.004169b3
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.004169b3
mov esi, eax
mov edx, dword [esp + 0x28]
push edx
call fcn.004169b3
mov eax, dword [esp + 0x38]
push eax
call fcn.004169b3
add esp, 0x10
cmp esi, 7
jne 0x411fda
cmp eax, 0x2cc
jne 0x411fd1
mov dword [ebp], 0x701
jmp 0x411fda
jle 0x411fda
mov dword [ebp], 0x702
push str.D3D8.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x411ff0
mov dword [ebp], 0x800
mov ecx, dword [esp + 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 0x2c]
call fcn.0042b856
lea ecx, [esp + 0x20]
mov byte [esp + 0x15c], 2
call fcn.0042b856
lea ecx, [esp + 0x28]
mov byte [esp + 0x15c], 1
call fcn.0042b856
lea ecx, [esp + 0x1c]
mov byte [esp + 0x15c], 0
call fcn.0042b856
lea ecx, [esp + 0x14]
mov dword [esp + 0x15c], 0xffffffff
call fcn.0042b856
mov ecx, dword [esp + 0x154]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x150
ret 8