Function at 0x40d550
Capabilities:
Check if file exists
Copy file
Create directory
Get common file path
Move file
Timestomp file

Disassembly:
push 0xffffffffffffffff
push 0x448adf
mov eax, dword fs:[0]
push eax
sub esp, 0x490
mov eax, dword [0x4563c4]
xor eax, esp
mov dword [esp + 0x488], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4563c4]
xor eax, esp
push eax
lea eax, [esp + 0x4a4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x4b4]
mov ebp, dword [esp + 0x4bc]
mov esi, dword [esp + 0x4b8]
xor ebx, ebx
mov dword [esp + 0x38], eax
mov dword [esp + 0x18], ebp
mov dword [esp + 0x64], ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x4ac], ebx
cmp byte [eax + 0x244], bl
je 0x40d5d4
mov dword [esp + 0x4c4], ebx
push esi
push str.__Copying_file__s
push 0x4575e0
xor eax, eax
call fcn.00419140
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push 0x20000
push esi
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40d620
lea eax, [esp + 0x20]
push eax
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x4c0]
cmp eax, 2
jne 0x40d67c
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d8ab
push str.__File_exists__skipping
push 0x4575e0
xor eax, eax
call fcn.00419140
mov eax, dword [esp + 0x34]
add esp, 8
cmp eax, ebx
je 0x40d675
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x30]
push ecx
call fcn.00417420
mov edx, dword [esp + 0x30]
add esp, 4
push edx
call fcn.00422b32
add esp, 4
xor eax, eax
jmp 0x40dc0b
cmp eax, 1
jne 0x40d8ab
mov ecx, esi
call fcn.00418460
mov ecx, dword [esp + 0x18]
mov ebp, eax
mov edi, edx
call fcn.00418460
mov ecx, ebp
or ecx, edi
mov dword [esp + 0x3c], eax
mov ebx, edx
jne 0x40d859
or eax, ebx
jne 0x40d859
mov eax, dword [esp + 0x18]
lea edi, [esp + 0x84]
call fcn.00418260
lea eax, [esp + 0x20]
call fcn.004183d0
push eax
push str.__Source_file_time:__s
push 0x4575e0
xor eax, eax
call fcn.00419140
add esp, 0xc
mov eax, edi
call fcn.004183d0
push eax
push str.__Dest_file_time:__s
push 0x4575e0
xor eax, eax
call fcn.00419140
add esp, 0xc
mov edx, edi
push edx
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
sub eax, 1
neg eax
sbb eax, eax
add eax, 1
test eax, eax
jne 0x40d8a9
push str.__File_skipped__destination_file_is_same_or_newer
push 0x4575e0
xor eax, eax
call fcn.00419140
add esp, 8
cmp dword [esp + 0x4c4], 0
je 0x40d849
mov edx, 0x44d738
lea eax, [esp + 0x48]
call fcn.00402050
mov ebx, dword [esp + 0x18]
push eax
lea esi, [esp + 0x6c]
mov byte [esp + 0x4b0], 1
call fcn.00416100
add esp, 4
push eax
lea esi, [esp + 0x2c]
mov byte [esp + 0x4b0], 2
call fcn.00410ce0
lea esi, [esp + 0x68]
call fcn.00420180
lea esi, [esp + 0x48]
mov byte [esp + 0x4ac], 0
call fcn.00420180
mov edx, str.usequence
lea eax, [esp + 0x48]
call fcn.00402050
mov ebx, dword [esp + 0x64]
push eax
lea esi, [esp + 0x6c]
mov byte [esp + 0x4b0], 3
call fcn.00416100
add esp, 4
push eax
lea esi, [esp + 0x2c]
mov byte [esp + 0x4b0], 4
call fcn.00410ce0
lea esi, [esp + 0x68]
call fcn.00420180
lea esi, [esp + 0x48]
mov byte [esp + 0x4ac], 0
call fcn.00420180
mov edx, str.group
lea eax, [esp + 0x48]
call fcn.00402050
mov byte [esp + 0x4ac], 5
mov ebx, dword [esp + 0x1c]
push eax
lea esi, [esp + 0x6c]
call fcn.00416100
add esp, 4
push eax
lea esi, [esp + 0x2c]
mov byte [esp + 0x4b0], 6
call fcn.00410ce0
lea esi, [esp + 0x68]
call fcn.00420180
lea esi, [esp + 0x48]
mov byte [esp + 0x4ac], 0
call fcn.00420180
mov edx, dword [esp + 0x38]
push str.File
push edx
lea ecx, [esp + 0x30]
call fcn.0040dc40
lea esi, [esp + 0x28]
call fcn.00410c30
xor eax, eax
jmp 0x40dc0b
push edi
push ebp
call fcn.00418360
push eax
push str.__Source_version:__s
push 0x4575e0
xor eax, eax
call fcn.00419140
mov ecx, dword [esp + 0x50]
add esp, 0x14
push ebx
push ecx
call fcn.00418360
push eax
push str.__Dest_version:__s
push 0x4575e0
xor eax, eax
call fcn.00419140
add esp, 0x14
cmp ebx, edi
jl 0x40d8a9
jg 0x40d71b
cmp dword [esp + 0x3c], ebp
jae 0x40d71b
xor ebx, ebx
mov dword [esp + 0x3c], ebx
nop
mov edi, dword [esp + 0x18]
push ebx
push edi
push esi
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x40da09
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
sub eax, 2
je 0x40d8ff
sub eax, 1
je 0x40d91e
sub eax, 0x1d
je 0x40d954
push esi
push ebp
push str.__Copy_file_error__0X_X__on_source___s._Trying_again.
push 0x4575e0
xor eax, eax
call fcn.00419140
add esp, 0x10
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp ebp, ebx
je 0x40da1a
mov eax, dword [esp + 0x3c]
mov ecx, eax
add eax, 1
cmp ecx, 3
mov dword [esp + 0x3c], eax
jl 0x40d8b0
jmp 0x40da1a
push edi
lea eax, [esp + 0x90]
push 0x104
push eax
call fcn.004231e5
add esp, 0xc
lea ecx, [esp + 0x8c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push ebx
lea edx, [esp + 0x90]
push edx
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
jmp 0x40d907
push str.__File_in_use__setting_copy_on_boot
push 0x4575e0
xor eax, eax
call fcn.00419140
add esp, 8
lea edx, [esp + 0x8c]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [esp + 0x294]
push eax
push ebx
push 0x44eb38
lea ecx, [esp + 0x98]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push ebx
lea edx, [esp + 0x298]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push ebx
push ebx
push 3
push ebx
push 1
push 0x20000
lea eax, [esp + 0x2ac]
push eax
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x40d9e5
lea ecx, [esp + 0x20]
push ecx
push ebx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x18]
push 4
push edx
lea eax, [esp + 0x29c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ecx, dword [esp + 0x38]
mov dword [ecx + 0x34], 1
xor ebp, ebp
jmp 0x40da16
mov eax, dword [esp + 0x18]
lea edi, [esp + 0x20]
call fcn.004182b0
mov edi, dword [esp + 0x18]
cmp dword [esp + 0x3c], 5
jne 0x40da39
push esi
push str.Copy_file_error_on_source___s__aborting
push 0x4575e0
mov eax, 2
call fcn.00419140
add esp, 0xc
cmp ebp, ebx
jne 0x40dbe3
cmp dword [esp + 0x4c4], ebx
je 0x40dbe3
mov edx, 0x44d738
lea eax, [esp + 0x68]
call fcn.00402050
push eax
mov ebx, edi
lea esi, [esp + 0x4c]
mov byte [esp + 0x4b0], 7
call fcn.00416100
add esp, 4
mov ebx, 8
push eax
lea esi, [esp + 0x2c]
mov byte [esp + 0x4b0], bl
call fcn.00410ce0
cmp dword [esp + 0x60], ebx
jb 0x40da9c
mov edx, dword [esp + 0x4c]
push edx
call fcn.00422b32
add esp, 4
xor eax, eax
mov byte [esp + 0x4ac], al
cmp dword [esp + 0x80], ebx
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], eax
mov word [esp + 0x4c], ax
jb 0x40dacc
mov eax, dword [esp + 0x6c]
push eax
call fcn.00422b32
add esp, 4
mov edx, str.usequence
lea eax, [esp + 0x68]
call fcn.00402050
mov ebx, dword [esp + 0x64]
push eax
lea esi, [esp + 0x4c]
mov byte [esp + 0x4b0], 9
call fcn.00416100
add esp, 4
push eax
lea esi, [esp + 0x2c]
mov byte [esp + 0x4b0], 0xa
call fcn.00410ce0
mov esi, 8
cmp dword [esp + 0x60], esi
jb 0x40db1d
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.00422b32
add esp, 4
xor eax, eax
mov byte [esp + 0x4ac], al
cmp dword [esp + 0x80], esi
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], eax
mov word [esp + 0x4c], ax
jb 0x40db4d
mov edx, dword [esp + 0x6c]
push edx
call fcn.00422b32
add esp, 4
mov edx, str.group
lea eax, [esp + 0x68]
call fcn.00402050
mov byte [esp + 0x4ac], 0xb
mov ebx, dword [esp + 0x1c]
push eax
lea esi, [esp + 0x4c]
call fcn.00416100
add esp, 4
push eax
lea esi, [esp + 0x2c]
mov byte [esp + 0x4b0], 0xc
call fcn.00410ce0
mov esi, 8
cmp dword [esp + 0x60], esi
jb 0x40db9e
mov eax, dword [esp + 0x4c]
push eax
call fcn.00422b32
add esp, 4
xor eax, eax
mov byte [esp + 0x4ac], al
cmp dword [esp + 0x80], esi
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], eax
mov word [esp + 0x4c], ax
jb 0x40dbce
mov ecx, dword [esp + 0x6c]
push ecx
call fcn.00422b32
add esp, 4
mov edx, dword [esp + 0x38]
push str.File
push edx
lea ecx, [esp + 0x30]
call fcn.0040dc40
xor ebx, ebx
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x40dc09
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x30]
push ecx
call fcn.00417420
mov edx, dword [esp + 0x30]
add esp, 4
push edx
call fcn.00422b32
add esp, 4
mov eax, ebp
mov ecx, dword [esp + 0x4a4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x488]
xor ecx, esp
call fcn.00422b23
add esp, 0x49c
ret 0x14