Function at 0x45bd60
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c
mov eax, dword [0x4cf008]
xor eax, esp
mov dword [esp + 0x48], eax
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, edx
push edi
mov edi, ecx
mov dword [esp + 0xc], ebx
mov dword [edi + 0xc], 0
cmp byte [esi], 0
je 0x45c0bd
cmp dword [ebp + 0x14], 0
je 0x45bde8
call fcn.00465820
test al, 0x35
je 0x45bde8
push dword [0x4d6874]
push str.VO_MITSUYOSHI
push esi
call fcn.00477b50
add esp, 0xc
test eax, eax
jne 0x45bdc5
cmp dword [0x4d6878], eax
je 0x45c0bd
mov edx, 1
mov ecx, esi
call fcn.0045b140
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.0046ccad
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 + 0x28], eax
lea eax, [esp + 0x38]
push str._s.mix
push eax
mov dword [esp + 0x1c], ecx
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 + 0x20], eax
cmp eax, 0xffffffff
je 0x45c071
call fcn.00408ab0
lea esi, [edi + 0x4d0]
mov ebx, 8
mov dword [esp + 0xc], esi
mov eax, dword [esi]
test eax, eax
je 0x45be60
push eax
call dword [sym.imp.PAL.dll_PalSoundRelease]
add esp, 4
push 0x44
push 0
push esi
call fcn.0046ed60
add esp, 0xc
add esi, 0x44
sub ebx, 1
jne 0x45be43
xor edx, edx
mov ecx, edi
call fcn.0045b3d0
mov dword [esp + 0x1c], ebx
lea esi, [edi + 0x500]
mov dword [esp + 0x14], ebx
nop
push 0
lea eax, [esp + 0x1c]
push eax
push 0x20
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x18], 0x20
jne 0x45bf9d
mov cl, byte [esp + 0x34]
lea edx, [esp + 0x34]
test cl, cl
je 0x45bec8
jns 0x45beb4
inc edx
jmp 0x45bec0
lea eax, [ecx - 0x61]
cmp al, 0x19
ja 0x45bec0
sub cl, 0x20
mov byte [edx], cl
mov cl, byte [edx + 1]
inc edx
test cl, cl
jne 0x45beaf
push 0
xorps xmm3, xmm3
lea ecx, [esp + 0x38]
mov edx, 1
call fcn.004084f0
add esp, 4
mov dword [esi - 0x30], eax
test eax, eax
jne 0x45bf4b
push eax
call dword [sym.imp.PAL.dll_PalTaskGetTaskData]
add esp, 4
cmp dword [eax + 0x330], 0
je 0x45bf0f
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 [ebp + 0xc]
push 0x20
lea eax, [esp + 0x38]
push eax
lea eax, [esi - 0x20]
push eax
call fcn.00477860
add esp, 0xc
test bl, 2
je 0x45bf37
mov eax, dword [edi + 0xc]
mov ecx, dword [esp + 0x14]
bts eax, ecx
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x1c]
add eax, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
cmp eax, dword [esp + 0x30]
jae 0x45bfb5
jmp 0x45bfa0
mov ebx, dword [ebp + 0xc]
test bl, 0x40
jne 0x45bf64
lea ecx, [esp + 0x34]
mov edx, eax
push ecx
mov ecx, edi
call fcn.0045b600
add esp, 4
test bl, bl
js 0x45bf12
cmp dword [edi + 0x196c], 0
je 0x45bf12
lea eax, [edi + 0xa14]
mov edx, esi
push eax
lea ecx, [esp + 0x38]
call fcn.0045b520
add esp, 4
test eax, eax
je 0x45bf12
mov edx, dword [esi - 0x30]
mov ecx, edi
push esi
call fcn.0045b460
add esp, 4
jmp 0x45bf12
mov ebx, dword [ebp + 0xc]
mov eax, dword [esp + 0x14]
add esi, 0x44
inc eax
mov dword [esp + 0x14], eax
cmp eax, 8
jl 0x45be80
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, 0x100
jne 0x45c012
cmp dword [edi + 0xe2c], 0
je 0x45c012
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 [0x4c1808]
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 + 0xc]
mov eax, dword [eax]
test eax, eax
je 0x45c04c
cmp dword [esp + 0x24], 0
je 0x45c03e
push edi
push dword [esp + 0x14]
push eax
call ebx
add esp, 0xc
jmp 0x45c04c
push dword [esp + 0x10]
push eax
call dword [sym.imp.PAL.dll_PalSoundPlay]
add esp, 8
mov eax, dword [esp + 0xc]
add eax, 0x44
mov dword [esp + 0xc], eax
sub esi, 1
jne 0x45c024
lea eax, [esi + 2]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x48]
xor ecx, esp
call fcn.0046ccad
mov esp, ebp
pop ebp
ret
shl ebx, 4
xorps xmm3, xmm3
add ebx, dword [esp + 0xc]
mov edx, 1
push 0
mov ecx, esi
call fcn.004084f0
add esp, 4
mov dword [edi + ebx*4 + 0x4d0], eax
test eax, eax
jne 0x45c0d1
push eax
call dword [sym.imp.PAL.dll_PalTaskGetTaskData]
add esp, 4
cmp dword [eax + 0x330], 0
je 0x45c0bd
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 + 0x48]
xor ecx, esp
call fcn.0046ccad
mov esp, ebp
pop ebp
ret
push 0x20
lea eax, [edi + 0x4e0]
lea eax, [eax + ebx*4]
push esi
push eax
call fcn.00477860
mov eax, dword [ebp + 0xc]
add esp, 0xc
test al, 0x40
jne 0x45c102
mov edx, dword [edi + ebx*4 + 0x4d0]
mov ecx, edi
push esi
call fcn.0045b600
mov eax, dword [ebp + 0xc]
add esp, 4
test al, al
js 0x45c14b
cmp dword [edi + 0x196c], 0
je 0x45c14b
lea eax, [edi + 0xa14]
mov ecx, esi
lea edx, [edi + 0x500]
lea edx, [edx + ebx*4]
push eax
call fcn.0045b520
add esp, 4
test eax, eax
je 0x45c148
mov edx, dword [edi + ebx*4 + 0x4d0]
lea eax, [edi + 0x500]
lea eax, [eax + ebx*4]
mov ecx, edi
push eax
call fcn.0045b460
add esp, 4
mov eax, dword [ebp + 0xc]
test eax, 0x100
jne 0x45c165
cmp dword [esp + 0xc], 8
je 0x45c165
mov edx, 1
mov ecx, edi
call fcn.00415db0
mov edx, esi
mov ecx, edi
call fcn.0045b3d0
test byte [ebp + 0xc], 2
je 0x45c181
mov eax, dword [edi + 0xc]
mov ecx, dword [esp + 0xc]
bts eax, ecx
mov dword [edi + 0xc], eax
cmp dword [esp + 0x24], 0
mov eax, dword [edi + ebx*4 + 0x4d0]
je 0x45c1b7
push dword [ebp + 0x10]
push dword [esp + 0x14]
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 + 0x48]
xor ecx, esp
call fcn.0046ccad
mov esp, ebp
pop ebp
ret
push dword [esp + 0x10]
push eax
call dword [sym.imp.PAL.dll_PalSoundPlay]
mov ecx, dword [esp + 0x5c]
add esp, 8
mov eax, 2
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0046ccad
mov esp, ebp
pop ebp
ret