Function at 0x401000
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x11c
push ebx
push ebp
push esi
lea eax, [esp + 0x94]
push edi
xor ebp, ebp
push eax
mov dword [esp + 0x14], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x9c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x40105a
mov ecx, dword [esp + 0x134]
mov edx, dword [esp + 0x130]
mov dword [ecx], ebp
mov dword [edx], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov eax, dword [esp + 0xa8]
mov esi, dword [esp + 0x134]
cmp eax, 2
jne 0x40110d
mov eax, dword [esp + 0x9c]
mov dword [esi], 2
cmp eax, 4
jae 0x401097
mov eax, dword [esp + 0x130]
mov dword [eax], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
jne 0x401113
mov ebx, dword [esp + 0x130]
push str.DINPUT.DLL
mov dword [ebx], 0x200
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebp
jne 0x4010cd
push str.Couldnt_LoadLibrary_DInput_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
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 0x4010fc
push str.Couldnt_GetProcAddress_DInputCreate_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov dword [ebx], 0x300
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov dword [esi], 1
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.DDRAW.DLL
call edi
mov ebx, eax
cmp ebx, ebp
jne 0x401143
mov ecx, dword [esp + 0x130]
push ebp
mov dword [ecx], ebp
mov dword [esi], ebp
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov ebp, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.DirectDrawCreate
push ebx
call ebp
test eax, eax
jne 0x40117d
mov edx, dword [esp + 0x130]
push ebx
mov dword [edx], eax
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.Couldnt_LoadLibrary_DDraw_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
lea ecx, [esp + 0x10]
push 0
push ecx
push 0
call eax
test eax, eax
jge 0x4011bc
mov edx, dword [esp + 0x130]
push ebx
mov dword [edx], 0
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.Couldnt_create_DDraw_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov esi, dword [esp + 0x130]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
mov dword [esi], 0x100
mov ecx, dword [eax]
push edx
push 0x404110
push eax
call dword [ecx]
test eax, eax
jge 0x401207
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push str.Couldnt_QI_DDraw2_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov eax, dword [esp + 0x18]
push eax
mov edx, dword [eax]
call dword [edx + 8]
push str.DINPUT.DLL
mov dword [esi], 0x200
call edi
mov edi, eax
test edi, edi
jne 0x40124b
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 ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
push str.DirectInputCreateA
push edi
call ebp
test eax, eax
jne 0x401283
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edi
call esi
push ebx
call esi
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]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov ebp, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edi
mov dword [esi], 0x300
call ebp
mov ecx, 0x1b
xor eax, eax
lea edi, [esp + 0x2c]
push 8
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x30], 0x6c
mov dword [esp + 0x34], 1
mov dword [esp + 0x98], 0x200
mov ecx, dword [eax]
push 0
push eax
call dword [ecx + 0x50]
test eax, eax
mov eax, dword [esp + 0x10]
jge 0x4012f5
mov edx, dword [eax]
push eax
call dword [edx + 8]
push ebx
call ebp
push str.Couldnt_Set_coop_level_r_n
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov ecx, dword [eax]
lea edx, [esp + 0x14]
push 0
push edx
lea edx, [esp + 0x34]
push edx
push eax
call dword [ecx + 0x18]
test eax, eax
jge 0x401334
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push ebx
call ebp
push str.Couldnt_CreateSurface_r_n
mov dword [esi], 0
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x20]
push ecx
push 0x4040f0
mov edx, dword [eax]
push eax
call dword [edx]
test eax, eax
jge 0x401363
mov eax, dword [esp + 0x10]
push eax
mov edx, dword [eax]
call dword [edx + 8]
push ebx
call ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x28]
mov dword [esi], 0x500
push edx
mov ecx, dword [eax]
push 0x4040e0
push eax
call dword [ecx]
test eax, eax
jge 0x401398
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push ebx
call ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov eax, dword [esp + 0x14]
mov dword [esi], 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 0
mov dword [esp + 0x20], 0
call dword [sym.imp.ole32.dll_CoInitialize]
lea edx, [esp + 0x1c]
push edx
push 0x4040c0
push 1
push 0
push 0x4040d0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jge 0x4013f8
push str.Couldnt_create_CLSID_DirectMusic_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push ebx
call ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov eax, dword [esp + 0x1c]
mov dword [esi], 0x601
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
push str.DirectDrawCreateEx
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x401442
push 0
lea edx, [esp + 0x28]
push 0x404100
push edx
push 0
call eax
test eax, eax
jl 0x401442
mov eax, dword [esp + 0x24]
mov dword [esi], 0x700
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push ebx
call ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret