Function at 0x418030
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x44
mov eax, dword [0x4a8f7c]
xor eax, esp
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x48]
push ebp
mov ebp, ecx
cmp dword [ebp + 0x98], 0
push esi
mov dword [esp + 0x10], eax
je 0x418058
call fcn.00417df0
mov ecx, ebp
call fcn.00417b30
push 0
push 0x20
push 3
push 0
push 0
push DirectSoundCreate
push str.sj_spt.dat
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x418095
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.00451800
add esp, 0x44
ret 4
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [esp + 0x10]
push ecx
push 0x10
lea edx, [esp + 0x24]
push edx
push esi
call edi
cmp dword [esp + 0x18], 5
jne 0x4180be
cmp dword [esp + 0x1c], 0x15432
je 0x4180db
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.00451800
add esp, 0x44
ret 4
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
push ebx
neg ecx
or ecx, eax
push ecx
call fcn.00451980
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x41810b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x418277
mov ecx, dword [esp + 0x24]
push 0
lea eax, [esp + 0x14]
push eax
lea edx, [ecx*4]
push edx
push ebx
push esi
call edi
mov eax, dword [ebx]
mov ecx, dword [esp + 0x24]
push 0
push 0
lea edx, [eax + ecx*4 + 0x10]
push edx
push esi
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x14]
push eax
push 0x24
lea ecx, [esp + 0x38]
push ecx
push esi
call edi
push 0
lea edx, [esp + 0x14]
push edx
push 0x4c
push ebp
push esi
call edi
mov eax, dword [esp + 0x18]
push eax
push ebp
call fcn.00453270
add esp, 8
test eax, eax
je 0x4181c8
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
inc ecx
mov dword [esp + 0x14], ecx
cmp ecx, eax
jae 0x418267
mov ecx, dword [ebx + ecx*4]
push 0
push 0
lea edx, [ecx + eax*4 + 0x10]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x14]
push eax
push 0x24
lea ecx, [esp + 0x38]
push ecx
push esi
call edi
push 0
lea edx, [esp + 0x14]
push edx
push 0x4c
push ebp
push esi
call edi
mov eax, dword [esp + 0x18]
push eax
push ebp
call fcn.00453270
add esp, 8
test eax, eax
jne 0x418170
push ebx
call fcn.00451890
add esp, 4
cmp dword [ebp + 0x44], 0
mov dword [esp + 0x14], 0
jbe 0x41823a
nop
mov ecx, ebp
call fcn.00417ac0
push 0
lea ecx, [esp + 0x14]
push ecx
push 8
mov ebx, eax
push ebx
push esi
call edi
test eax, eax
je 0x4180ff
mov edx, dword [ebx + 4]
push edx
call fcn.00451980
add esp, 4
mov dword [ebx + 8], eax
test eax, eax
je 0x4180ff
mov edx, dword [ebx + 4]
push 0
lea ecx, [esp + 0x14]
push ecx
push edx
push eax
push esi
call edi
test eax, eax
je 0x4180ff
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
cmp dword [ebp + 0x44], eax
ja 0x4181e0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
push eax
mov ecx, ebp
call fcn.00417bc0
pop ebx
pop edi
pop esi
mov eax, 1
pop ebp
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.00451800
add esp, 0x44
ret 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.00451890
add esp, 4
mov ecx, dword [esp + 0x50]
pop ebx
pop edi
pop esi
pop ebp
xor ecx, esp
xor eax, eax
call fcn.00451800
add esp, 0x44
ret 4