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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x47e064]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x6c]
push ebx
mov ebx, dword [ebp + 0x68]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x38], eax
mov edi, 0x4777b4
mov eax, dword [ebp + 0x38]
mov ecx, edi
test eax, eax
mov dword [ebp - 0x34], esi
cmovne ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x406fe0
cmp dword [ebx], 0xffffffff
je 0x406f93
mov eax, dword [ebp + 0x38]
mov ecx, edi
test eax, eax
push 0
cmovne ecx, eax
lea eax, [ebp - 0x30]
push ecx
push 0x46a9fc
push eax
call fcn.0040b5a0
add esp, 0xc
mov ecx, ebx
push eax
call fcn.004033b0
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x406f93
lea ecx, [ebp - 0x24]
cmp eax, ecx
je 0x406f93
push eax
call fcn.0043817b
add esp, 4
mov eax, dword [ebp + 0x38]
mov ecx, edi
test eax, eax
cmovne ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edx, eax
cmp edx, 0xffffffff
je 0x406fc5
test dl, 5
je 0x406fc5
mov eax, dword [ebp + 0x38]
mov ecx, edi
test eax, eax
cmovne ecx, eax
and edx, 0xfffffffa
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [ebp + 0x38]
mov ecx, edi
test eax, eax
cmovne ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x406fe0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [ebp + 0x64], 0
je 0x407094
mov eax, dword [ebp + 0xc]
mov edx, edi
test eax, eax
mov ecx, edi
push 0
cmovne edx, eax
mov eax, dword [ebp + 0x38]
test eax, eax
push edx
cmovne ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_CreateHardLinkW]
test eax, eax
je 0x407094
cmp dword [ebx], 0xffffffff
je 0x40705b
mov eax, dword [ebp + 0x38]
mov edx, edi
test eax, eax
push 0
cmovne edx, eax
mov eax, dword [ebp + 0xc]
test eax, eax
push edx
cmovne edi, eax
lea eax, [ebp - 0x30]
push edi
push str.Hardlinked__s____s
push eax
call fcn.0040b5a0
add esp, 0x10
mov ecx, ebx
push eax
call fcn.004033b0
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40705b
lea ecx, [ebp - 0x24]
cmp eax, ecx
je 0x40705b
push eax
call fcn.0043817b
add esp, 4
mov eax, dword [ebp + 0xc]
mov dword [esi], 0
test eax, eax
je 0x407078
lea ecx, [ebp + 0x18]
cmp eax, ecx
je 0x407078
push eax
call fcn.0043817b
add esp, 4
mov eax, dword [ebp + 0x38]
test eax, eax
je 0x407220
lea ecx, [ebp + 0x44]
cmp eax, ecx
je 0x407220
push eax
jmp 0x407218
cmp dword [ebx], 0xffffffff
je 0x4070e1
mov eax, dword [ebp + 0x38]
mov edx, edi
test eax, eax
mov ecx, edi
push 0
cmovne edx, eax
mov eax, dword [ebp + 0xc]
test eax, eax
push edx
cmovne ecx, eax
lea eax, [ebp - 0x30]
push ecx
push str.Copying__s____s
push eax
call fcn.0040b5a0
add esp, 0x10
mov ecx, ebx
push eax
call fcn.004033b0
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x4070e1
lea ecx, [ebp - 0x24]
cmp eax, ecx
je 0x4070e1
push eax
call fcn.0043817b
add esp, 4
mov eax, dword [ebp + 0x38]
mov edx, edi
test eax, eax
mov ecx, edi
push 0
cmovne edx, eax
mov eax, dword [ebp + 0xc]
test eax, eax
push edx
cmovne ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x4071ec
mov eax, dword [ebp + 0x38]
mov edx, edi
test eax, eax
mov ecx, edi
cmovne edx, eax
mov eax, dword [ebp + 0xc]
test eax, eax
push edx
cmovne ecx, eax
lea eax, [ebp - 0x30]
push ecx
push str.Failed_to_copy__s_to__s
push eax
call fcn.0040b5a0
mov ecx, dword [ebp - 0x38]
add esp, 0x10
push 0xffffffffffffffff
push 0
push eax
call fcn.0040b2d0
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x407152
lea ecx, [ebp - 0x24]
cmp eax, ecx
je 0x407152
push eax
call fcn.0043817b
add esp, 4
cmp dword [ebx], 0xffffffff
je 0x4071a7
mov eax, dword [ebp + 0x38]
mov esi, edi
test eax, eax
push 0
cmovne esi, eax
mov eax, dword [ebp + 0xc]
test eax, eax
cmovne edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push edi
lea eax, [ebp - 0x30]
push str.CopyFile__s____s_:_error__d
push eax
call fcn.0040b5a0
add esp, 0x14
mov ecx, ebx
push eax
call fcn.004033b0
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x4071a4
lea ecx, [ebp - 0x24]
cmp eax, ecx
je 0x4071a4
push eax
call fcn.0043817b
add esp, 4
mov esi, dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4071bd
jle 0x4071c2
movzx eax, ax
or eax, 0x80070000
jmp 0x4071c2
mov eax, 0x8007054f
mov dword [esi], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4071db
lea ecx, [ebp + 0x18]
cmp eax, ecx
je 0x4071db
push eax
call fcn.0043817b
add esp, 4
mov eax, dword [ebp + 0x38]
test eax, eax
je 0x407220
lea ecx, [ebp + 0x44]
cmp eax, ecx
je 0x407220
push eax
jmp 0x407218
mov eax, dword [ebp + 0xc]
mov dword [esi], 0
test eax, eax
je 0x407209
lea ecx, [ebp + 0x18]
cmp eax, ecx
je 0x407209
push eax
call fcn.0043817b
add esp, 4
mov ecx, dword [ebp + 0x38]
test ecx, ecx
je 0x407220
lea eax, [ebp + 0x44]
cmp ecx, eax
je 0x407220
push ecx
call fcn.0043817b
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042d480
mov esp, ebp
pop ebp
ret