Function at 0x417c20
Capabilities:
Check if file exists
Copy file
Delete file
Get file attributes

Disassembly:
sub esp, 0x1fc
mov eax, dword [str.mix_____.wav]
mov ecx, dword [0x427ef8]
mov edx, dword [0x427efc]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x210]
xor esi, esi
mov dword [esp + 0x2c], eax
mov al, byte [0x427f00]
cmp edi, esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], edx
mov byte [esp + 0x38], al
mov dword [esp + 0x18], esi
mov dword [esp + 0x24], esi
jne 0x417ca6
mov edi, dword [esp + 0x214]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x417c8b
lea ecx, [esp + 0x2c]
push esi
push ecx
jmp 0x418144
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1fc
ret
mov esi, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
lea eax, [esp + 0xcc]
push eax
push edi
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_FindClose]
cmp eax, 0xffffffff
je 0x417cd0
mov ecx, dword [esp + 0xec]
push eax
mov dword [esp + 0x20], ecx
call ebp
mov ebx, dword [esp + 0x214]
lea edx, [esp + 0xcc]
push edx
push ebx
call esi
cmp eax, 0xffffffff
je 0x41813d
push eax
call ebp
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0xec]
cmp ebp, eax
push 0
jbe 0x417d07
lea eax, [esp + 0x30]
push eax
push edi
jmp 0x417d0d
lea ecx, [esp + 0x30]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov esi, dword [sym.imp.WINMM.dll_mmioOpenA]
push 0x10002
lea edx, [esp + 0x30]
push 0
push edx
call esi
test eax, eax
mov dword [esp + 0x20], eax
je 0x418130
mov eax, dword [esp + 0xec]
push 0x10000
cmp ebp, eax
push 0
push edi
jbe 0x417d79
call esi
test eax, eax
mov dword [esp + 0x14], eax
je 0x418107
push 0x10000
push 0
push ebx
call esi
test eax, eax
mov dword [esp + 0x10], eax
je 0x418107
fild dword [esp + 0x218]
fmul qword [0x41f450]
jmp 0x417db0
call esi
test eax, eax
mov dword [esp + 0x10], eax
je 0x418107
push 0x10000
push 0
push ebx
call esi
test eax, eax
mov dword [esp + 0x14], eax
je 0x418107
fild dword [esp + 0x218]
fmul qword [0x41f450]
fsubr qword [0x41f410]
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.WINMM.dll_mmioDescend]
fstp qword [esp + 0x3c]
push 0x20
lea eax, [esp + 0xa8]
push 0
mov edi, 0x45564157
push eax
push ecx
mov dword [esp + 0xbc], edi
call esi
test eax, eax
jne 0x418107
push 0x20
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x84]
push edx
push eax
mov dword [esp + 0x94], edi
call esi
test eax, eax
jne 0x418107
mov edx, dword [esp + 0x20]
push 0x20
lea ecx, [esp + 0xbc]
push eax
push ecx
push edx
mov dword [esp + 0xd0], edi
call esi
test eax, eax
jne 0x418107
mov edx, dword [esp + 0x14]
lea eax, [esp + 0xa4]
push 0x10
lea ecx, [esp + 0x50]
push eax
mov edi, 0x20746d66
push ecx
push edx
mov dword [esp + 0x5c], edi
call esi
test eax, eax
jne 0x418107
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x7c]
push 0x10
lea ecx, [esp + 0x64]
push eax
push ecx
push edx
mov dword [esp + 0x70], edi
call esi
test eax, eax
jne 0x418107
mov eax, dword [esp + 0x50]
mov esi, eax
and eax, 0xffff
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
mov dword [esp + 0x1c], edi
je 0x418107
mov ebx, dword [esp + 0x14]
push esi
push edi
push ebx
call dword [sym.imp.WINMM.dll_mmioRead]
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp eax, esi
jne 0x4180f9
cmp word [edi], 1
jne 0x4180f9
mov eax, dword [esp + 0x64]
mov esi, eax
and eax, 0xffff
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [esp + 0x18], eax
je 0x4180f9
mov ecx, dword [esp + 0x10]
push esi
push eax
push ecx
call dword [sym.imp.WINMM.dll_mmioRead]
cmp eax, esi
jne 0x4180f9
mov edx, dword [esp + 0x18]
cmp word [edx], 1
jne 0x4180f9
mov esi, dword [sym.imp.WINMM.dll_mmioAscend]
lea eax, [esp + 0x4c]
push 0
push eax
push ebx
call esi
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x60]
push 0
push ecx
push edx
call esi
lea eax, [esp + 0xa4]
push 0x10
lea ecx, [esp + 0x50]
push eax
push ecx
push ebx
mov dword [esp + 0x5c], 0x61746164
call dword [sym.imp.WINMM.dll_mmioDescend]
test eax, eax
jne 0x4180f9
mov edi, dword [esp + 0x50]
test edi, edi
je 0x4180f5
mov edx, dword [esp + 0x1c]
push edx
call ebp
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x4180f5
push edi
push esi
push ebx
call dword [sym.imp.WINMM.dll_mmioRead]
cmp eax, edi
jne 0x4180e7
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x7c]
push 0x10
lea ecx, [esp + 0x64]
push eax
push ecx
push ebx
mov dword [esp + 0x70], 0x61746164
call dword [sym.imp.WINMM.dll_mmioDescend]
test eax, eax
jne 0x4180e7
mov edi, dword [esp + 0x64]
test edi, edi
je 0x4180e7
mov edx, dword [esp + 0x18]
push edx
call ebp
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [esp + 0x24], eax
je 0x4180e7
push edi
push eax
push ebx
call dword [sym.imp.WINMM.dll_mmioRead]
cmp eax, edi
jne 0x4180e7
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0xb8]
push 0x10
lea edx, [esp + 0x94]
push ecx
push edx
push eax
mov dword [esp + 0xa0], 0x61746164
call dword [sym.imp.WINMM.dll_mmioDescend]
test eax, eax
jne 0x4180e7
mov eax, dword [esp + 0x94]
test eax, eax
mov dword [esp + 0x44], eax
je 0x4180e7
mov eax, dword [esp + 0x50]
xor ebx, ebx
test eax, eax
mov edi, esi
jbe 0x41807f
mov eax, dword [esp + 0x24]
fld qword [0x41f410]
fsub qword [esp + 0x3c]
sub eax, esi
mov dword [esp + 0x48], eax
jmp 0x418037
mov eax, dword [esp + 0x48]
movsx ecx, byte [edi]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x64]
fild dword [esp + 0x28]
cmp ebx, ecx
fst qword [esp + 0x74]
jae 0x41805c
movsx edx, byte [eax + edi]
fstp st(0)
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
fld st(1)
fmul st(1)
fld qword [esp + 0x74]
fmul qword [esp + 0x3c]
faddp st(1)
call fcn.004188fc
mov byte [edi], al
mov eax, dword [esp + 0x50]
inc edi
inc ebx
cmp ebx, eax
fstp st(0)
jb 0x418033
fstp st(0)
mov eax, dword [esp + 0x9c]
mov ebx, dword [esp + 0x20]
push 0
push eax
push ebx
call dword [sym.imp.WINMM.dll_mmioSeek]
mov edi, dword [esp + 0x44]
push edi
push esi
push ebx
call dword [sym.imp.WINMM.dll_mmioWrite]
cmp eax, edi
jne 0x4180e7
mov edi, ebx
push 0x10
push edi
call dword [sym.imp.WINMM.dll_mmioFlush]
push esi
call ebp
mov ecx, dword [esp + 0x24]
push ecx
call ebp
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.WINMM.dll_mmioClose]
push 0
push edx
call esi
mov eax, dword [esp + 0x10]
push 0
push eax
call esi
push 0
push edi
call esi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1fc
ret
push esi
call ebp
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4180f5
push eax
call ebp
mov edi, dword [esp + 0x1c]
push edi
call ebp
mov eax, dword [esp + 0x18]
test eax, eax
je 0x418107
push eax
call ebp
mov ecx, dword [esp + 0x20]
mov esi, dword [sym.imp.WINMM.dll_mmioClose]
push 0
push ecx
call esi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x418123
push 0
push eax
call esi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x418130
push 0
push eax
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1fc
ret
lea edx, [esp + 0x2c]
push 0
push edx
push edi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1fc
ret