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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x415546
mov eax, dword fs:[0]
push eax
sub esp, 0x174
mov eax, dword [0x41e068]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x104
push 0
lea eax, [ebp - 0x114]
push eax
call fcn.00404a50
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x114]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [ebp - 0x114]
mov dword [ebp - 0x168], edx
mov eax, dword [ebp - 0x168]
add eax, 1
mov dword [ebp - 0x16c], eax
mov ecx, dword [ebp - 0x168]
mov dl, byte [ecx]
mov byte [ebp - 0x15d], dl
add dword [ebp - 0x168], 1
cmp byte [ebp - 0x15d], 0
jne 0x4014f0
mov eax, dword [ebp - 0x168]
sub eax, dword [ebp - 0x16c]
mov dword [ebp - 0x170], eax
jne 0x401536
push str.failed_to_call_GetModuleFileNameA___n
call fcn.00402f40
add esp, 4
xor al, al
jmp 0x401748
mov ecx, dword [ebp + 8]
call fcn.00401df0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
push eax
lea ecx, [ebp - 0x12c]
call fcn.00401f00
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x12c]
call fcn.00401dc0
movzx ecx, al
test ecx, ecx
je 0x40159b
push str.failed_to_get_src_file_name_n
call fcn.00402f40
add esp, 4
mov byte [ebp - 0x15e], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x12c]
call fcn.00401e70
mov al, byte [ebp - 0x15e]
jmp 0x401748
lea edx, [ebp - 0x114]
push edx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x144]
call fcn.00401f00
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x12c]
push ecx
push 0x41bf00
lea edx, [ebp - 0x15c]
push edx
call fcn.00402680
add esp, 0xc
mov dword [ebp - 0x174], eax
mov eax, dword [ebp - 0x174]
mov dword [ebp - 0x178], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x178]
push ecx
lea ecx, [ebp - 0x144]
call fcn.00401e10
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x15c]
call fcn.00401e70
lea ecx, [ebp - 0x144]
call fcn.00401df0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x401688
lea ecx, [ebp - 0x144]
call fcn.00401df0
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x401688
lea ecx, [ebp - 0x12c]
call fcn.00401df0
push eax
push str.failed_to_del_old_file:__s_n
call fcn.00402f40
add esp, 8
mov byte [ebp - 0x15f], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x144]
call fcn.00401e70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x12c]
call fcn.00401e70
mov al, byte [ebp - 0x15f]
jmp 0x401748
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ebp - 0x144]
call fcn.00401df0
mov dword [ebp - 0x17c], eax
mov ecx, dword [ebp + 8]
call fcn.00401df0
mov dword [ebp - 0x180], eax
push 0
mov edx, dword [ebp - 0x17c]
push edx
mov eax, dword [ebp - 0x180]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x401712
lea ecx, [ebp - 0x12c]
call fcn.00401df0
push eax
push str.failed_to_copy_src_file:__s_n
call fcn.00402f40
add esp, 8
mov byte [ebp - 0x160], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x144]
call fcn.00401e70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x12c]
call fcn.00401e70
mov al, byte [ebp - 0x160]
jmp 0x401748
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov byte [ebp - 0x161], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x144]
call fcn.00401e70
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x12c]
call fcn.00401e70
mov al, byte [ebp - 0x161]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00403a3f
mov esp, ebp
pop ebp
ret