Function at 0x4039f0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x208
push ebx
mov ebx, dword [esp + 0x210]
push ebp
push esi
push edi
mov edi, ebx
imul edi, edi, 0xe03f
mov esi, dword [esp + 0x220]
mov eax, dword [ebx*4 + 0x4cf9e0]
add edi, 0x4d1d80
cmp eax, esi
mov dword [esp + 0x10], 0
je 0x403d32
push ebx
call fcn.004039b0
mov eax, dword [0x424744]
add esp, 4
add ebx, 3
test eax, eax
mov dword [edi + 0x2220], ebx
je 0x403c88
shl esi, 8
lea eax, [esp + 0x18]
lea ebx, [esi + 0x435474]
push ebx
push str._s.plx....t
push eax
call fcn.004179d0
add esp, 0xc
mov ebp, dword [sym.imp.KERNEL32.dll_CreateFileA]
lea ecx, [esp + 0x18]
push 0
push 0x80
push 3
push 0
push 0
push DirectSoundCreate
push ecx
call ebp
mov esi, eax
cmp esi, 0xffffffff
jne 0x403ac5
push ebx
lea edx, [esp + 0x1c]
push 0x41e8b8
push edx
call fcn.004179d0
add esp, 0xc
lea eax, [esp + 0x18]
push 0
push 0x80
push 3
push 0
push 0
push DirectSoundCreate
push eax
call ebp
mov esi, eax
cmp esi, 0xffffffff
je 0x403ccc
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x10]
push 0
push edx
push 0x10
push edi
push esi
call ebx
test eax, eax
je 0x403c50
push esi
push edi
call fcn.00403600
add esp, 8
test eax, eax
jne 0x403c50
lea ebp, [edi + 0x4da2]
push 0x2008
push ebp
call fcn.00403300
lea eax, [edi + 0x6daa]
push 0x320
push eax
call fcn.00403300
lea eax, [edi + 0x70ca]
push 0x4b0
push eax
call fcn.00403300
add esp, 0x18
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push eax
push 4
push ecx
push esi
call ebx
test eax, eax
je 0x403c50
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x10]
push 0
push edx
lea ecx, [eax + eax*4]
lea edx, [eax + ecx*8]
shl edx, 1
push edx
push ebp
push esi
call ebx
test eax, eax
je 0x403c50
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x1c]
push 4
push ecx
push esi
call ebx
test eax, eax
je 0x403c50
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x10]
push 0
push edx
lea ecx, [eax*4]
lea eax, [edi + 0x6daa]
push ecx
push eax
push esi
call ebx
test eax, eax
je 0x403c50
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x1c]
push 4
push eax
push esi
call ebx
test eax, eax
je 0x403c50
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [eax + eax*2]
lea eax, [edi + 0x70ca]
shl edx, 1
push edx
push eax
push esi
call ebx
test eax, eax
je 0x403c50
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [edi + 0x223c]
push 0x2b66
push ecx
push esi
call ebx
test eax, eax
je 0x403c50
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [edi + 0x757a]
push 0x74b
push eax
push esi
call ebx
test eax, eax
je 0x403c50
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [edi + 0x7cc5]
push 0x507c
push edx
push esi
call ebx
test eax, eax
je 0x403c50
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [edi + 0xcd41]
push 0x11ac
push ecx
push esi
call ebx
test eax, eax
jne 0x403ce0
lea edx, [esp + 0x18]
lea eax, [esp + 0x118]
push edx
push str.Player_Read_error__s_
push eax
call fcn.004179d0
add esp, 0xc
lea ecx, [esp + 0x118]
push ecx
call fcn.00414880
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
shl esi, 8
add esi, 0x435474
lea ecx, [esp + 0x18]
push esi
push str._s.plx...
push ecx
call fcn.004179d0
add esp, 0xc
lea edx, [esp + 0x18]
push 0
push 0x80
push 3
push 0
push 0
push DirectSoundCreate
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x403ac5
lea eax, [esp + 0x18]
lea ecx, [esp + 0x118]
push eax
push str.Player_Open_error__s_
push ecx
jmp 0x403c62
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x18]
lea eax, [esp + 0x118]
push edx
push 0x41e8d0
push eax
mov dword [edi + 0x2224], 1
call fcn.004179d0
lea ecx, [esp + 0x124]
push 0xdfffff
push ecx
call fcn.00415190
mov eax, dword [esp + 0x230]
mov edx, dword [esp + 0x234]
add esp, 0x14
mov dword [eax*4 + 0x4cf9e0], edx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x208
ret