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

Disassembly:
push 0xffffffffffffffff
push 0x62680a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa6c
mov eax, dword [0x6cd768]
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 [0x6d3130]
push ecx
push str._s__.wav_.wav
push edx
call fcn.005fc86b
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.005fcb04
lea ecx, [esp + 0x284]
mov byte [esp + 0xa84], 1
call fcn.005fcc66
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 0x50144f
lea ecx, [esp + 0x330]
mov byte [esp + 0xa84], 2
call fcn.00603a3c
lea ecx, [esp + 0x284]
mov byte [esp + 0xa84], bl
call fcn.005ff677
lea ecx, [esp + 0x10]
mov dword [esp + 0xa84], 0xffffffff
call fcn.00603a3c
xor al, al
jmp 0x50197d
lea eax, [esp + 0x68]
lea ecx, [esp + 0x284]
push eax
call fcn.005fcd41
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.00603a3c
mov eax, dword [esp + 0x2c]
cmp eax, ebx
jne 0x50149f
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.005e7f83
add esp, 0x14
mov dword [esp + 0x20], ebx
mov dword [esp + 0x28], ebx
mov word [esp + 0x24], bx
mov eax, 0x6a112c
mov byte [esp + 0xa84], 6
test eax, eax
je 0x501618
lea ecx, [esp + 0x47c]
test ecx, ecx
je 0x501618
lea edx, [esp + 0x67c]
test edx, edx
je 0x501618
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.0040e580
lea ecx, [esp + 0x67c]
mov byte [esp + 0xa84], 8
push ecx
lea ecx, [esp + 0x40]
call fcn.0040e580
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.005e71bf
add esp, 4
lea ecx, [esp + 0x54]
mov edi, eax
call fcn.00402400
push eax
call fcn.005e71bf
add esi, edi
lea esi, [eax + esi + 3]
lea ebp, [esi + esi]
push ebp
call fcn.005ffe3f
mov edi, eax
add esp, 8
cmp edi, ebx
mov dword [esp + 0x20], edi
je 0x5015e1
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.005e714f
mov ecx, dword [esp + 0x34]
push ecx
call fcn.005e71bf
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.005e7f83
mov eax, dword [0x6d2324]
add esp, 0x14
cmp eax, ebx
je 0x50168c
mov eax, dword [0x6d2310]
cmp eax, ebx
jne 0x501674
mov eax, 0x6d2314
push eax
lea edx, [esp + 0x80]
push str._sSounds_
push edx
call fcn.005e8107
add esp, 0xc
jmp 0x5016ae
lea eax, [esp + 0x87c]
lea ecx, [esp + 0x60]
push eax
push ecx
lea edx, [esp + 0x84]
push str._s_sSounds_
push edx
call fcn.005e8107
add esp, 0x10
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x5016d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x5016d6
lea ecx, [esp + 0x7c]
push ecx
call fcn.005e920e
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 0x5016f9
lea esi, [esp + 0x24]
mov edx, 0x6a112c
test edx, edx
je 0x501827
lea ecx, [esp + 0x7c]
test ecx, ecx
je 0x501827
cmp esi, ebx
je 0x501827
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.0040e580
push esi
lea ecx, [esp + 0x4c]
mov byte [esp + 0xa88], 0xc
call fcn.0040e580
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.005e71bf
add esp, 4
lea ecx, [esp + 0x54]
mov edi, eax
call fcn.00402400
push eax
call fcn.005e71bf
add esi, edi
lea esi, [eax + esi + 3]
lea ebp, [esi + esi]
push ebp
call fcn.005ffe3f
mov edi, eax
add esp, 8
cmp edi, ebx
mov dword [esp + 0x14], edi
je 0x5017ec
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.005e714f
mov ecx, dword [esp + 0x28]
push ecx
call fcn.005e71bf
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 0x50182f
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or esi, 0xffffffff
cmp eax, esi
jne 0x5018ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x5018ff
mov eax, dword [esp + 0x14]
cmp eax, ebx
mov ecx, eax
jne 0x50185e
lea ecx, [esp + 0x18]
mov eax, dword [esp + 0x2c]
cmp eax, ebx
jne 0x50186a
lea eax, [esp + 0x30]
push ebx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x5018ff
mov edx, dword [0x6d340c]
mov eax, dword [0x6d33f0]
push 0x40
push edx
push eax
mov ecx, ebp
call fcn.00601a97
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.00603a3c
lea ecx, [esp + 0x284]
mov byte [esp + 0xa84], bl
call fcn.005ff677
lea ecx, [esp + 0x10]
mov dword [esp + 0xa84], esi
call fcn.00603a3c
xor al, al
jmp 0x50197d
mov eax, dword [esp + 0x20]
cmp eax, ebx
jne 0x50190b
lea eax, [esp + 0x24]
mov ecx, dword [esp + 0xa8c]
mov edx, dword [ebp + 0xac]
push eax
push ecx
push 1
push edx
call fcn.00500b60
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.0041f2e0
lea ecx, [esp + 0x10]
mov dword [esp + 0xa84], esi
call fcn.00603a3c
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