Function at 0x4020f0
Capabilities:
Check if file exists
Copy file
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41e630
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x42f034]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xor eax, eax
mov dword [ebp - 4], 0
push 0xffffffffffffffff
push eax
mov word [ebp - 0x28], ax
lea ecx, [ebp - 0x28]
lea eax, [ebp + 8]
mov dword [ebp - 0x14], 7
push eax
mov dword [ebp - 0x18], 0
call fcn.00401640
sub esp, 0x18
mov byte [ebp - 4], 1
mov ecx, esp
mov dword [ebp - 0x4c], esp
xor eax, eax
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [esi + 0x18]
push eax
call fcn.00401640
sub esp, 0x18
mov byte [ebp - 4], 2
mov ecx, esp
xor eax, eax
push 0xffffffffffffffff
push eax
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push esi
mov word [ecx], ax
call fcn.00401640
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.00405fd0
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
add esp, 0x18
mov byte [ebp - 4], 3
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x14], 7
push eax
mov word [ecx], ax
lea eax, [ebp - 0x28]
push eax
call fcn.00401640
lea ecx, [ebp - 0x40]
call fcn.00404830
add esp, 0x18
mov dword [ebp - 0x54], 7
xor eax, eax
mov dword [ebp - 0x58], 0
mov word [ebp - 0x68], ax
lea ecx, [ebp - 0x68]
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00401640
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 4
call fcn.00404600
cmp dword [ebp - 0x54], 8
lea eax, [ebp - 0x68]
cmovae eax, dword [ebp - 0x68]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
setne al
mov byte [ebp - 4], 3
cmp dword [ebp - 0x54], 8
mov ebx, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
mov byte [ebp - 0x41], al
jb 0x402248
push dword [ebp - 0x68]
call ebx
mov al, byte [ebp - 0x41]
add esp, 4
test al, al
jne 0x402278
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp - 0x40]
push eax
call fcn.00401640
call fcn.004065d0
add esp, 0x18
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x28]
push 0
cmovae ecx, dword [ebp - 0x28]
lea eax, [ebp + 8]
cmp dword [ebp + 0x1c], 8
push ecx
cmovae eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x4022ce
push str._AutoUpdate_copy_file_Success
push 1
push 0x58
push 0x421e20
push 0x421e50
call fcn.00412b20
add esp, 0x14
lea eax, [ebp + 8]
cmp dword [ebp + 0x1c], 8
cmovae eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40235d
cmp dword [ebp - 0x14], 8
lea edi, [ebp - 0x28]
lea esi, [ebp + 8]
cmovae edi, dword [ebp - 0x28]
cmp dword [ebp + 0x1c], 8
cmovae esi, dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push esi
push str._AutoUpdate_ERR:Fail_to_copy_file___s__to___s__error__0x_x_force_replace...
push 1
push 0x5e
push 0x421f48
push str.CReplaceFileTask::ReplaceFileW
call fcn.00412eb0
add esp, 8
xor eax, eax
mov ecx, esp
mov dword [ebp - 0x48], esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp - 0x28]
push eax
call fcn.00401640
sub esp, 0x18
mov byte [ebp - 4], 5
mov ecx, esp
xor eax, eax
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp + 8]
push eax
call fcn.00401640
mov byte [ebp - 4], 3
call fcn.004023d0
cmp dword [ebp - 0x2c], 8
jb 0x40236b
push dword [ebp - 0x40]
call ebx
add esp, 4
xor eax, eax
mov dword [ebp - 0x2c], 7
cmp dword [ebp - 0x14], 8
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
jb 0x40238d
push dword [ebp - 0x28]
call ebx
add esp, 4
xor eax, eax
mov dword [ebp - 0x14], 7
cmp dword [ebp + 0x1c], 8
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
jb 0x4023af
push dword [ebp + 8]
call ebx
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041d982
mov esp, ebp
pop ebp
ret 0x18