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

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x64a939
push eax
mov eax, 0x13dc
mov dword fs:[0], esp
call fcn.00609d40
mov eax, dword [0x6f7b78]
push ebx
mov ebx, ecx
push esi
push edi
mov dword [esp + 0x40], ebx
mov dword [esp + 0xc], eax
lea ecx, [esp + 0x64]
xor edi, edi
push 0x6e52d0
push ecx
mov dword [esp + 0x13f8], edi
call fcn.00609a95
mov edx, dword [0x6fd998]
add esp, 8
lea eax, [esp + 0xc]
push edx
push str._s__.wav_.wav
push eax
call fcn.0061fae1
mov ecx, dword [esp + 0x18]
add esp, 0xc
lea edx, [esp + 0x64]
push ebx
push ecx
push 0x1000
push edi
push edx
push 1
lea ecx, [esp + 0x8a4]
call fcn.00426e60
lea ecx, [esp + 0x88c]
mov byte [esp + 0x13f0], 1
call fcn.00426ff0
mov esi, eax
mov eax, dword [ebx + 0x1c]
push 1
push edi
push eax
call dword [sym.imp.USER32.dll_InvalidateRect]
cmp esi, 1
je 0x516ad2
lea ecx, [esp + 0xc]
mov dword [esp + 0x88c], 0x658840
mov dword [esp + 0x13f0], 0xffffffff
call fcn.00622d8a
xor al, al
jmp 0x516fe5
lea ecx, [esp + 0x88c]
call fcn.00427070
push eax
lea ecx, [esp + 0x2c]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x34], edi
mov word [esp + 0x30], di
call fcn.00401f20
mov eax, dword [esp + 0x28]
cmp eax, edi
jne 0x516b01
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x28c]
push ebp
lea edx, [esp + 0x490]
push ecx
push edx
lea ecx, [esp + 0x698]
lea edx, [esp + 0x68]
push ecx
push edx
push eax
call fcn.0060a943
add esp, 0x14
mov dword [esp + 0x20], edi
mov dword [esp + 0x28], edi
mov word [esp + 0x24], di
mov eax, 0x6c900c
test eax, eax
je 0x516c83
lea ecx, [esp + 0x490]
test ecx, ecx
je 0x516c83
lea edx, [esp + 0x290]
test edx, edx
je 0x516c83
lea ecx, [esp + 0x38]
call fcn.004027c0
push edi
push 0x6c900c
lea ecx, [esp + 0x40]
mov byte [esp + 0x13fc], 4
call fcn.004027e0
lea eax, [esp + 0x490]
lea ecx, [esp + 0x54]
push eax
call fcn.00401ee0
lea ecx, [esp + 0x290]
mov bl, 5
push ecx
lea ecx, [esp + 0x4c]
mov byte [esp + 0x13f8], bl
call fcn.00401ee0
lea ecx, [esp + 0x20]
mov byte [esp + 0x13f4], 6
call fcn.00401070
mov esi, dword [esp + 0x40]
lea ecx, [esp + 0x48]
call fcn.00401f10
push eax
call fcn.00609a4e
add esp, 4
lea ecx, [esp + 0x54]
mov edi, eax
call fcn.00401f10
push eax
call fcn.00609a4e
add esi, edi
lea esi, [eax + esi + 3]
lea ebp, [esi + esi]
push ebp
call fcn.00622acb
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x20], edi
je 0x516c4b
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.00401f10
push eax
lea ecx, [esp + 0x58]
call fcn.00401f10
push eax
lea ecx, [esp + 0x40]
call fcn.00401f10
push eax
mov eax, dword [esp + 0x2c]
push esi
push eax
call fcn.006099de
mov ecx, dword [esp + 0x34]
push ecx
call fcn.00609a4e
add esp, 0x18
mov dword [esp + 0x28], eax
lea ecx, [esp + 0x48]
mov byte [esp + 0x13f4], bl
call fcn.00401070
lea ecx, [esp + 0x54]
mov byte [esp + 0x13f4], 4
call fcn.00401070
lea ecx, [esp + 0x38]
mov byte [esp + 0x13f4], 3
call fcn.00401070
mov ebx, dword [esp + 0x44]
xor edi, edi
lea edx, [esp + 0x88]
push 0x104
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x290]
lea ecx, [esp + 0x490]
push eax
lea edx, [esp + 0x694]
push ecx
lea eax, [esp + 0x68]
push edx
lea ecx, [esp + 0x94]
push eax
push ecx
call fcn.0060a943
mov eax, dword [0x6fcacc]
add esp, 0x14
cmp eax, edi
je 0x516cfa
mov eax, dword [0x6fca48]
cmp eax, edi
jne 0x516ce2
mov eax, 0x6fca4c
push eax
lea edx, [esp + 0x8c]
push str._sSounds_
push edx
call fcn.0060aac7
add esp, 0xc
jmp 0x516d1c
lea eax, [esp + 0x690]
lea ecx, [esp + 0x60]
push eax
push ecx
lea edx, [esp + 0x90]
push str._s_sSounds_
push edx
call fcn.0060aac7
add esp, 0x10
lea eax, [esp + 0x88]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x516d4a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x516d4a
lea ecx, [esp + 0x88]
push ecx
call fcn.0060bc6e
add esp, 4
xor eax, eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], eax
mov word [esp + 0x18], di
mov esi, dword [esp + 0x20]
mov byte [esp + 0x13f4], 7
cmp esi, edi
jne 0x516d6d
lea esi, [esp + 0x24]
mov edx, 0x6c900c
test edx, edx
je 0x516eb1
lea ecx, [esp + 0x88]
test ecx, ecx
je 0x516eb1
cmp esi, edi
je 0x516eb1
lea ecx, [esp + 0x38]
call fcn.004027c0
push edi
push 0x6c900c
lea ecx, [esp + 0x40]
mov byte [esp + 0x13fc], 8
call fcn.004027e0
lea edx, [esp + 0x88]
lea ecx, [esp + 0x48]
push edx
call fcn.00401ee0
mov bl, 9
push esi
lea ecx, [esp + 0x58]
mov byte [esp + 0x13f8], bl
call fcn.00401ee0
lea ecx, [esp + 0x14]
mov byte [esp + 0x13f4], 0xa
call fcn.00401070
mov esi, dword [esp + 0x40]
lea ecx, [esp + 0x54]
call fcn.00401f10
push eax
call fcn.00609a4e
add esp, 4
lea ecx, [esp + 0x48]
mov edi, eax
call fcn.00401f10
push eax
call fcn.00609a4e
add esi, edi
lea esi, [eax + esi + 3]
lea ebp, [esi + esi]
push ebp
call fcn.00622acb
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x14], edi
je 0x516e75
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 + 0x54]
call fcn.00401f10
push eax
lea ecx, [esp + 0x4c]
call fcn.00401f10
push eax
lea ecx, [esp + 0x40]
call fcn.00401f10
push eax
mov eax, dword [esp + 0x20]
push esi
push eax
call fcn.006099de
mov ecx, dword [esp + 0x28]
push ecx
call fcn.00609a4e
add esp, 0x18
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x54]
mov byte [esp + 0x13f4], bl
call fcn.00401070
lea ecx, [esp + 0x48]
mov byte [esp + 0x13f4], 8
call fcn.00401070
lea ecx, [esp + 0x38]
mov byte [esp + 0x13f4], 7
call fcn.00401070
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x44]
xor edi, edi
cmp eax, edi
pop ebp
jne 0x516eba
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
or esi, 0xffffffff
cmp eax, esi
jne 0x516f6f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x516f6f
mov eax, dword [esp + 0x10]
cmp eax, edi
mov ecx, eax
jne 0x516ee9
lea ecx, [esp + 0x14]
mov eax, dword [esp + 0x28]
cmp eax, edi
jne 0x516ef5
lea eax, [esp + 0x2c]
push edi
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x516f6f
mov edx, dword [0x6fdc74]
mov eax, dword [0x6fdc58]
mov ecx, dword [ebx + 0x1c]
push 0x40
push edx
push eax
push ecx
call fcn.00457010
add esp, 0x10
lea ecx, [esp + 0x10]
mov byte [esp + 0x13f0], 3
call fcn.00401070
lea ecx, [esp + 0x1c]
mov byte [esp + 0x13f0], 2
call fcn.00401070
lea ecx, [esp + 0x28]
mov byte [esp + 0x13f0], 1
call fcn.00401070
lea ecx, [esp + 0xc]
mov dword [esp + 0x88c], 0x658840
mov dword [esp + 0x13f0], esi
call fcn.00622d8a
xor al, al
jmp 0x516fe5
mov eax, dword [esp + 0x1c]
cmp eax, edi
jne 0x516f7b
lea eax, [esp + 0x20]
mov edx, dword [esp + 0x13f8]
push eax
mov eax, dword [ebx + 0xac]
push edx
push 1
push eax
call fcn.0040bad0
add esp, 0x10
lea ecx, [esp + 0x10]
mov byte [esp + 0x13f0], 3
call fcn.00401070
lea ecx, [esp + 0x1c]
mov byte [esp + 0x13f0], 2
call fcn.00401070
lea ecx, [esp + 0x28]
mov byte [esp + 0x13f0], 1
call fcn.00401070
lea ecx, [esp + 0xc]
mov dword [esp + 0x88c], 0x658840
mov dword [esp + 0x13f0], esi
call fcn.00622d8a
mov al, 1
mov ecx, dword [esp + 0x13e8]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x13e8
ret 4