Function at 0x566858
Capabilities:
Check if file exists
Copy file
Delete directory
Delete file
Get file attributes
Move file

Disassembly:
push ebp
mov ebp, esp
mov ecx, 8
push 0
push 0
dec ecx
jne 0x566860
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.0040712c
xor eax, eax
push ebp
push 0x566bc4
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebx + 0x1c], 0
jne 0x56689b
cmp dword [ebx + 0x18], 0xa00000
jb 0x566a00
jmp 0x5668a1
jl 0x566a00
push dword [ebx + 0xc]
push 0x566be0
lea edx, [ebp - 0x24]
movzx eax, byte [ebx + 0x20]
call fcn.0041e334
push dword [ebp - 0x24]
lea eax, [ebp - 8]
mov edx, 3
call fcn.00407d00
mov dl, 1
mov eax, dword [ebp - 8]
call fcn.0041ec6c
test al, al
je 0x56692c
mov eax, dword [ebp - 8]
call fcn.00407a2c
mov edi, eax
push edi
call sub.kernel32.dll_DeleteFileW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x15], al
cmp byte [ebp - 0x15], 0
jne 0x56692c
call sub.kernel32.dll_GetLastError_1
mov esi, eax
push edi
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x566926
test ah, 4
je 0x566926
test al, 0x10
je 0x566926
mov eax, dword [ebp - 8]
call fcn.00407a2c
push eax
call sub.kernel32.dll_RemoveDirectoryW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x15], al
jmp 0x56692c
push esi
call sub.kernel32.dll_SetLastError
movzx esi, byte [ebx + 0x20]
dec esi
cmp esi, 1
jl 0x5669b1
push dword [ebx + 0xc]
push 0x566be0
lea edx, [ebp - 0x28]
mov eax, esi
call fcn.0041e334
push dword [ebp - 0x28]
lea eax, [ebp - 8]
mov edx, 3
call fcn.00407d00
mov dl, 1
mov eax, dword [ebp - 8]
call fcn.0041ec6c
test al, al
je 0x5669ac
push dword [ebx + 0xc]
push 0x566be0
lea edx, [ebp - 0x30]
lea eax, [esi + 1]
call fcn.0041e334
push dword [ebp - 0x30]
lea eax, [ebp - 0x2c]
mov edx, 3
call fcn.00407d00
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 0x34], edi
mov eax, dword [ebp - 0x34]
call fcn.00407a2c
push eax
mov eax, dword [ebp - 8]
call fcn.00407a2c
push eax
call sub.kernel32.dll_MoveFileW
cmp eax, 1
sbb eax, eax
inc eax
dec esi
test esi, esi
jne 0x566936
push 0
lea eax, [ebp - 0x38]
mov ecx, 0x566bf8
mov edx, dword [ebx + 0xc]
call fcn.00407c78
mov eax, dword [ebp - 0x38]
call fcn.00407a2c
push eax
mov eax, dword [ebx + 0xc]
call fcn.00407a2c
push eax
call sub.kernel32.dll_CopyFileW
push 0
push 0
mov eax, dword [ebx + 0x10]
call fcn.0044459c
push 0
push 0
mov eax, dword [ebx + 0x10]
call fcn.00444538
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0
mov eax, dword [ebp - 4]
test eax, eax
je 0x566a0c
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x64
jge 0x566a85
mov edx, dword [ebp - 4]
mov eax, 0x566c10
call fcn.00407f54
test eax, eax
jle 0x566a4b
movzx eax, byte [0x566c14]
push eax
lea eax, [ebp - 0x3c]
push eax
mov ecx, 0x566c24
mov edx, 0x566c10
mov eax, dword [ebp - 4]
call fcn.00425040
mov edx, dword [ebp - 0x3c]
lea eax, [ebp - 4]
call fcn.00407470
mov edx, dword [ebp - 4]
mov eax, 0x566c34
call fcn.00407f54
test eax, eax
jle 0x566a85
movzx eax, byte [0x566c14]
push eax
lea eax, [ebp - 0x40]
push eax
mov ecx, 0x566c24
mov edx, 0x566c34
mov eax, dword [ebp - 4]
call fcn.00425040
mov edx, dword [ebp - 0x40]
lea eax, [ebp - 4]
call fcn.00407470
call fcn.00420ec8
fstp qword [ebp - 0x20]
wait
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
lea ecx, [ebp - 0x14]
mov edx, dword [0x59a270]
mov eax, 0x566c44
call fcn.00421c78
push dword [ebp - 0x14]
push 0x566c84
call sub.kernel32.dll_GetCurrentThreadId_1
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x44]
call fcn.0041e4b0
push dword [ebp - 0x44]
push 0x566c94
lea eax, [ebp - 0xc]
mov edx, 4
call fcn.00407d00
call fcn.00428e84
mov edx, eax
lea ecx, [ebp - 0x10]
mov eax, dword [ebp - 0xc]
call fcn.004cae0c
mov eax, dword [ebp - 0x10]
call fcn.00408bd8
mov ecx, eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebx + 0x10]
mov esi, dword [eax]
call dword [esi + 0x10]
mov eax, dword [ebp - 0x10]
call fcn.00408bd8
cdq
add dword [ebx + 0x18], eax
adc dword [ebx + 0x1c], edx
call fcn.00428e84
mov edx, eax
lea ecx, [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.004cae0c
mov eax, dword [ebp - 0x10]
call fcn.00408bd8
mov ecx, eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebx + 0x10]
mov esi, dword [eax]
call dword [esi + 0x10]
mov eax, dword [ebp - 0x10]
call fcn.00408bd8
cdq
add dword [ebx + 0x18], eax
adc dword [ebx + 0x1c], edx
call fcn.00428e84
mov edx, eax
lea ecx, [ebp - 0x10]
mov eax, 0x566ca8
call fcn.004cae0c
mov eax, dword [ebp - 0x10]
call fcn.00408bd8
mov ecx, eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebx + 0x10]
mov esi, dword [eax]
call dword [esi + 0x10]
mov eax, dword [ebp - 0x10]
call fcn.00408bd8
cdq
add dword [ebx + 0x18], eax
adc dword [ebx + 0x1c], edx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x566bcb
lea eax, [ebp - 0x44]
mov edx, 4
call fcn.004070a8
lea eax, [ebp - 0x30]
mov edx, 4
call fcn.004070a8
lea eax, [ebp - 0x14]
call fcn.00407048
lea eax, [ebp - 0x10]
mov edx, dword [0x4175e4]
call fcn.00408ea0
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004070a8
ret