Function at 0x499160
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4ca570
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x517b6c]
xor eax, esp
mov dword [esp + 0x5c], eax
push esi
mov eax, dword [0x517b6c]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov dword [esp + 0x20], vtable.CWNDHDL.0
xor esi, esi
mov dword [esp + 0x70], esi
xor eax, eax
mov dword [esp + 0x48], vtable.CDXVER.0
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov byte [esp + 0x70], 1
lea ecx, [esp + 0x48]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov word [esp + 0x1c], ax
call fcn.004993f0
test eax, eax
jne 0x499213
lea ecx, [esp + 0x48]
call fcn.00499650
cmp dword [esp + 0x4c], 8
jge 0x499237
push 0x2010
push 0x4ecc08
push str.DirectX
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x49939b
push 0x53c4a8
push 0x4d4458
push 3
push esi
push 0x4d4468
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jge 0x499270
push 0x2010
push str.CDSOUND::Init
push 0x4ecf74
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x49939b
mov eax, dword [0x53c4a8]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x28]
push esi
push eax
call edx
test eax, eax
jge 0x49929f
push 0x2010
push str.CDSOUND::Init
push 0x4ecfa0
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x49939b
mov eax, dword [0x53c4a8]
mov edx, dword [0x51bea0]
mov ecx, dword [eax]
push 2
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
test eax, eax
jge 0x4992f0
mov eax, dword [0x53c4a8]
mov edx, dword [0x51bea0]
mov ecx, dword [eax]
push 1
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
test eax, eax
jge 0x4992f0
push 0x2010
push str.CDSOUND::Init
push 0x4ecfd0
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x49939b
mov eax, dword [0x53c4a8]
push esi
push 0x53c4a4
lea edx, [esp + 0x2c]
mov dword [esp + 0x2c], 0x24
mov dword [esp + 0x30], 1
mov dword [esp + 0x34], esi
mov dword [esp + 0x3c], esi
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
test eax, eax
jge 0x49933e
push 0x2010
push str.CDSOUND::Init
push 0x4ecff8
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
jmp 0x49939b
mov eax, dword [0x53c4a4]
lea edx, [esp + 0xc]
mov word [esp + 0xc], 1
mov word [esp + 0xe], 2
mov dword [esp + 0x10], 0xac44
mov word [esp + 0x1a], 0x10
mov word [esp + 0x18], 4
mov dword [esp + 0x14], 0x2b110
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x38]
call eax
test eax, eax
jge 0x499396
push 0x2010
push str.CDSOUND::Init
push str.DirectSound
push esi
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 1
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [esp + 0x5c]
xor ecx, esp
call fcn.004acfa0
add esp, 0x6c
ret