Function at 0x4216cb
Capabilities:
Check if file exists
Copy file
Delete file
Get common file path

Disassembly:
push ebp
sub esp, 0x634
lea ebp, [esp - 4]
mov eax, dword [0x61f060]
xor eax, ebp
mov dword [ebp + 0x634], eax
push 0x10
mov eax, 0x578e95
call fcn.0048905d
mov eax, dword [ebp + 0x640]
xor edi, edi
xor bl, bl
cmp dword [eax + 0x14], edi
mov esi, ecx
je 0x4218b7
mov ecx, dword [esi + 4]
cmp dword [ecx], edi
je 0x4218b7
push eax
lea eax, [ebp]
push eax
call fcn.004190eb
pop ecx
pop ecx
cmp dword [ebp + 0x18], 8
mov eax, dword [ebp + 4]
mov dword [ebp - 4], edi
jae 0x42172a
lea eax, [ebp + 4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x421742
cmp byte [ebp + 0x644], 0
je 0x4218ac
lea eax, [ebp + 0x1c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp + 0x42c]
push eax
push edi
push 0x5b11c0
lea eax, [ebp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea eax, [ebp + 0x42c]
push eax
lea ecx, [ebp - 0x1c]
mov word [ebp - 0x1c], di
call fcn.00401e2a
mov eax, dword [esi + 4]
mov eax, dword [eax]
mov ecx, dword [eax]
sub esp, 0x10
mov edi, esp
lea esi, [ebp - 0x1c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push eax
mov byte [ebp - 4], 1
movsd dword es:[edi], dword [esi]
call dword [ecx + 0x108]
test eax, eax
jl 0x4218a0
mov eax, dword [ebp + 4]
push 8
pop esi
cmp dword [ebp + 0x18], esi
jae 0x4217af
lea eax, [ebp + 4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x42186f
cmp dword [ebp + 0x14], 0x102
jae 0x42186f
cmp dword [ebp + 0x18], esi
mov eax, dword [ebp + 4]
jae 0x4217d6
lea eax, [ebp + 4]
push eax
lea eax, [ebp + 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x5b11b8
lea eax, [ebp + 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
cmp dword [ebp + 0x18], esi
mov eax, dword [ebp + 4]
jae 0x421801
lea eax, [ebp + 4]
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileW]
xor edi, edi
push edi
lea ecx, [ebp + 0x224]
push ecx
push eax
call esi
test eax, eax
je 0x4218a0
cmp dword [ebp + 0x18], 8
mov eax, dword [ebp + 4]
jae 0x421828
lea eax, [ebp + 4]
push edi
push eax
lea eax, [ebp + 0x42c]
push eax
call esi
mov ebx, eax
dec ebx
neg ebx
sbb bl, bl
inc bl
jne 0x421855
cmp dword [ebp + 0x18], 8
mov eax, dword [ebp + 4]
jae 0x42184a
lea eax, [ebp + 4]
push edi
push eax
lea eax, [ebp + 0x224]
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp + 0x224]
push eax
call esi
lea eax, [ebp + 0x42c]
push eax
call esi
jmp 0x4218a0
cmp dword [ebp + 0x18], esi
mov eax, dword [ebp + 4]
jae 0x42187a
lea eax, [ebp + 4]
push 0
push eax
lea eax, [ebp + 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ebx, eax
dec ebx
neg ebx
lea eax, [ebp + 0x42c]
sbb bl, bl
push eax
inc bl
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
xor edi, edi
push edi
push 1
lea ecx, [ebp]
call fcn.0040321f
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x634]
xor ecx, ebp
call fcn.00488a42
add ebp, 0x638
leave
ret 8
mov ecx, dword [ecx + 0x1c]
xor al, al
test ecx, ecx
je 0x46580d
jmp 0x4216cb
ret 8