Function at 0x40ccd0
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 0x40cda0
cmp dword [ebx], 0xffffffff
je 0x40cd53
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 0x40cd53
lea ecx, [ebp - 0x24]
cmp eax, ecx
je 0x40cd53
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 0x40cd85
test dl, 5
je 0x40cd85
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 0x40cda0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp byte [ebp + 0x64], 0
je 0x40ce54
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 0x40ce54
cmp dword [ebx], 0xffffffff
je 0x40ce1b
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 0x40ce1b
lea ecx, [ebp - 0x24]
cmp eax, ecx
je 0x40ce1b
push eax
call fcn.0043817b
add esp, 4
mov eax, dword [ebp + 0xc]
mov dword [esi], 0
test eax, eax
je 0x40ce38
lea ecx, [ebp + 0x18]
cmp eax, ecx
je 0x40ce38
push eax
call fcn.0043817b
add esp, 4
mov eax, dword [ebp + 0x38]
test eax, eax
je 0x40cfe0
lea ecx, [ebp + 0x44]
cmp eax, ecx
je 0x40cfe0
push eax
jmp 0x40cfd8
cmp dword [ebx], 0xffffffff
je 0x40cea1
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 0x40cea1
lea ecx, [ebp - 0x24]
cmp eax, ecx
je 0x40cea1
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 0x40cfac
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 0x40cf12
lea ecx, [ebp - 0x24]
cmp eax, ecx
je 0x40cf12
push eax
call fcn.0043817b
add esp, 4
cmp dword [ebx], 0xffffffff
je 0x40cf67
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 0x40cf64
lea ecx, [ebp - 0x24]
cmp eax, ecx
je 0x40cf64
push eax
call fcn.0043817b
add esp, 4
mov esi, dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x40cf7d
jle 0x40cf82
movzx eax, ax
or eax, 0x80070000
jmp 0x40cf82
mov eax, 0x8007054f
mov dword [esi], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40cf9b
lea ecx, [ebp + 0x18]
cmp eax, ecx
je 0x40cf9b
push eax
call fcn.0043817b
add esp, 4
mov eax, dword [ebp + 0x38]
test eax, eax
je 0x40cfe0
lea ecx, [ebp + 0x44]
cmp eax, ecx
je 0x40cfe0
push eax
jmp 0x40cfd8
mov eax, dword [ebp + 0xc]
mov dword [esi], 0
test eax, eax
je 0x40cfc9
lea ecx, [ebp + 0x18]
cmp eax, ecx
je 0x40cfc9
push eax
call fcn.0043817b
add esp, 4
mov ecx, dword [ebp + 0x38]
test ecx, ecx
je 0x40cfe0
lea eax, [ebp + 0x44]
cmp ecx, eax
je 0x40cfe0
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