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

Disassembly:
push 0xffffffffffffffff
push 0x5a83cd
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x694
push ebp
push esi
mov ebp, ecx
push edi
mov edi, str..wav
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x320]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x664128]
push ecx
push str._s__.wav_.wav
push edx
call fcn.0056d05a
add esp, 0xc
lea eax, [esp + 0x320]
lea ecx, [esp + 0x1c]
push ebp
push eax
push 0x1000
push 0
push ecx
push 1
lea ecx, [esp + 0x140]
call fcn.00581556
lea ecx, [esp + 0x128]
mov dword [esp + 0x6a8], 0
call fcn.005816b8
mov edx, dword [ebp + 0x1c]
push 1
push 0
push edx
mov esi, eax
call dword [sym.imp.USER32.dll_InvalidateRect]
cmp esi, 1
je 0x4be646
lea ecx, [esp + 0x1d4]
mov dword [esp + 0x6a8], 1
call fcn.005886c0
lea ecx, [esp + 0x128]
mov dword [esp + 0x6a8], 0xffffffff
call fcn.00584297
xor al, al
jmp 0x4be8b7
lea eax, [esp + 0x14]
lea ecx, [esp + 0x128]
push eax
call fcn.00581793
lea ecx, [esp + 0x3a0]
lea edx, [esp + 0x5a0]
push ecx
lea eax, [esp + 0x4a4]
push edx
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push eax
push ecx
push edx
call fcn.0056d0ac
mov eax, dword [0x65ec1c]
add esp, 0x14
mov dword [esp + 0xc], eax
lea ecx, [esp + 0x3a0]
lea edx, [esp + 0x5a0]
push ecx
push edx
lea eax, [esp + 0x14]
push 0x639028
push eax
mov byte [esp + 0x6b8], 3
call fcn.0058148b
add esp, 0x10
lea ecx, [esp + 0x24]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x3a0]
lea eax, [esp + 0x5a0]
push edx
lea ecx, [esp + 0x4a4]
push eax
lea edx, [esp + 0x20]
push ecx
lea eax, [esp + 0x30]
push edx
push eax
call fcn.0056d0ac
mov eax, dword [0x663668]
add esp, 0x14
test eax, eax
je 0x4be71b
mov ecx, dword [0x663660]
lea edx, [esp + 0x24]
push ecx
push str._sSounds_
push edx
call fcn.0056d05a
add esp, 0xc
jmp 0x4be73a
lea eax, [esp + 0x4a0]
lea ecx, [esp + 0x18]
push eax
push ecx
lea edx, [esp + 0x2c]
push str._s_sSounds_
push edx
call fcn.0056d05a
add esp, 0x10
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
lea eax, [esp + 0x24]
push eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xffffffff
jne 0x4be766
call edi
cmp eax, 2
jne 0x4be766
lea ecx, [esp + 0x24]
push ecx
call fcn.0056e502
add esp, 4
mov edx, dword [0x65ec1c]
mov dword [esp + 0x10], edx
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x24]
push eax
push ecx
lea edx, [esp + 0x18]
push 0x639028
push edx
mov byte [esp + 0x6b8], 4
call fcn.0058148b
mov eax, dword [esp + 0x20]
add esp, 0x10
push eax
call esi
or esi, 0xffffffff
cmp eax, esi
jne 0x4be83e
call edi
cmp eax, 2
jne 0x4be83e
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x4be83e
mov eax, dword [0x664434]
mov ecx, dword [0x664418]
push 0x40
push eax
push ecx
mov ecx, ebp
call fcn.005866b4
lea ecx, [esp + 0x10]
mov byte [esp + 0x6a8], 3
call fcn.005886c0
lea ecx, [esp + 0xc]
mov byte [esp + 0x6a8], 2
call fcn.005886c0
lea ecx, [esp + 0x14]
mov byte [esp + 0x6a8], 0
call fcn.005886c0
lea ecx, [esp + 0x1d4]
mov dword [esp + 0x6a8], 5
call fcn.005886c0
lea ecx, [esp + 0x128]
mov dword [esp + 0x6a8], esi
call fcn.00584297
xor al, al
jmp 0x4be8b7
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x6b0]
push edx
push 1
push eax
lea ecx, [ebp + 0x144]
call fcn.005828f2
lea ecx, [esp + 0x10]
mov byte [esp + 0x6a8], 3
call fcn.005886c0
lea ecx, [esp + 0xc]
mov byte [esp + 0x6a8], 2
call fcn.005886c0
lea ecx, [esp + 0x14]
mov byte [esp + 0x6a8], 0
call fcn.005886c0
lea ecx, [esp + 0x1d4]
mov dword [esp + 0x6a8], 6
call fcn.005886c0
lea ecx, [esp + 0x128]
mov dword [esp + 0x6a8], esi
call fcn.00584297
mov al, 1
mov ecx, dword [esp + 0x6a0]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x6a0
ret 4