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

Disassembly:
push 0xffffffffffffffff
push 0x62585a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa6c
mov eax, dword [0x6cc708]
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov dword [esp + 0x38], ebp
mov dword [esp + 0x10], eax
mov edi, str..wav
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x6c]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov dword [esp + 0xa84], ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x6d20c8]
push ecx
push str._s__.wav_.wav
push edx
call fcn.005fb90b
mov eax, dword [esp + 0x1c]
add esp, 0xc
lea ecx, [esp + 0x6c]
push ebp
push eax
push 0x1000
push ebx
push ecx
push 1
lea ecx, [esp + 0x29c]
call fcn.005fbba4
lea ecx, [esp + 0x284]
mov byte [esp + 0xa84], 1
call fcn.005fbd06
mov edx, dword [ebp + 0x1c]
push 1
push ebx
push edx
mov esi, eax
call dword [sym.imp.USER32.dll_InvalidateRect]
cmp esi, 1
je 0x50069f
lea ecx, [esp + 0x330]
mov byte [esp + 0xa84], 2
call fcn.00602ad6
lea ecx, [esp + 0x284]
mov byte [esp + 0xa84], bl
call fcn.005fe717
lea ecx, [esp + 0x10]
mov dword [esp + 0xa84], 0xffffffff
call fcn.00602ad6
xor al, al
jmp 0x500bcd
lea eax, [esp + 0x68]
lea ecx, [esp + 0x284]
push eax
call fcn.005fbde1
mov eax, dword [eax]
push ebx
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0xa8c], 3
mov dword [esp + 0x34], ebx
mov dword [esp + 0x3c], ebx
mov word [esp + 0x38], bx
call fcn.00402e00
lea ecx, [esp + 0x68]
mov byte [esp + 0xa84], 5
call fcn.00602ad6
mov eax, dword [esp + 0x2c]
cmp eax, ebx
jne 0x5006ef
lea eax, [esp + 0x30]
lea ecx, [esp + 0x67c]
lea edx, [esp + 0x47c]
push ecx
push edx
lea ecx, [esp + 0x884]
lea edx, [esp + 0x68]
push ecx
push edx
push eax
call fcn.005e7163
add esp, 0x14
mov dword [esp + 0x20], ebx
mov dword [esp + 0x28], ebx
mov word [esp + 0x24], bx
mov eax, 0x6a012c
mov byte [esp + 0xa84], 6
test eax, eax
je 0x500868
lea ecx, [esp + 0x47c]
test ecx, ecx
je 0x500868
lea edx, [esp + 0x67c]
test edx, edx
je 0x500868
push eax
lea ecx, [esp + 0x4c]
call fcn.00402380
lea eax, [esp + 0x47c]
lea ecx, [esp + 0x54]
push eax
mov byte [esp + 0xa88], 7
call fcn.0040e5a0
lea ecx, [esp + 0x67c]
mov byte [esp + 0xa84], 8
push ecx
lea ecx, [esp + 0x40]
call fcn.0040e5a0
lea ecx, [esp + 0x20]
mov byte [esp + 0xa84], 9
call fcn.00401070
mov esi, dword [esp + 0x50]
lea ecx, [esp + 0x3c]
call fcn.00402400
push eax
call fcn.005e639f
add esp, 4
lea ecx, [esp + 0x54]
mov edi, eax
call fcn.00402400
push eax
call fcn.005e639f
add esi, edi
lea esi, [eax + esi + 3]
lea ebp, [esi + esi]
push ebp
call fcn.005feedc
mov edi, eax
add esp, 8
cmp edi, ebx
mov dword [esp + 0x20], edi
je 0x500831
mov ecx, ebp
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea ecx, [esp + 0x3c]
call fcn.00402400
push eax
lea ecx, [esp + 0x58]
call fcn.00402400
push eax
lea ecx, [esp + 0x50]
call fcn.00402400
push eax
mov eax, dword [esp + 0x2c]
push esi
push eax
call fcn.005e632f
mov ecx, dword [esp + 0x34]
push ecx
call fcn.005e639f
add esp, 0x18
mov dword [esp + 0x28], eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0xa84], 8
call fcn.00401070
lea ecx, [esp + 0x54]
mov byte [esp + 0xa84], 7
call fcn.00401070
lea ecx, [esp + 0x48]
mov byte [esp + 0xa84], 6
call fcn.00401070
mov ebp, dword [esp + 0x38]
lea edx, [esp + 0x7c]
push 0x104
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x67c]
lea ecx, [esp + 0x47c]
push eax
lea edx, [esp + 0x880]
push ecx
lea eax, [esp + 0x68]
push edx
lea ecx, [esp + 0x88]
push eax
push ecx
call fcn.005e7163
mov eax, dword [0x6d12c4]
add esp, 0x14
cmp eax, ebx
je 0x5008dc
mov eax, dword [0x6d12b0]
cmp eax, ebx
jne 0x5008c4
mov eax, 0x6d12b4
push eax
lea edx, [esp + 0x80]
push str._sSounds_
push edx
call fcn.005e72e7
add esp, 0xc
jmp 0x5008fe
lea eax, [esp + 0x87c]
lea ecx, [esp + 0x60]
push eax
push ecx
lea edx, [esp + 0x84]
push str._s_sSounds_
push edx
call fcn.005e72e7
add esp, 0x10
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x500926
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x500926
lea ecx, [esp + 0x7c]
push ecx
call fcn.005e83ee
add esp, 4
xor eax, eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
mov word [esp + 0x18], bx
mov esi, dword [esp + 0x20]
mov byte [esp + 0xa84], 0xa
cmp esi, ebx
jne 0x500949
lea esi, [esp + 0x24]
mov edx, 0x6a012c
test edx, edx
je 0x500a77
lea ecx, [esp + 0x7c]
test ecx, ecx
je 0x500a77
cmp esi, ebx
je 0x500a77
push edx
lea ecx, [esp + 0x40]
call fcn.00402380
lea edx, [esp + 0x7c]
lea ecx, [esp + 0x54]
push edx
mov byte [esp + 0xa88], 0xb
call fcn.0040e5a0
push esi
lea ecx, [esp + 0x4c]
mov byte [esp + 0xa88], 0xc
call fcn.0040e5a0
lea ecx, [esp + 0x14]
mov byte [esp + 0xa84], 0xd
call fcn.00401070
mov esi, dword [esp + 0x44]
lea ecx, [esp + 0x48]
call fcn.00402400
push eax
call fcn.005e639f
add esp, 4
lea ecx, [esp + 0x54]
mov edi, eax
call fcn.00402400
push eax
call fcn.005e639f
add esi, edi
lea esi, [eax + esi + 3]
lea ebp, [esi + esi]
push ebp
call fcn.005feedc
mov edi, eax
add esp, 8
cmp edi, ebx
mov dword [esp + 0x14], edi
je 0x500a3c
mov ecx, ebp
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea ecx, [esp + 0x48]
call fcn.00402400
push eax
lea ecx, [esp + 0x58]
call fcn.00402400
push eax
lea ecx, [esp + 0x44]
call fcn.00402400
push eax
mov eax, dword [esp + 0x20]
push esi
push eax
call fcn.005e632f
mov ecx, dword [esp + 0x28]
push ecx
call fcn.005e639f
add esp, 0x18
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x48]
mov byte [esp + 0xa84], 0xc
call fcn.00401070
lea ecx, [esp + 0x54]
mov byte [esp + 0xa84], 0xb
call fcn.00401070
lea ecx, [esp + 0x3c]
mov byte [esp + 0xa84], 0xa
call fcn.00401070
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x38]
cmp eax, ebx
jne 0x500a7f
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or esi, 0xffffffff
cmp eax, esi
jne 0x500b4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x500b4f
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov ecx, eax
jne 0x500aae
lea ecx, [esp + 0x18]
mov eax, dword [esp + 0x2c]
cmp eax, ebx
jne 0x500aba
lea eax, [esp + 0x30]
push ebx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x500b4f
mov edx, dword [0x6d23a4]
mov eax, dword [0x6d2388]
push 0x40
push edx
push eax
mov ecx, ebp
call fcn.00600b34
lea ecx, [esp + 0x14]
mov byte [esp + 0xa84], 6
call fcn.00401070
lea ecx, [esp + 0x20]
mov byte [esp + 0xa84], 5
call fcn.00401070
lea ecx, [esp + 0x2c]
mov byte [esp + 0xa84], 1
call fcn.00401070
lea ecx, [esp + 0x330]
mov byte [esp + 0xa84], 0xe
call fcn.00602ad6
lea ecx, [esp + 0x284]
mov byte [esp + 0xa84], bl
call fcn.005fe717
lea ecx, [esp + 0x10]
mov dword [esp + 0xa84], esi
call fcn.00602ad6
xor al, al
jmp 0x500bcd
mov eax, dword [esp + 0x20]
cmp eax, ebx
jne 0x500b5b
lea eax, [esp + 0x24]
mov ecx, dword [esp + 0xa8c]
mov edx, dword [ebp + 0xac]
push eax
push ecx
push 1
push edx
call fcn.004ffdb0
add esp, 0x10
lea ecx, [esp + 0x14]
mov byte [esp + 0xa84], 6
call fcn.00401070
lea ecx, [esp + 0x20]
mov byte [esp + 0xa84], 5
call fcn.00401070
lea ecx, [esp + 0x2c]
mov byte [esp + 0xa84], 1
call fcn.00401070
lea ecx, [esp + 0x284]
mov byte [esp + 0xa84], bl
call fcn.0041f300
lea ecx, [esp + 0x10]
mov dword [esp + 0xa84], esi
call fcn.00602ad6
mov al, 1
mov ecx, dword [esp + 0xa7c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xa78
ret 4