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

Disassembly:
push 0xffffffffffffffff
push 0x44862f
mov eax, dword fs:[0]
push eax
sub esp, 0x490
mov eax, dword [0x4563d0]
xor eax, esp
mov dword [esp + 0x488], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4563d0]
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 0x40d6b4
mov dword [esp + 0x4c4], ebx
push esi
push str.__Copying_file__s
push 0x4575d0
xor eax, eax
call fcn.00419220
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 0x40d700
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 0x40d75c
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d98b
push str.__File_exists__skipping
push 0x4575d0
xor eax, eax
call fcn.00419220
mov eax, dword [esp + 0x34]
add esp, 8
cmp eax, ebx
je 0x40d755
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x30]
push ecx
call fcn.00417520
mov edx, dword [esp + 0x30]
add esp, 4
push edx
call fcn.00422ece
add esp, 4
xor eax, eax
jmp 0x40dceb
cmp eax, 1
jne 0x40d98b
mov ecx, esi
call fcn.00418570
mov ecx, dword [esp + 0x18]
mov ebp, eax
mov edi, edx
call fcn.00418570
mov ecx, ebp
or ecx, edi
mov dword [esp + 0x3c], eax
mov ebx, edx
jne 0x40d939
or eax, ebx
jne 0x40d939
mov eax, dword [esp + 0x18]
lea edi, [esp + 0x84]
call fcn.00418370
lea eax, [esp + 0x20]
call fcn.004184e0
push eax
push str.__Source_file_time:__s
push 0x4575d0
xor eax, eax
call fcn.00419220
add esp, 0xc
mov eax, edi
call fcn.004184e0
push eax
push str.__Dest_file_time:__s
push 0x4575d0
xor eax, eax
call fcn.00419220
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 0x40d989
push str.__File_skipped__destination_file_is_same_or_newer
push 0x4575d0
xor eax, eax
call fcn.00419220
add esp, 8
cmp dword [esp + 0x4c4], 0
je 0x40d929
mov edx, 0x44d720
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.00416210
add esp, 4
push eax
lea esi, [esp + 0x2c]
mov byte [esp + 0x4b0], 2
call fcn.00410de0
lea esi, [esp + 0x68]
call fcn.00417610
lea esi, [esp + 0x48]
mov byte [esp + 0x4ac], 0
call fcn.00417610
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.00416210
add esp, 4
push eax
lea esi, [esp + 0x2c]
mov byte [esp + 0x4b0], 4
call fcn.00410de0
lea esi, [esp + 0x68]
call fcn.00417610
lea esi, [esp + 0x48]
mov byte [esp + 0x4ac], 0
call fcn.00417610
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.00416210
add esp, 4
push eax
lea esi, [esp + 0x2c]
mov byte [esp + 0x4b0], 6
call fcn.00410de0
lea esi, [esp + 0x68]
call fcn.00417610
lea esi, [esp + 0x48]
mov byte [esp + 0x4ac], 0
call fcn.00417610
mov edx, dword [esp + 0x38]
push str.File
push edx
lea ecx, [esp + 0x30]
call fcn.0040dd20
lea esi, [esp + 0x28]
call fcn.00410d30
xor eax, eax
jmp 0x40dceb
push edi
push ebp
call fcn.00418470
push eax
push str.__Source_version:__s
push 0x4575d0
xor eax, eax
call fcn.00419220
mov ecx, dword [esp + 0x50]
add esp, 0x14
push ebx
push ecx
call fcn.00418470
push eax
push str.__Dest_version:__s
push 0x4575d0
xor eax, eax
call fcn.00419220
add esp, 0x14
cmp ebx, edi
jl 0x40d989
jg 0x40d7fb
cmp dword [esp + 0x3c], ebp
jae 0x40d7fb
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 0x40dae9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
sub eax, 2
je 0x40d9df
sub eax, 1
je 0x40d9fe
sub eax, 0x1d
je 0x40da34
push esi
push ebp
push str.__Copy_file_error__0X_X__on_source___s._Trying_again.
push 0x4575d0
xor eax, eax
call fcn.00419220
add esp, 0x10
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp ebp, ebx
je 0x40dafa
mov eax, dword [esp + 0x3c]
mov ecx, eax
add eax, 1
cmp ecx, 3
mov dword [esp + 0x3c], eax
jl 0x40d990
jmp 0x40dafa
push edi
lea eax, [esp + 0x90]
push 0x104
push eax
call fcn.00422e62
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 0x40d9e7
push str.__File_in_use__setting_copy_on_boot
push 0x4575d0
xor eax, eax
call fcn.00419220
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 0x44eb20
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 0x40dac5
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 0x40daf6
mov eax, dword [esp + 0x18]
lea edi, [esp + 0x20]
call fcn.004183c0
mov edi, dword [esp + 0x18]
cmp dword [esp + 0x3c], 5
jne 0x40db19
push esi
push str.Copy_file_error_on_source___s__aborting
push 0x4575d0
mov eax, 2
call fcn.00419220
add esp, 0xc
cmp ebp, ebx
jne 0x40dcc3
cmp dword [esp + 0x4c4], ebx
je 0x40dcc3
mov edx, 0x44d720
lea eax, [esp + 0x68]
call fcn.00402050
push eax
mov ebx, edi
lea esi, [esp + 0x4c]
mov byte [esp + 0x4b0], 7
call fcn.00416210
add esp, 4
mov ebx, 8
push eax
lea esi, [esp + 0x2c]
mov byte [esp + 0x4b0], bl
call fcn.00410de0
cmp dword [esp + 0x60], ebx
jb 0x40db7c
mov edx, dword [esp + 0x4c]
push edx
call fcn.00422ece
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 0x40dbac
mov eax, dword [esp + 0x6c]
push eax
call fcn.00422ece
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.00416210
add esp, 4
push eax
lea esi, [esp + 0x2c]
mov byte [esp + 0x4b0], 0xa
call fcn.00410de0
mov esi, 8
cmp dword [esp + 0x60], esi
jb 0x40dbfd
mov ecx, dword [esp + 0x4c]
push ecx
call fcn.00422ece
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 0x40dc2d
mov edx, dword [esp + 0x6c]
push edx
call fcn.00422ece
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.00416210
add esp, 4
push eax
lea esi, [esp + 0x2c]
mov byte [esp + 0x4b0], 0xc
call fcn.00410de0
mov esi, 8
cmp dword [esp + 0x60], esi
jb 0x40dc7e
mov eax, dword [esp + 0x4c]
push eax
call fcn.00422ece
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 0x40dcae
mov ecx, dword [esp + 0x6c]
push ecx
call fcn.00422ece
add esp, 4
mov edx, dword [esp + 0x38]
push str.File
push edx
lea ecx, [esp + 0x30]
call fcn.0040dd20
xor ebx, ebx
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x40dce9
mov ecx, dword [esp + 0x1c]
mov edi, dword [esp + 0x30]
push ecx
call fcn.00417520
mov edx, dword [esp + 0x30]
add esp, 4
push edx
call fcn.00422ece
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.00422834
add esp, 0x49c
ret 0x14