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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4155e0
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x423034]
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.00401600
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.00401600
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.00401600
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 1
call fcn.00404f50
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.00401600
lea ecx, [ebp - 0x40]
call fcn.004035e0
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.00401600
lea ecx, [ebp - 0x68]
mov byte [ebp - 4], 4
call fcn.004033b0
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 0x402288
push dword [ebp - 0x68]
call ebx
mov al, byte [ebp - 0x41]
add esp, 4
test al, al
jne 0x4022b8
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.00401600
call fcn.004055b0
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 0x4022f3
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x402382
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.ERR:Fail_to_copy_file___s__to___s__error__0x_x_force_replace...
push 1
push 0x5d
push 0x419070
push str.CReplaceFileTask::ReplaceFileW
call fcn.00409fb0
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.00401600
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.00401600
mov byte [ebp - 4], 3
call fcn.00402400
cmp dword [ebp - 0x2c], 8
jb 0x402390
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 0x4023b2
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 0x4023d4
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.00414a82
mov esp, ebp
pop ebp
ret 0x18