Function at 0x4686e0
Capabilities:
Check if file exists
Get file size
Read file on windows
Set file attributes
Timestomp file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3a8
mov eax, dword [0x4af6f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0x364], eax
xor ebx, ebx
xor eax, eax
push esi
push edi
mov edi, dword [ebp + 8]
lea esi, [eax + 1]
mov dword [ebp - 0x368], eax
mov dword [ebp - 0x3a0], eax
mov dword [ebp - 0x39c], eax
mov dword [ebp - 0x37c], eax
mov dword [ebp - 0x378], eax
mov dword [ebp - 0x390], eax
mov dword [ebp - 0x38c], eax
mov dword [ebp - 0x3a8], eax
mov dword [ebp - 0x3a4], eax
mov dword [ebp - 0x388], eax
mov dword [ebp - 0x384], eax
mov dword [ebp - 0x380], eax
mov dword [ebp - 0x374], eax
cmp dword [0x4b552c], eax
jne 0x468e60
push ebx
push 0x80
push 3
push ebx
push esi
push closesocket
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x370], eax
cmp eax, 0xffffffff
je 0x468e4c
test dword [ebp + 0x10], 0x200000
mov ecx, esi
mov eax, ebx
xorps xmm0, xmm0
cmovne eax, ecx
movq qword [ebp - 0x35a], xmm0
mov dword [ebp - 0x360], eax
xor eax, eax
mov word [ebp - 0x35c], ax
mov dword [ebp - 0x352], eax
mov word [ebp - 0x34e], ax
lea eax, [ebp - 0x35c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea eax, [ebp - 0x37c]
push eax
push ebx
push ebx
push dword [ebp - 0x370]
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
jne 0x4687f7
lea eax, [ebp - 0x37c]
push eax
lea eax, [ebp - 0x35c]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov eax, dword [ebp - 0x37c]
mov dword [ebp - 0x3a0], eax
mov eax, dword [ebp - 0x378]
mov dword [ebp - 0x39c], eax
lea eax, [ebp - 0x3a8]
push eax
push dword [ebp - 0x370]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x46890e
mov eax, dword [ebp - 0x360]
test eax, eax
je 0x46890e
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
push dword [ebp - 0x364]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x46890e
lea eax, [ebp - 0x390]
push eax
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea eax, [ebp - 0x37c]
push eax
lea eax, [ebp - 0x390]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
je 0x46889a
push str.XCopyFile____Files_are_not_on_the_same_date_
call fcn.00469290
add esp, 4
jmp 0x46890e
lea eax, [ebp - 0x388]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x46890e
mov eax, dword [ebp - 0x388]
push 2
push 0
push 0
push 0
mov dword [ebp - 0x36c], eax
mov eax, dword [ebp - 0x384]
push ebx
mov dword [ebp - 0x360], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
push 0
test eax, eax
je 0x4688fd
push dword [ebp - 0x384]
push dword [ebp - 0x388]
push dword [ebp - 0x370]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x468b7e
push eax
push eax
push 0
push 0x495cdc
push 0
call fcn.0043fb20
add esp, 0x14
mov eax, dword [ebp + 0x10]
test eax, 0x40000
je 0x468a38
xor eax, eax
push 0x9e
push eax
mov dword [ebp - 0x360], eax
mov word [ebp - 0xa4], ax
lea eax, [ebp - 0xa2]
push eax
call fcn.0046f6e0
push 0x50
lea eax, [ebp - 0xa4]
push eax
push 0x49ddd4
push edi
call fcn.004698c0
add esp, 0x1c
test eax, eax
je 0x46896d
lea eax, [ebp - 0xa4]
push eax
call fcn.00469b60
add esp, 4
mov dword [ebp - 0x360], eax
xor eax, eax
push 0x9e
push eax
mov word [ebp - 0x144], ax
lea eax, [ebp - 0x142]
push eax
call fcn.0046f6e0
push 0x50
lea eax, [ebp - 0x144]
push eax
push 0x49ddd4
push dword [ebp - 0x364]
call fcn.004698c0
add esp, 0x1c
test eax, eax
je 0x4689b9
lea eax, [ebp - 0x144]
push eax
call fcn.00469b60
add esp, 4
jmp 0x4689bb
xor eax, eax
mov ecx, dword [ebp - 0x360]
test ecx, ecx
jne 0x4689d6
test eax, eax
jne 0x4689d6
mov eax, dword [ebp + 0x10]
or eax, 0x10000
mov dword [ebp + 0x10], eax
jmp 0x468a38
test dword [ebp + 0x10], 0x20000
je 0x468a0a
cmp ecx, eax
jae 0x468a35
lea eax, [ebp - 0x144]
push eax
lea eax, [ebp - 0xa4]
push eax
push dword [ebp - 0x364]
push edi
push str.XCopyFile__s___s___First_file_version___s__is_later_than_second_file_version___s_
call fcn.00469290
add esp, 0x14
jmp 0x468e3b
cmp ecx, eax
ja 0x468a35
lea eax, [ebp - 0x144]
push eax
lea eax, [ebp - 0xa4]
push eax
push dword [ebp - 0x364]
push edi
push str.XCopyFile__s___s___First_file_version___s__is_later_or_equal_than_second_file_version___s_
call fcn.00469290
add esp, 0x14
jmp 0x468e3b
mov eax, dword [ebp + 0x10]
test eax, 0x10000
je 0x468a9a
test eax, 0x20000
lea eax, [ebp - 0x390]
push eax
lea eax, [ebp - 0x37c]
push eax
je 0x468a77
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jle 0x468a9a
push dword [ebp - 0x364]
push edi
push str.XCopyFile__s___s___First_file_time_is_later_than_second_file_time
call fcn.00469290
add esp, 0xc
jmp 0x468e3b
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
js 0x468a9a
push dword [ebp - 0x364]
push edi
push str.XCopyFile__s___s___First_file_time_is_later_or_equal_than_second_file_time
call fcn.00469290
add esp, 0xc
jmp 0x468e3b
xorps xmm0, xmm0
movlpd qword [ebp - 0x398], xmm0
test ebx, ebx
je 0x468ab0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test dword [ebp + 0x10], 0x400000
je 0x468b0a
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x34c], ax
lea eax, [ebp - 0x34a]
push eax
call fcn.0046f6e0
push dword [ebp - 0x364]
lea eax, [ebp - 0x34c]
push 0x104
push eax
call fcn.0046fd12
add esp, 0x18
lea eax, [ebp - 0x34c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x34c]
push eax
call fcn.0043b250
add esp, 4
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [ebp - 0x364]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x468b4f
push 0
push 0
push 0
push str.CreateFile
push 0
call fcn.0043fb20
add esp, 0x14
mov dword [ebp - 0x368], eax
jmp 0x468e3f
lea eax, [ebp - 0x37c]
push eax
push 0
lea eax, [ebp - 0x3a0]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov eax, dword [ebp - 0x394]
mov dword [ebp - 0x360], eax
mov eax, dword [ebp - 0x398]
mov dword [ebp - 0x36c], eax
mov ecx, dword [ebp - 0x3a8]
mov eax, ecx
sub eax, dword [ebp - 0x36c]
mov edx, dword [ebp - 0x3a4]
mov dword [ebp - 0x368], eax
mov eax, edx
sbb eax, dword [ebp - 0x360]
mov dword [ebp - 0x394], eax
mov eax, dword [0x4af065]
or eax, dword [0x4af069]
jne 0x468bca
push edx
xorps xmm0, xmm0
push ecx
mov ecx, 0x4af010
movlpd qword [0x4af081], xmm0
call fcn.00428f60
mov ecx, dword [0x4af081]
add ecx, dword [ebp - 0x36c]
mov eax, dword [0x4af085]
adc eax, dword [ebp - 0x360]
push eax
mov dword [0x4af081], ecx
push ecx
mov ecx, 0x4af010
mov dword [0x4af085], eax
call fcn.004293d0
mov ecx, dword [ebp - 0x368]
mov eax, ecx
mov edx, dword [ebp - 0x394]
or eax, edx
mov dword [ebp - 0x36c], 0x100000
je 0x468c2c
test edx, edx
ja 0x468c2c
jb 0x468c22
cmp ecx, 0x100000
jae 0x468c2c
mov eax, ecx
mov dword [ebp - 0x36c], eax
jmp 0x468c31
mov eax, 0x100000
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046a04a
add esp, 4
mov dword [ebp - 0x360], eax
test eax, eax
je 0x468e31
mov dword [eax], 0
mov ecx, dword [0x4b552c]
test ecx, ecx
jne 0x468dee
mov edi, dword [ebp - 0x36c]
jmp 0x468c7a
mov eax, dword [ebp - 0x360]
test esi, esi
je 0x468ca3
test ecx, ecx
jne 0x468ca3
push ecx
lea ecx, [ebp - 0x374]
push ecx
push edi
push eax
push dword [ebp - 0x370]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x468ca3
mov esi, 1
jmp 0x468ca5
xor esi, esi
push esi
push dword [ebp - 0x374]
push edi
push str.XCopyFile____ReadFile_BUFLEN_d_BytesRead_d__d
call fcn.00469290
mov eax, dword [ebp - 0x374]
add esp, 0x10
test eax, eax
je 0x468d57
test esi, esi
je 0x468d57
cmp dword [0x4b552c], 0
jne 0x468cfb
push 0
lea ecx, [ebp - 0x380]
push ecx
push eax
push dword [ebp - 0x360]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x468cfb
mov esi, 1
jmp 0x468cfd
xor esi, esi
push esi
push dword [ebp - 0x380]
push str.XCopyFile____WriteFile_BytesWritten_d__d
call fcn.00469290
mov eax, dword [ebp - 0x380]
add esp, 0xc
cmp eax, dword [ebp - 0x374]
jne 0x468d2a
test esi, esi
je 0x468d2a
mov esi, 1
jmp 0x468d2c
xor esi, esi
test eax, eax
je 0x468d57
mov ecx, dword [0x4af081]
add ecx, eax
mov eax, dword [0x4af085]
mov dword [0x4af081], ecx
adc eax, 0
push eax
push ecx
mov ecx, 0x4af010
mov dword [0x4af085], eax
call fcn.004293d0
cmp dword [ebp - 0x374], 0
je 0x468d72
test esi, esi
je 0x468d76
mov ecx, dword [0x4b552c]
test ecx, ecx
je 0x468c74
test esi, esi
jne 0x468d83
mov edi, dword [ebp - 0x364]
mov esi, 0x17
jmp 0x468d9c
mov edi, dword [ebp - 0x364]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
xor esi, esi
test eax, eax
mov eax, 2
cmove esi, eax
push ebx
mov dword [ebp - 0x368], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
test esi, esi
jne 0x468e21
mov esi, dword [ebp + 0x10]
test esi, 0x100000
je 0x468dc6
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test esi, 0x1000
je 0x468e21
push 1
push 0x48c8a4
push edi
call fcn.00467270
add esp, 0xc
push dword [ebp - 0x360]
call fcn.00470bd4
add esp, 4
jmp 0x468e3b
test dword [ebp + 0x10], 0x100
je 0x468e06
push dword [ebp - 0x364]
push edi
call fcn.004683a0
add esp, 8
push 0
push 0
push 0
push str.CreateFile
push 0
call fcn.0043fb20
add esp, 0x14
mov dword [ebp - 0x368], eax
push dword [ebp - 0x360]
call fcn.00470bd4
add esp, 4
jmp 0x468e3b
mov dword [ebp - 0x368], 8
test ebx, ebx
je 0x468e46
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x370]
test eax, eax
je 0x468e57
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x4b552c], 0
je 0x468e67
mov ebx, 0x4c7
jmp 0x468e6d
mov ebx, dword [ebp - 0x368]
push ebx
push str.XCopyFile____End__d_
call fcn.00469290
mov ecx, dword [ebp - 4]
add esp, 8
mov eax, ebx
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0046ebfa
mov esp, ebp
pop ebp
ret