Function at 0x408d52
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x9d0
cmp dword [esp + 0x9e4], 0
jne 0x408f10
mov eax, edx
mov edx, ecx
lea esi, [esp + 0x774]
mov ecx, esi
push eax
call fcn.0044a454
pop eax
cmp dword [esi], 2
jne 0x408c2c
lea ecx, [esp + 0x774]
call fcn.00403f9e
jmp 0x408f10
lea eax, [esp + 0x518]
push 0x25c
push esi
push eax
call fcn.004f7e80
add esp, 0xc
lea esi, [esp + 0x2c4]
lea edi, [esp + 0x6c]
lea ecx, [esp + 0x2c0]
lea edx, [esp + 0x518]
call fcn.004cf6b0
cmp dword [esp + 0x2c0], 0
je 0x408f04
cmp dword [esp + 0x2c4], 0
jne 0x408c81
mov ecx, esi
call fcn.00403fbc
jmp 0x408c4d
push 0x254
push esi
push edi
call fcn.004f7e80
add esp, 0xc
lea ecx, [esp + 0x2c]
mov edx, edi
call fcn.004cf920
mov ecx, edi
call fcn.004038a5
mov edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x34]
lea ebx, [esp + 0x20]
mov ecx, ebx
mov edx, edi
push ebp
call fcn.004dcfc0
pop eax
mov ecx, ebx
mov edx, str..._2e_2e_2e_2E_2E_2e_2E_2E_2e._2E.._2e._2E._2e_2E
push 2
call fcn.00404abf
pop ecx
test al, al
jne 0x408ce5
lea ecx, [esp + 0x20]
mov edx, 0x57047e
push 1
call fcn.00404abf
pop ecx
test al, al
je 0x408ee7
mov ecx, edi
mov edx, ebp
call fcn.004d0b60
mov ecx, edi
test al, al
je 0x408d0b
mov edx, ebp
push dword [esp + 0x9e8]
push 1
call fcn.00408bea
pop eax
pop ecx
jmp 0x408ee7
mov edx, ebp
call fcn.004d38c0
test al, al
je 0x408ee7
mov ecx, edi
mov edx, ebp
call fcn.004d3450
mov esi, edx
test eax, eax
cmove esi, eax
mov edx, eax
mov eax, str.OutOfRangeImpossibleNotEnoughInvalidTooShortTooLongBadFormat__NonexhaustiveEmpty
cmove edx, eax
lea ecx, [esp + 0x6c]
push esi
call fcn.004dcfc0
pop eax
mov ebx, dword [esp + 0x6c]
mov esi, dword [esp + 0x70]
test ebx, ebx
mov ecx, ebx
cmove ecx, esi
mov edx, dword [esp + 0x74]
push 3
push str..dbuplay::
call fcn.004bab5b
pop ecx
pop edx
mov byte [esp + 3], al
mov ecx, ebx
mov edx, esi
lea esi, [esp + 0x2c4]
call fcn.00403392
cmp byte [esp + 3], 0
je 0x408ee7
mov dword [esp + 0x14], 1
and dword [esp + 0x18], 0
and dword [esp + 0x1c], 0
lea ebx, [esp + 4]
mov ecx, ebx
mov edx, edi
push ebp
call fcn.0044a3d2
pop eax
cmp byte [esp + 4], 4
jne 0x408ecc
mov esi, dword [esp + 8]
mov dword [esp + 0xc], esi
lea ebx, [esp + 0x6c]
mov ecx, ebx
lea edx, [esp + 0xc]
lea eax, [esp + 0x14]
push eax
call fcn.004cf100
pop eax
mov al, byte [esp + 0x6c]
mov byte [esp + 3], al
mov ecx, ebx
call fcn.00403e6a
push esi
lea esi, [esp + 0x2c8]
call dword [sym.imp.kernel32.dll_CloseHandle]
cmp byte [esp + 3], 4
jne 0x408eda
mov dword [esp + 0x6c], str.OutOfRangeImpossibleNotEnoughInvalidTooShortTooLongBadFormat__NonexhaustiveEmpty
mov dword [esp + 0x70], 2
and dword [esp + 0x7c], 0
mov dword [esp + 4], 0x53a1e8
mov eax, fcn.0042ce6a
mov dword [esp + 8], eax
lea ebx, [esp + 4]
mov dword [esp + 0x74], ebx
xor eax, eax
inc eax
mov dword [esp + 0x78], eax
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x6c]
call fcn.004049ac
mov ecx, edi
mov edx, ebp
call fcn.004d3450
test eax, eax
cmove edx, eax
mov ecx, eax
mov ebp, str.OutOfRangeImpossibleNotEnoughInvalidTooShortTooLongBadFormat__NonexhaustiveEmpty
cmove ecx, ebp
call fcn.004031c2
test eax, eax
cmove edx, eax
cmove eax, ebp
mov dword [esp + 4], eax
mov dword [esp + 8], edx
mov dword [esp + 0x6c], 0x50d4c8
xor ecx, ecx
inc ecx
mov dword [esp + 0x70], ecx
and dword [esp + 0x7c], 0
mov dword [esp + 0xc], ebx
mov eax, fcn.0042ce6a
mov dword [esp + 0x10], eax
lea eax, [esp + 0xc]
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], ecx
lea ecx, [esp + 0x54]
lea edx, [esp + 0x6c]
call fcn.004049ac
lea ecx, [esp + 0x60]
lea edx, [esp + 0x14]
call fcn.00405132
mov eax, dword [esp + 0x44]
mov dword [esp + 0x50], eax
movsd xmm0, qword [esp + 0x3c]
movsd qword [esp + 0x48], xmm0
mov ecx, dword [esp + 0x9e8]
lea edx, [esp + 0x48]
call fcn.004049e4
jmp 0x408ee7
mov ecx, ebx
call fcn.00403f02
xor edx, edx
xor ecx, ecx
inc ecx
jmp 0x408ee2
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
call fcn.0043e571
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
call fcn.00403392
mov edx, dword [esp + 0x30]
mov ecx, edi
call fcn.0043e571
jmp 0x408c49
lea ecx, [esp + 0x518]
call fcn.00403478
add esp, 0x9d0
pop esi
pop edi
pop ebx
pop ebp
ret