Function at 0x405e90
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
mov eax, 0x2ef4
call fcn.004c5100
mov eax, dword [0x533840]
xor eax, esp
mov dword [esp + 0x2ef0], eax
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [edi + 0x328]
test ecx, ecx
je 0x406473
mov eax, dword [ecx + 0x1c]
sub eax, dword [ecx + 0xc]
je 0x406473
mov ecx, 0x597b48
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405ed5
sub ecx, edx
lea eax, [ecx - 1]
neg ecx
sbb ecx, ecx
and ecx, eax
add ecx, 0x597b48
cmp ecx, 0x597b48
je 0x405f0b
mov dl, byte [ecx - 1]
cmp dl, 0x5c
je 0x405f0b
cmp dl, 0x2f
je 0x405f0b
dec ecx
cmp ecx, 0x597b48
jne 0x405ef5
sub ecx, 0x597b48
lea eax, [esp + 0x1b8]
mov esi, 0x102
cmp ecx, esi
cmovl esi, ecx
push esi
push 0x597b48
push eax
call fcn.004c6400
add esp, 0xc
mov byte [esp + esi + 0x1b8], 0
test esi, esi
je 0x405f5c
lea eax, [esp + 0x1b8]
push eax
lea eax, [esp + 0xb4]
push str._sVoiceData
push eax
call fcn.00405a20
add esp, 0xc
jmp 0x405f71
lea eax, [esp + 0xb0]
push str.VoiceData
push eax
call fcn.00405a20
add esp, 8
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea eax, [esp + 0xb0]
push eax
call esi
cmp eax, 0xffffffff
jne 0x405fa0
lea eax, [esp + 0xb0]
push eax
call fcn.004cff7f
add esp, 4
lea eax, [esp + 0xb0]
push eax
call esi
test eax, eax
jne 0x405ff1
mov esi, dword [edi + 0x328]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov byte [esi + 0x14], al
mov dword [esi + 0x20], eax
mov dword [esi + 0x1c], 0xffffffff
test byte [esi + 0x15], 8
jne 0x40642c
cmp dword [esi + 4], 1
jge 0x406420
mov eax, dword [esi + 0x28]
mov ecx, esi
push 1
call eax
test al, al
jne 0x406420
mov al, byte [esi + 0x14]
or al, 1
and al, 0xfe
mov byte [esi + 0x14], al
jmp 0x40642c
push 0x597c50
lea eax, [esp + 0xb4]
push eax
lea eax, [esp + 0x2c8]
push str._s_s
push eax
call fcn.00405a20
add esp, 0x10
lea eax, [esp + 0x2c0]
push eax
call esi
lea ecx, [edi + 0x110]
lea edx, [esp + 0x4c]
sub edx, ecx
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x406030
lea ecx, [esp + 0x4c]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406044
sub ecx, edx
lea eax, [esp + 0x4c]
add ecx, eax
cmp ecx, eax
jb 0x406089
mov al, byte [ecx]
cmp al, 0x5c
je 0x40607d
cmp al, 0x2f
je 0x40607d
cmp al, 0x3a
je 0x40607d
cmp al, 0x2a
je 0x40607d
cmp al, 0x3f
je 0x40607d
cmp al, 0x3e
je 0x40607d
cmp al, 0x3c
je 0x40607d
cmp al, 0x22
je 0x40607d
cmp al, 0x7c
jne 0x406080
mov byte [ecx], 0x5f
dec ecx
lea eax, [esp + 0x4c]
cmp ecx, eax
jae 0x406057
movss xmm0, dword [0x5979c8]
lea eax, [esp + 0x4c]
sub esp, 8
cvtps2pd xmm0, xmm0
movsd qword [esp], xmm0
push 0x597c50
push eax
lea eax, [esp + 0xc0]
push eax
lea eax, [esp + 0x6f4]
push str._s_s__s__.3f.wav
push eax
call fcn.00405a20
mov edx, dword [edi + 0x328]
add esp, 0x1c
cmp dword [edx + 0x1c], 0
mov al, byte [edx + 0x14]
mov dword [edx + 0xc], 0
jge 0x4060e0
or al, 2
mov byte [edx + 0x14], al
jmp 0x4060fe
mov ecx, dword [edx + 0x20]
and al, 0xfd
mov byte [edx + 0x14], al
test ecx, ecx
jg 0x4060f5
mov eax, dword [edx + 4]
add eax, ecx
test eax, eax
jg 0x4060fe
mov eax, dword [edx + 0x24]
mov ecx, edx
push 0xffffffffffffffff
call eax
lea ecx, [edi + 0x130]
lea edx, [esp + 0x74]
sub edx, ecx
nop word [eax + eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x406110
xor edx, edx
nop
mov al, byte [esp + edx + 0x74]
cmp al, 0x5c
je 0x406148
cmp al, 0x2f
je 0x406148
cmp al, 0x3a
je 0x406148
cmp al, 0x2a
je 0x406148
cmp al, 0x3f
je 0x406148
cmp al, 0x3e
je 0x406148
cmp al, 0x3c
je 0x406148
cmp al, 0x22
je 0x406148
cmp al, 0x7c
jne 0x40614d
mov byte [esp + edx + 0x74], 0x5f
lea ecx, [esp + 0x74]
inc edx
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406155
sub ecx, esi
cmp edx, ecx
jbe 0x406120
movss xmm0, dword [0x5979c8]
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0x78]
push eax
cvtps2pd xmm0, xmm0
sub esp, 8
lea eax, [esp + 0xc0]
movsd qword [esp], xmm0
push 0x597c50
push eax
lea eax, [esp + 0x5f0]
push str._s_s___.3f__s__s.mp3
push eax
call fcn.00405a20
add esp, 0x20
call fcn.004cabe7
mov edx, dword [edi + 0x328]
cmp dword [edx + 0x1c], 0
mov al, byte [edx + 0x14]
mov dword [edx + 0xc], 0
jge 0x4061c3
or al, 2
mov byte [edx + 0x14], al
jmp 0x4061e1
mov ecx, dword [edx + 0x20]
and al, 0xfd
mov byte [edx + 0x14], al
test ecx, ecx
jg 0x4061d8
mov eax, dword [edx + 4]
add eax, ecx
test eax, eax
jg 0x4061e1
mov eax, dword [edx + 0x24]
mov ecx, edx
push 0xffffffffffffffff
call eax
push 0x597c50
lea eax, [esp + 0x4d4]
push str._s.dem
push eax
call fcn.00405a20
add esp, 0xc
lea eax, [edi + 0x110]
push eax
lea eax, [edi + 0x130]
push eax
lea eax, [esp + 0x3d0]
push str.__s___s
push eax
call fcn.00405a20
call fcn.00491830
push dword [edi + 0x320]
mov ebx, eax
push ebx
call fcn.00493d40
push 1
push ebx
call fcn.00493e80
push 3
push ebx
call fcn.00493e20
push ebx
call fcn.00493ff0
add esp, 0x2c
push ebx
call fcn.00494320
add esp, 4
lea eax, [esp + 0x3c8]
push eax
push ebx
call fcn.00494240
lea eax, [esp + 0x4d8]
push eax
push ebx
call fcn.00494160
push 0
push ebx
call fcn.00493fd0
push 3
push ebx
call fcn.00493b30
push 0x140
push ebx
call fcn.00493b90
push 0x140
push ebx
call fcn.00493bc0
push 0x140
push ebx
call fcn.00493b60
push 0
push ebx
call fcn.00493c70
add esp, 0x40
push ebx
call fcn.00491b40
mov ecx, dword [edi + 0x328]
add esp, 4
mov eax, dword [ecx + 0x1c]
sub eax, dword [ecx + 0xc]
cdq
sub eax, edx
sar eax, 1
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [0x52d798]
addsd xmm0, qword [0x52d820]
cvttsd2si esi, xmm0
push esi
call fcn.004c43b5
mov ecx, dword [edi + 0x328]
add esp, 4
mov dword [esp + 0x44], eax
mov edx, dword [ecx + 0xc]
mov eax, dword [ecx + 0x1c]
sub eax, edx
sub edx, dword [ecx + 0x20]
mov ecx, dword [ecx]
add ecx, edx
cdq
push esi
push dword [esp + 0x48]
sub eax, edx
sar eax, 1
push eax
push ecx
push ecx
push ebx
call fcn.00491440
add esp, 0x18
mov dword [esp + 0x48], eax
test eax, eax
jle 0x4063c0
lea eax, [esp + 0x5d8]
push 0x52b26c
push eax
call fcn.004c9665
add esp, 8
mov esi, eax
call fcn.004cabe7
test esi, esi
je 0x4063ab
push 0x2710
lea eax, [esp + 0x7ec]
push eax
push ebx
call fcn.00494930
add esp, 0xc
push esi
push 1
push eax
lea eax, [esp + 0x7f4]
push eax
call fcn.004ca908
push esi
push 1
push dword [esp + 0x60]
push dword [esp + 0x60]
call fcn.004ca908
push 0x2710
lea eax, [esp + 0x80c]
push eax
push ebx
call fcn.00494740
add esp, 0x2c
push esi
push 1
push eax
lea eax, [esp + 0x7f4]
push eax
call fcn.004ca908
push esi
call fcn.004c9888
add esp, 0x14
jmp 0x4063c0
lea eax, [esp + 0x6e0]
push eax
push str.Cant_create___s__n
call fcn.00405870
add esp, 8
push ebx
call fcn.00491130
add esp, 4
push dword [esp + 0x44]
call fcn.004c43be
mov esi, dword [edi + 0x328]
add esp, 4
test byte [esi + 0x15], 8
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov byte [esi + 0x14], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x1c], 0xffffffff
jne 0x40642c
cmp dword [esi + 4], 1
jge 0x406420
mov eax, dword [esi + 0x28]
mov ecx, esi
push 1
call eax
test al, al
jne 0x406420
mov al, byte [esi + 0x14]
or al, 1
and al, 0xfe
mov byte [esi + 0x14], al
jmp 0x40642c
mov ecx, dword [esi]
mov eax, dword [esi + 0x10]
sub ecx, dword [esi + 0x20]
mov byte [ecx + eax], 0
mov eax, dword [esi + 0x10]
mov dword [esi + 0x1c], eax
mov esi, dword [edi + 0x328]
test esi, esi
je 0x406469
cmp dword [esi + 8], 0
jl 0x40645e
mov eax, dword [esi]
test eax, eax
je 0x406457
push eax
call fcn.004d0f81
add esp, 4
mov dword [esi], 0
mov dword [esi + 4], 0
push 0x30
push esi
call fcn.004c45c0
add esp, 8
mov dword [edi + 0x328], 0
mov ecx, dword [esp + 0x2efc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004c43a7
mov esp, ebp
pop ebp
ret