Function at 0x498480
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x11c
push ebx
push ebp
push esi
lea eax, [esp + 0x94]
push edi
xor ebx, ebx
push eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x9c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x4984da
mov ecx, dword [esp + 0x134]
mov edx, dword [esp + 0x130]
pop edi
pop esi
mov dword [ecx], ebx
mov dword [edx], ebx
pop ebp
pop ebx
add esp, 0x11c
ret
mov eax, dword [esp + 0xa8]
mov edi, dword [esp + 0x134]
cmp eax, 2
jne 0x49858f
mov eax, dword [esp + 0x9c]
mov dword [edi], 2
cmp eax, 4
jae 0x498517
mov eax, dword [esp + 0x130]
pop edi
pop esi
pop ebp
mov dword [eax], ebx
pop ebx
add esp, 0x11c
ret
jne 0x498595
mov ebp, dword [esp + 0x130]
push str.DINPUT.DLL
mov dword [ebp], 0x200
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebx
jne 0x49854e
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, ebx
jne 0x49857d
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
pop edi
mov dword [ebp], 0x300
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov dword [edi], 1
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.DDRAW.DLL
call ebp
mov esi, eax
cmp esi, ebx
jne 0x4985c5
mov ecx, dword [esp + 0x130]
push ebx
mov dword [ecx], ebx
mov dword [edi], ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
push str.DirectDrawCreate
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
jne 0x4985fd
mov edx, dword [esp + 0x130]
push esi
mov dword [edx], ebx
mov dword [edi], ebx
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 ebx
push ecx
push ebx
call eax
test eax, eax
jge 0x498632
mov edx, dword [esp + 0x130]
push esi
mov dword [edx], ebx
mov dword [edi], ebx
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 ebx, dword [esp + 0x130]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
mov dword [ebx], pe_nt_image_headers32
mov ecx, dword [eax]
push edx
push 0x534a60
push eax
call dword [ecx]
test eax, eax
jge 0x49867d
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]
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 [ebx], 0x200
call ebp
mov edi, eax
test edi, edi
jne 0x4986c1
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]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
push str.DirectInputCreateA
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x4986fd
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]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov ebp, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edi
mov dword [ebx], 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 0x49876f
mov edx, dword [eax]
push eax
call dword [edx + 8]
push esi
call ebp
push str.Couldnt_Set_coop_level_r_n
mov dword [ebx], 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 0x4987ae
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push esi
call ebp
push str.Couldnt_CreateSurface_r_n
mov dword [ebx], 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 0x534a40
mov edx, dword [eax]
push eax
call dword [edx]
test eax, eax
jge 0x4987dd
mov eax, dword [esp + 0x10]
push eax
mov edx, dword [eax]
call dword [edx + 8]
push esi
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 [ebx], 0x500
push edx
mov ecx, dword [eax]
push 0x534a30
push eax
call dword [ecx]
test eax, eax
jge 0x498812
mov eax, dword [esp + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push esi
call ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov eax, dword [esp + 0x14]
mov dword [ebx], 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 0x5348e0
push 1
push 0
push 0x5348f0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jge 0x498872
push str.Couldnt_create_CLSID_DirectMusic_r_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret
mov eax, dword [esp + 0x1c]
mov dword [ebx], 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]
test eax, eax
je 0x4988bc
push 0
lea edx, [esp + 0x28]
push 0x534a50
push edx
push 0
call eax
test eax, eax
jl 0x4988bc
mov eax, dword [esp + 0x24]
mov dword [ebx], 0x700
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push esi
call ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x11c
ret