Function at 0x40db08
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
push edi
xor edi, edi
push str.DDRAW.DLL
mov dword [ebp - 4], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x18], edi
call esi
cmp eax, edi
mov dword [ebp - 8], eax
je 0x40db7b
mov ebx, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push str.DirectDrawCreate
push eax
call ebx
cmp eax, edi
jne 0x40db5b
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
push str.Couldnt_LoadLibrary_DDraw_r_n
jmp 0x40db75
lea ecx, [ebp - 4]
push edi
push ecx
push edi
call eax
test eax, eax
jge 0x40db82
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
push str.Couldnt_create_DDraw_r_n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
xor eax, eax
jmp 0x40ddae
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x14]
push edx
push 0x40f424
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jge 0x40dbbe
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
push str.Couldnt_QI_DDraw2_r_n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
mov eax, 0x100
jmp 0x40ddae
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push str.DINPUT.DLL
call esi
mov esi, eax
cmp esi, edi
jne 0x40dbea
push str.Couldnt_LoadLibrary_DInput_r_n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x40dc18
push str.DirectInputCreateA
push esi
call ebx
test eax, eax
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_FreeLibrary]
jne 0x40dc22
call esi
push dword [ebp - 8]
call esi
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push str.Couldnt_GetProcAddress_DInputCreate_r_n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
mov eax, 0x200
jmp 0x40ddae
call esi
push 0x6c
lea eax, [ebp - 0x8c]
pop ebx
push ebx
push eax
call fcn.0040e664
mov eax, dword [ebp - 4]
pop ecx
pop ecx
mov dword [ebp - 0x8c], ebx
push 1
mov dword [ebp - 0x24], 0x200
pop ebx
mov dword [ebp - 0x88], ebx
mov ecx, dword [eax]
push 8
push edi
push eax
call dword [ecx + 0x50]
test eax, eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
jge 0x40dc71
push eax
call dword [ecx + 8]
push dword [ebp - 8]
call esi
push str.Couldnt_Set_coop_level_r_n
jmp 0x40dc98
lea edx, [ebp - 0xc]
push edi
push edx
lea edx, [ebp - 0x8c]
push edx
push eax
call dword [ecx + 0x18]
test eax, eax
jge 0x40dca8
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push dword [ebp - 8]
call esi
push str.Couldnt_CreateSurface_r_n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
mov eax, 0x301
jmp 0x40ddae
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 0x20]
push edx
push 0x40f404
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jge 0x40dcd0
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov edi, 0x300
jmp 0x40dd98
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 0x18]
push edx
push 0x40f3f4
mov ecx, dword [eax]
push eax
call dword [ecx]
test eax, eax
jge 0x40dcf8
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov edi, 0x500
jmp 0x40dd98
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push edi
mov dword [ebp - 0x10], edi
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [ebp - 0x10]
push eax
push 0x40f3d4
push ebx
push edi
push 0x40f3e4
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jge 0x40dd40
push str.Couldnt_create_CLSID_DirectMusic_r_n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
mov edi, 0x600
jmp 0x40dd98
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
call dword [sym.imp.ole32.dll_CoUninitialize]
push str.DirectDrawCreateEx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
cmp eax, edi
jne 0x40dd68
mov edi, 0x601
jmp 0x40dd98
push edi
lea ecx, [ebp - 0x1c]
push 0x40f414
push ecx
push edi
call eax
test eax, eax
jl 0x40dd61
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push str.D3D8.DLL
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov ebx, eax
cmp ebx, edi
jne 0x40dda1
mov edi, 0x700
push dword [ebp - 8]
call esi
mov eax, edi
jmp 0x40ddae
push dword [ebp - 8]
call esi
push ebx
call esi
mov eax, 0x800
pop edi
pop esi
pop ebx
leave
ret