Function at 0x445260
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88c
mov eax, dword [0x490540]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0xc]
push ebx
mov ebx, dword [0x491b20]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x870], ebx
cmp dword [ebx + 0xd597fc], 1
jne 0x4452ad
push dword [ebp + 0x10]
push ecx
push edi
call fcn.00444880
add esp, 0xc
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00456922
mov esp, ebp
pop ebp
ret
test byte [ebx + 0x15bec5c], 0x80
jne 0x4452c8
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00456922
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x10]
push esi
cmp edx, 0xffffffff
je 0x445722
cmp edx, 0xfffffffe
je 0x445722
lea eax, [ebx + 0xdbdfc0]
mov dword [ebp - 0x87c], eax
lea eax, [ebp - 0x87c]
push edx
push eax
push ecx
call fcn.00439970
add esp, 0xc
test eax, eax
jne 0x445326
push eax
push str.ERROR
push str.sound_file_read_failed
push eax
call fcn.00439f60
add esp, 0x10
xor eax, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00456922
mov esp, ebp
pop ebp
ret
mov eax, edi
sub eax, 0
je 0x4453b5
dec eax
je 0x445381
sub eax, 2
jne 0x44536d
mov ecx, dword [ebx + 0xd597f4]
lea eax, [ebx + 0xd597e4]
mov dword [ebp - 0x86c], eax
add ebx, 0x96f7d8
mov eax, dword [eax]
add eax, ecx
add ebx, eax
lea eax, [ecx + 1]
mov ecx, dword [ebp - 0x870]
and eax, 0x1fff
mov dword [ecx + 0xd597f4], eax
jmp 0x4453e7
mov eax, dword [ebp - 0x878]
mov ebx, dword [ebp - 0x878]
mov dword [ebp - 0x86c], eax
jmp 0x4453e7
mov ecx, dword [ebx + 0xd597ec]
lea eax, [ebx + 0xd597dc]
mov dword [ebp - 0x86c], eax
add ebx, 0x5857d8
mov eax, dword [eax]
add eax, ecx
add ebx, eax
lea eax, [ecx + 1]
mov ecx, dword [ebp - 0x870]
and eax, 0x1fff
mov dword [ecx + 0xd597ec], eax
jmp 0x4453e7
mov edx, dword [ebx + 0xd597e8]
lea eax, [ebx + 0xd597d8]
lea ecx, [ebx + 0x19b7d8]
mov dword [ebp - 0x86c], eax
mov ebx, dword [eax]
add ecx, edx
add ebx, ecx
mov ecx, dword [ebp - 0x870]
lea eax, [edx + 1]
and eax, 0x1fff
mov dword [ecx + 0xd597e8], eax
mov edx, dword [ebp - 0x87c]
xor ecx, ecx
xor esi, esi
mov dword [ebp - 0x874], ebx
mov dword [ebp - 0x884], ecx
movsx eax, byte [edx]
mov dword [ebp - 0x878], eax
test eax, eax
jle 0x445616
mov edi, edi
mov eax, dword [0x491b20]
add eax, 0x11bdfc0
mov dword [ebp - 0x888], eax
lea eax, [ebp - 0x880]
push eax
lea eax, [ebp - 0x888]
push eax
push ecx
push edx
call fcn.004395e0
add esp, 0x10
test eax, eax
je 0x4456f9
mov ecx, dword [ebp - 0x880]
cmp edi, 3
ja case.default.0x44544b
jmp dword [edi*4 + 0x445900]
mov eax, dword [ebp - 0x86c]
mov eax, dword [eax]
add eax, ecx
cmp eax, 0x3ea000
jb case.default.0x44544b
push 0
push str.ERROR
push str.BGM_Buffer_Overflow
jmp 0x44560c
mov eax, dword [ebp - 0x86c]
mov eax, dword [eax]
add eax, ecx
cmp eax, 0x3ea000
jb case.default.0x44544b
push 0
push str.ERROR
push str.SE_Buffer_Overflow
jmp 0x44560c
mov eax, dword [ebp - 0x86c]
mov eax, dword [eax]
add eax, ecx
cmp eax, 0x3ea000
jae 0x445600
push ecx
push dword [ebp - 0x888]
push ebx
call fcn.004580b0
add esp, 0xc
cmp esi, 0x40
jge 0x4454e7
mov ecx, dword [ebp - 0x870]
mov eax, edi
shl eax, 6
add eax, esi
add ecx, 0x19b3b8
lea eax, [ecx + eax*4]
cmp dword [eax], 0
je 0x4454e4
inc esi
add eax, 4
cmp esi, 0x40
jl 0x4454d6
cmp esi, 0x40
je 0x4456d0
push 0x350
lea eax, [ebp - 0x868]
push 0
push eax
call fcn.00456940
mov eax, dword [ebp - 0x880]
lea edx, [ebp - 0x868]
mov ecx, dword [ebp - 0x870]
add esp, 0xc
movdqu xmm0, xmmword [0x476a70]
mov dword [ebp - 0x528], eax
mov eax, edi
shl eax, 6
add eax, 0x66cee
mov dword [ebp - 0x520], ebx
add eax, esi
mov dword [ebp - 0x868], 0x350
movdqu xmmword [ebp - 0x850], xmm0
mov dword [ebp - 0x864], 0x402
mov dword [ebp - 0x524], 0
lea ebx, [ecx + eax*4]
mov eax, dword [ecx + 0x19b3b4]
push ebx
push 0x476a50
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
test eax, eax
js 0x4456a7
mov ebx, dword [ebx]
mov ecx, dword [ebp - 0x86c]
mov eax, dword [ebp - 0x880]
add dword [ebp - 0x874], eax
add dword [ecx], eax
lea ecx, [ebp - 0x88c]
mov eax, dword [ebx]
push ecx
push ebx
call dword [eax + 0xc]
test eax, eax
js 0x44567e
cmp dword [ebp - 0x88c], 1
je 0x4455c4
mov eax, dword [ebx]
push 0
push 0
push 0
push 0xffffffffffffffff
push 0x476a60
push ebx
call dword [eax + 0x4c]
test eax, eax
js 0x44562c
mov ecx, dword [ebp - 0x870]
mov eax, dword [ebx]
push dword [ecx + 0x19b3b0]
push ebx
call dword [eax + 0x74]
test eax, eax
js 0x445655
mov ecx, dword [ebp - 0x884]
inc ecx
mov dword [ebp - 0x884], ecx
cmp ecx, dword [ebp - 0x878]
jge 0x445616
mov edx, dword [ebp - 0x87c]
mov ebx, dword [ebp - 0x874]
jmp 0x445410
push 0
push str.ERROR
push str.VOICE_Buffer_Overflow
push 0
call fcn.00439f60
add esp, 0x10
pop esi
pop edi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00456922
mov esp, ebp
pop ebp
ret
push 0
push str.ERROR
push str.sound_midi_set_failed
push 0
call fcn.00439f60
add esp, 0x10
xor eax, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00456922
mov esp, ebp
pop ebp
ret
push 0
push str.ERROR
push str.sound_band_load_failed
push 0
call fcn.00439f60
add esp, 0x10
xor eax, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00456922
mov esp, ebp
pop ebp
ret
push 0
push str.ERROR
push str.sound_getlength_failed
push 0
call fcn.00439f60
add esp, 0x10
xor eax, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00456922
mov esp, ebp
pop ebp
ret
push 0
push str.ERROR
push str.sound_get_object_failed
push 0
call fcn.00439f60
add esp, 0x10
xor eax, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00456922
mov esp, ebp
pop ebp
ret
push 0
push str.ERROR
push str.sound_segment_overflow
push 0
call fcn.00439f60
add esp, 0x10
xor eax, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00456922
mov esp, ebp
pop ebp
ret
push 0
push str.ERROR
push str.sound_file_decode_failed
push 0
call fcn.00439f60
add esp, 0x10
xor eax, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00456922
mov esp, ebp
pop ebp
ret
xor esi, esi
lea edx, [ebx + 0x19b3b8]
shl edi, 6
lea edx, [edx + edi*4]
cmp dword [edx], 0
je 0x445774
lea eax, [edi + esi]
cmp dword [ebx + eax*4 + 0x19b3bc], 0
je 0x445773
lea eax, [edi + esi]
cmp dword [ebx + eax*4 + 0x19b3c0], 0
je 0x44576e
lea eax, [edi + esi]
cmp dword [ebx + eax*4 + 0x19b3c4], 0
je 0x445769
add esi, 4
add edx, 0x10
cmp esi, 0x40
jl 0x445730
jmp 0x445774
add esi, 3
jmp 0x445774
add esi, 2
jmp 0x445774
inc esi
cmp esi, 0x40
jne 0x4457a2
push 0
push str.ERROR
push str.sound_load_segment_error
push 0
call fcn.00439f60
add esp, 0x10
xor eax, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00456922
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x108]
sub edx, ecx
lea ebx, [ebx]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x4457b0
push 0x208
lea eax, [ebp - 0x310]
push 0
push eax
call fcn.00456940
add esp, 0xc
lea eax, [ebp - 0x310]
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x108]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edx, dword [0x491b20]
add edx, 0x15be7fc
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x878], eax
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x445810
sub ecx, dword [ebp - 0x878]
lea eax, [ebp - 0x518]
push 0x104
push eax
push ecx
push edx
push 8
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp dword [ebp + 0x10], 0xffffffff
jne 0x445848
lea eax, [ebp - 0x518]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [edi + 0x66cee]
add eax, esi
lea edx, [ebp - 0x310]
lea esi, [ebx + eax*4]
mov eax, dword [ebx + 0x19b3b4]
push esi
push edx
push 0x476a50
mov ecx, dword [eax]
push 0x476a70
push eax
call dword [ecx + 0x38]
test eax, eax
jns 0x4458c0
lea eax, [ebp - 0x310]
push eax
mov eax, dword [0x491b20]
add eax, 0x15bdffc
push str.sound_load_object_error_n_file_s
push eax
call fcn.0042fe70
mov eax, dword [0x491b20]
push 0
push str.ERROR
add eax, 0x15bdffc
push eax
push 0
call fcn.00439f60
add esp, 0x1c
xor eax, eax
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00456922
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
push dword [ebx + 0x19b3b0]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x74]
test eax, eax
jns 0x445616
push 0
push str.ERROR
push str.sound_load_band_error
push 0
call fcn.00439f60
mov ecx, dword [ebp - 4]
add esp, 0x10
xor ecx, ebp
xor eax, eax
pop esi
pop edi
pop ebx
call fcn.00456922
mov esp, ebp
pop ebp
ret