Function at 0x5215ec
Capabilities:
Copy file
Delete file
Move file

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 6
push 0
push 0
dec ecx
jne 0x5215f5
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov byte [ebp - 0xd], cl
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.00406ec4
xor eax, eax
push ebp
push 0x521826
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [ebp - 0xd], 0
je 0x52164e
lea edx, [ebp - 0x1c]
mov eax, dword [ebx + 8]
call fcn.00471c9c
lea eax, [ebp - 0x1c]
mov edx, 0x521840
call fcn.00407230
mov eax, dword [ebp - 0x1c]
call fcn.00471794
test al, al
je 0x5217f6
mov eax, dword [ebx + 0x14]
cmp eax, dword [ebx + 0x18]
jl 0x521761
push dword [ebx + 0xc]
push 0x521868
lea edx, [ebp - 0x20]
movzx eax, byte [ebx + 0x1c]
call fcn.00471048
push dword [ebp - 0x20]
lea eax, [ebp - 8]
mov edx, 3
call fcn.00407380
mov eax, dword [ebp - 8]
call fcn.00471794
test al, al
je 0x521698
mov eax, dword [ebp - 8]
call fcn.00406f68
push eax
call sub.KERNEL32.DLL_DeleteFileW
movzx esi, byte [ebx + 0x1c]
dec esi
cmp esi, 1
jl 0x52171b
push dword [ebx + 0xc]
push 0x521868
lea edx, [ebp - 0x24]
mov eax, esi
call fcn.00471048
push dword [ebp - 0x24]
lea eax, [ebp - 8]
mov edx, 3
call fcn.00407380
mov eax, dword [ebp - 8]
call fcn.00471794
test al, al
je 0x521716
push dword [ebx + 0xc]
push 0x521868
lea edx, [ebp - 0x2c]
lea eax, [esi + 1]
call fcn.00471048
push dword [ebp - 0x2c]
lea eax, [ebp - 0x28]
mov edx, 3
call fcn.00407380
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x30], edi
mov eax, dword [ebp - 0x30]
call fcn.00406f68
push eax
mov eax, dword [ebp - 8]
call fcn.00406f68
push eax
call sub.KERNEL32.DLL_MoveFileW
cmp eax, 1
sbb eax, eax
inc eax
dec esi
test esi, esi
jne 0x5216a2
push 0
lea eax, [ebp - 0x34]
mov ecx, 0x521880
mov edx, dword [ebx + 0xc]
call fcn.004072b0
mov eax, dword [ebp - 0x34]
call fcn.00406f68
push eax
mov eax, dword [ebx + 0xc]
call fcn.00406f68
push eax
call sub.KERNEL32.DLL_CopyFileW
push 0
push 0
mov eax, dword [ebx + 0x10]
call fcn.00491934
push 0
push 0
mov eax, dword [ebx + 0x10]
call fcn.004918d0
xor eax, eax
mov dword [ebx + 0x14], eax
cmp dword [ebx + 0x14], 0
jne 0x521784
mov word [ebp - 0x10], 0xfeff
lea edx, [ebp - 0x10]
mov ecx, 2
mov eax, dword [ebx + 0x10]
call fcn.00491b3c
mov dword [ebx + 0x14], 2
cmp byte [ebx + 0x1d], 0
je 0x5217b6
call fcn.00474ec4
fstp qword [ebp - 0x18]
wait
push dword [ebp - 0x14]
push dword [ebp - 0x18]
lea eax, [ebp - 0xc]
mov edx, 0x521898
call fcn.00475b84
lea edx, [ebp - 4]
mov ecx, 1
mov eax, dword [ebp - 0xc]
call fcn.00407674
lea eax, [ebp - 4]
mov edx, 0x5218d8
call fcn.00407230
lea eax, [ebp - 4]
call fcn.00407854
mov edx, eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x5217d9
sub eax, 4
mov eax, dword [eax]
mov ecx, eax
add ecx, ecx
mov eax, dword [ebx + 0x10]
mov esi, dword [eax]
call dword [esi + 0x10]
mov eax, dword [ebp - 4]
test eax, eax
je 0x5217f1
sub eax, 4
mov eax, dword [eax]
add eax, eax
add dword [ebx + 0x14], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x52182d
lea eax, [ebp - 0x34]
call fcn.00406ecc
lea eax, [ebp - 0x2c]
mov edx, 5
call fcn.00406ed4
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00406ed4
ret