Function at 0x456a80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x54
mov eax, dword [0x4ca008]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, edx
push edi
mov edi, ecx
mov dword [esp + 0x10], ebx
mov dword [edi + 0xc], 0
cmp byte [esi], 0
je 0x456dd7
cmp dword [ebp + 0x14], 0
je 0x456b08
call fcn.00460020
test al, 0x35
je 0x456b08
push dword [0x4cd458]
push str.VO_MITSUYOSHI
push esi
call fcn.00472040
add esp, 0xc
test eax, eax
jne 0x456ae5
cmp dword [0x4cd5a0], eax
je 0x456dd7
mov edx, 1
mov ecx, esi
call fcn.00455a10
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.00467358
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov ecx, eax
and eax, 4
and ecx, 1
push esi
mov dword [esp + 0x30], eax
lea eax, [esp + 0x40]
push str._s.mix
push eax
mov dword [esp + 0x20], ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.PAL.dll_PalFileCreate]
add esp, 8
mov dword [esp + 0x28], eax
cmp eax, 0xffffffff
je 0x456d8e
call fcn.00408a60
lea eax, [edi + 0x4d0]
mov ebx, 8
mov dword [esp + 0x10], eax
mov esi, eax
mov eax, dword [esi]
test eax, eax
je 0x456b82
push eax
call dword [sym.imp.PAL.dll_PalSoundRelease]
add esp, 4
push 0x44
push 0
push esi
call fcn.00469410
add esp, 0xc
add esi, 0x44
sub ebx, 1
jne 0x456b65
xor edx, edx
mov ecx, edi
call fcn.00455ca0
lea eax, [edi + 0x4d0]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x18], ebx
mov esi, eax
mov dword [esp + 0x1c], eax
push 0
lea eax, [esp + 0x24]
push eax
push 0x20
lea eax, [esp + 0x48]
push eax
push dword [esp + 0x38]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x20], 0x20
jne 0x456cb6
mov cl, byte [esp + 0x3c]
lea edx, [esp + 0x3c]
test cl, cl
je 0x456bef
jns 0x456bdb
inc edx
jmp 0x456be7
lea eax, [ecx - 0x61]
cmp al, 0x19
ja 0x456be7
sub cl, 0x20
mov byte [edx], cl
mov cl, byte [edx + 1]
inc edx
test cl, cl
jne 0x456bd6
push 0
mov edx, 1
lea ecx, [esp + 0x40]
call fcn.004084e0
add esp, 4
mov dword [esi], eax
test eax, eax
jne 0x456c37
push eax
call dword [sym.imp.PAL.dll_PalTaskGetTaskData]
add esp, 4
cmp dword [eax + 0x330], 0
je 0x456c32
lea eax, [esp + 0x3c]
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 [ebp + 0xc]
jmp 0x456c90
mov ebx, dword [ebp + 0xc]
test bl, 0x40
jne 0x456c50
lea ecx, [esp + 0x3c]
mov edx, eax
push ecx
mov ecx, edi
call fcn.00455ed0
add esp, 4
test bl, bl
js 0x456c90
cmp dword [edi + 0x196c], 0
je 0x456c90
lea eax, [edi + 0xa14]
add esi, 0x30
push eax
mov edx, esi
lea ecx, [esp + 0x40]
call fcn.00455df0
add esp, 4
test eax, eax
je 0x456c8c
push esi
mov esi, dword [esp + 0x20]
mov ecx, edi
mov edx, dword [esi]
call fcn.00455d30
add esp, 4
jmp 0x456c90
mov esi, dword [esp + 0x1c]
test bl, 2
je 0x456ca2
mov eax, dword [edi + 0xc]
mov ecx, dword [esp + 0x18]
bts eax, ecx
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x24]
add eax, dword [esp + 0x20]
mov dword [esp + 0x24], eax
cmp eax, dword [esp + 0x38]
jae 0x456cd2
jmp 0x456cb9
mov ebx, dword [ebp + 0xc]
mov eax, dword [esp + 0x18]
add esi, 0x44
inc eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], eax
cmp eax, 8
jl 0x456ba7
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, 0x100
jne 0x456d2f
cmp dword [edi + 0xe2c], 0
je 0x456d2f
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 [0x4bbfb0]
mulss xmm1, xmm0
cvttss2si eax, xmm1
imul eax, dword [edi + 0xcb4]
push eax
call dword [sym.imp.PAL.dll_PalSoundSetVolume]
add esp, 8
mov edi, dword [ebp + 0x10]
mov esi, 8
mov ebx, dword [sym.imp.PAL.dll_PalSoundPlayFade]
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
test eax, eax
je 0x456d69
cmp dword [esp + 0x2c], 0
je 0x456d5b
push edi
push dword [esp + 0x18]
push eax
call ebx
add esp, 0xc
jmp 0x456d69
push dword [esp + 0x14]
push eax
call dword [sym.imp.PAL.dll_PalSoundPlay]
add esp, 8
mov eax, dword [esp + 0x10]
add eax, 0x44
mov dword [esp + 0x10], eax
sub esi, 1
jne 0x456d41
lea eax, [esi + 2]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.00467358
mov esp, ebp
pop ebp
ret
shl ebx, 4
mov edx, 1
add ebx, dword [esp + 0x10]
mov ecx, esi
push 0
call fcn.004084e0
add esp, 4
mov dword [edi + ebx*4 + 0x4d0], eax
test eax, eax
jne 0x456deb
push eax
call dword [sym.imp.PAL.dll_PalTaskGetTaskData]
add esp, 4
cmp dword [eax + 0x330], 0
je 0x456dd7
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 + 0x50]
xor ecx, esp
call fcn.00467358
mov esp, ebp
pop ebp
ret
test byte [ebp + 0xc], 0x40
jne 0x456dfe
push esi
mov edx, eax
mov ecx, edi
call fcn.00455ed0
add esp, 4
mov eax, dword [ebp + 0xc]
test al, al
js 0x456e4a
cmp dword [edi + 0x196c], 0
je 0x456e4a
lea eax, [edi + 0xa14]
mov ecx, esi
lea edx, [edi + 0x500]
lea edx, [edx + ebx*4]
push eax
call fcn.00455df0
add esp, 4
test eax, eax
je 0x456e47
mov edx, dword [edi + ebx*4 + 0x4d0]
lea eax, [edi + 0x500]
lea eax, [eax + ebx*4]
mov ecx, edi
push eax
call fcn.00455d30
add esp, 4
mov eax, dword [ebp + 0xc]
test eax, 0x100
jne 0x456e64
cmp dword [esp + 0x10], 8
je 0x456e64
mov edx, 1
mov ecx, edi
call fcn.00415610
mov edx, esi
mov ecx, edi
call fcn.00455ca0
test byte [ebp + 0xc], 2
je 0x456e80
mov eax, dword [edi + 0xc]
mov ecx, dword [esp + 0x10]
bts eax, ecx
mov dword [edi + 0xc], eax
cmp dword [esp + 0x2c], 0
mov eax, dword [edi + ebx*4 + 0x4d0]
je 0x456eb6
push dword [ebp + 0x10]
push dword [esp + 0x18]
push eax
call dword [sym.imp.PAL.dll_PalSoundPlayFade]
add esp, 0xc
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.00467358
mov esp, ebp
pop ebp
ret
push dword [esp + 0x14]
push eax
call dword [sym.imp.PAL.dll_PalSoundPlay]
mov ecx, dword [esp + 0x64]
add esp, 8
mov eax, 2
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00467358
mov esp, ebp
pop ebp
ret