Function at 0x45f510
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
mov eax, dword [0x50b070]
xor eax, esp
mov dword [esp + 0x68], eax
mov eax, dword [ecx + 0xc]
push ebx
mov ebx, dword [ecx + 4]
push esi
mov esi, dword [ecx + 8]
push edi
mov edi, dword [ecx]
mov dword [esp + 0x10], eax
lea eax, [esp + 0x54]
push esi
push eax
mov dword [esp + 0x1c], ebx
mov dword [edi + 0xc], 0
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
call dword [sym.imp.WINMM.dll_timeGetTime]
push esi
lea eax, [esp + 0x38]
push str._s.mix
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.PAL.dll_PalFileCreate]
add esp, 8
mov dword [esp + 0x24], eax
cmp eax, 0xffffffff
je 0x45f778
call fcn.00408b10
lea esi, [edi + 0x4d0]
mov ebx, 8
mov dword [esp + 0x14], esi
nop dword [eax + eax]
mov eax, dword [esi]
test eax, eax
je 0x45f5bd
push eax
call dword [sym.imp.PAL.dll_PalSoundRelease]
add esp, 4
push 0x44
push 0
push esi
call fcn.0048cf70
add esp, 0xc
add esi, 0x44
sub ebx, 1
jne 0x45f5a0
xor edx, edx
mov ecx, edi
call fcn.0045cd30
mov dword [esp + 0x20], ebx
lea esi, [edi + 0x4d0]
mov dword [esp + 0x18], ebx
nop dword [eax]
push 0
lea eax, [esp + 0x20]
push eax
push 0x20
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x1c], 0x20
jne 0x45f6f1
mov cl, byte [esp + 0x34]
lea edx, [esp + 0x34]
test cl, cl
je 0x45f628
jns 0x45f614
inc edx
jmp 0x45f620
lea eax, [ecx - 0x61]
cmp al, 0x19
ja 0x45f620
sub cl, 0x20
mov byte [edx], cl
mov cl, byte [edx + 1]
inc edx
test cl, cl
jne 0x45f60f
push 0
mov edx, 1
lea ecx, [esp + 0x38]
call fcn.00408590
add esp, 4
mov dword [esi], eax
test eax, eax
jne 0x45f671
push eax
call dword [sym.imp.PAL.dll_PalTaskGetTaskData]
add esp, 4
cmp dword [eax + 0x330], 0
je 0x45f66b
lea eax, [esp + 0x34]
push eax
push str.voice_file_read_:__s
push 0
push 0
call dword [sym.imp.PAL.dll_PalDebugPrintf]
add esp, 0x10
mov ebx, dword [esp + 0x10]
jmp 0x45f6cb
mov ebx, dword [esp + 0x10]
test bl, 0x40
jne 0x45f68b
lea ecx, [esp + 0x34]
mov edx, eax
push ecx
mov ecx, edi
call fcn.0045cf60
add esp, 4
test bl, bl
js 0x45f6cb
cmp dword [edi + 0x196c], 0
je 0x45f6cb
lea eax, [edi + 0xa14]
add esi, 0x30
push eax
mov edx, esi
lea ecx, [esp + 0x38]
call fcn.0045ce80
add esp, 4
test eax, eax
je 0x45f6c7
push esi
mov esi, dword [esp + 0x18]
mov ecx, edi
mov edx, dword [esi]
call fcn.0045cdc0
add esp, 4
jmp 0x45f6cb
mov esi, dword [esp + 0x14]
test bl, 2
je 0x45f6dd
mov eax, dword [edi + 0xc]
mov ecx, dword [esp + 0x18]
bts eax, ecx
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
cmp eax, dword [esp + 0x30]
jae 0x45f70e
jmp 0x45f6f5
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
add esi, 0x44
inc eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], eax
cmp eax, 8
jl 0x45f5e0
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, 0x100
jne 0x45f86a
cmp dword [edi + 0xe2c], 0
je 0x45f86a
mov eax, dword [edi + 0xe34]
imul eax, dword [edi + 0xe30]
movd xmm0, dword [edi + 0xc98]
cvtdq2ps xmm0, xmm0
push 3
movd xmm1, eax
cvtdq2ps xmm1, xmm1
mulss xmm1, dword [0x4fbef0]
mulss xmm1, xmm0
cvttss2si eax, xmm1
imul eax, dword [edi + 0xcb4]
push eax
call dword [sym.imp.PAL.dll_PalSoundSetVolume]
add esp, 8
jmp 0x45f86a
shl ebx, 4
mov edx, 1
add ebx, dword [esp + 0x14]
mov ecx, esi
push 0
call fcn.00408590
add esp, 4
mov dword [edi + ebx*4 + 0x4d0], eax
test eax, eax
jne 0x45f7d5
push eax
call dword [sym.imp.PAL.dll_PalTaskGetTaskData]
add esp, 4
cmp dword [eax + 0x330], 0
je 0x45f7c1
push esi
push str.voice_file_read_:__s
push 0
push 0
call dword [sym.imp.PAL.dll_PalDebugPrintf]
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.0048a3ac
mov esp, ebp
pop ebp
ret
test byte [esp + 0x10], 0x40
jne 0x45f7e9
push esi
mov edx, eax
mov ecx, edi
call fcn.0045cf60
add esp, 4
test byte [esp + 0x10], 0x80
jne 0x45f832
cmp dword [edi + 0x196c], 0
je 0x45f832
lea eax, [edi + 0xa14]
mov ecx, esi
lea edx, [edi + 0x500]
lea edx, [edx + ebx*4]
push eax
call fcn.0045ce80
add esp, 4
test eax, eax
je 0x45f832
mov edx, dword [edi + ebx*4 + 0x4d0]
lea eax, [edi + 0x500]
lea eax, [eax + ebx*4]
mov ecx, edi
push eax
call fcn.0045cdc0
add esp, 4
test dword [esp + 0x10], 0x100
mov ebx, dword [esp + 0x14]
jne 0x45f851
cmp ebx, 8
je 0x45f851
mov edx, 1
mov ecx, edi
call fcn.004157e0
mov edx, esi
mov ecx, edi
call fcn.0045cd30
test byte [esp + 0x10], 2
je 0x45f86a
mov eax, dword [edi + 0xc]
bts eax, ebx
mov dword [edi + 0xc], eax
mov ecx, dword [esp + 0x74]
mov eax, 2
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0048a3ac
mov esp, ebp
pop ebp
ret