Function at 0x45e910
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 [0x4a86f0]
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 [0x4c2e50], eax
jne 0x45f090
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 0x45f07c
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 0x45ea27
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 0x45eb3e
mov eax, dword [ebp - 0x360]
test eax, eax
je 0x45eb3e
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 0x45eb3e
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 0x45eaca
push str.XCopyFile____Files_are_not_on_the_same_date_
call fcn.0045f4c0
add esp, 4
jmp 0x45eb3e
lea eax, [ebp - 0x388]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x45eb3e
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 0x45eb2d
push dword [ebp - 0x384]
push dword [ebp - 0x388]
push dword [ebp - 0x370]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x45edae
push eax
push eax
push 0
push 0x48c888
push 0
call fcn.0042e900
add esp, 0x14
mov eax, dword [ebp + 0x10]
test eax, 0x40000
je 0x45ec68
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.0046a330
push 0x50
lea eax, [ebp - 0xa4]
push eax
push 0x49559c
push edi
call fcn.0045faf0
add esp, 0x1c
test eax, eax
je 0x45eb9d
lea eax, [ebp - 0xa4]
push eax
call fcn.0045fd90
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.0046a330
push 0x50
lea eax, [ebp - 0x144]
push eax
push 0x49559c
push dword [ebp - 0x364]
call fcn.0045faf0
add esp, 0x1c
test eax, eax
je 0x45ebe9
lea eax, [ebp - 0x144]
push eax
call fcn.0045fd90
add esp, 4
jmp 0x45ebeb
xor eax, eax
mov ecx, dword [ebp - 0x360]
test ecx, ecx
jne 0x45ec06
test eax, eax
jne 0x45ec06
mov eax, dword [ebp + 0x10]
or eax, 0x10000
mov dword [ebp + 0x10], eax
jmp 0x45ec68
test dword [ebp + 0x10], 0x20000
je 0x45ec3a
cmp ecx, eax
jae 0x45ec65
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.0045f4c0
add esp, 0x14
jmp 0x45f06b
cmp ecx, eax
ja 0x45ec65
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.0045f4c0
add esp, 0x14
jmp 0x45f06b
mov eax, dword [ebp + 0x10]
test eax, 0x10000
je 0x45ecca
test eax, 0x20000
lea eax, [ebp - 0x390]
push eax
lea eax, [ebp - 0x37c]
push eax
je 0x45eca7
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jle 0x45ecca
push dword [ebp - 0x364]
push edi
push str.XCopyFile__s___s___First_file_time_is_later_than_second_file_time
call fcn.0045f4c0
add esp, 0xc
jmp 0x45f06b
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
js 0x45ecca
push dword [ebp - 0x364]
push edi
push str.XCopyFile__s___s___First_file_time_is_later_or_equal_than_second_file_time
call fcn.0045f4c0
add esp, 0xc
jmp 0x45f06b
xorps xmm0, xmm0
movlpd qword [ebp - 0x398], xmm0
test ebx, ebx
je 0x45ece0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test dword [ebp + 0x10], 0x400000
je 0x45ed3a
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x34c], ax
lea eax, [ebp - 0x34a]
push eax
call fcn.0046a330
push dword [ebp - 0x364]
lea eax, [ebp - 0x34c]
push 0x104
push eax
call fcn.0046befa
add esp, 0x18
lea eax, [ebp - 0x34c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x34c]
push eax
call fcn.0042c370
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 0x45ed7f
push 0
push 0
push 0
push str.CreateFile
push 0
call fcn.0042e900
add esp, 0x14
mov dword [ebp - 0x368], eax
jmp 0x45f06f
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 [0x4a808d]
or eax, dword [0x4a8091]
jne 0x45edfa
push edx
xorps xmm0, xmm0
push ecx
mov ecx, 0x4a8038
movlpd qword [0x4a80a9], xmm0
call fcn.00430290
mov ecx, dword [0x4a80a9]
add ecx, dword [ebp - 0x36c]
mov eax, dword [0x4a80ad]
adc eax, dword [ebp - 0x360]
push eax
mov dword [0x4a80a9], ecx
push ecx
mov ecx, 0x4a8038
mov dword [0x4a80ad], eax
call fcn.00430700
mov ecx, dword [ebp - 0x368]
mov eax, ecx
mov edx, dword [ebp - 0x394]
or eax, edx
mov dword [ebp - 0x36c], 0x100000
je 0x45ee5c
test edx, edx
ja 0x45ee5c
jb 0x45ee52
cmp ecx, 0x100000
jae 0x45ee5c
mov eax, ecx
mov dword [ebp - 0x36c], eax
jmp 0x45ee61
mov eax, 0x100000
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00464d8a
add esp, 4
mov dword [ebp - 0x360], eax
test eax, eax
je 0x45f061
mov dword [eax], 0
mov ecx, dword [0x4c2e50]
test ecx, ecx
jne 0x45f01e
mov edi, dword [ebp - 0x36c]
jmp 0x45eeaa
mov eax, dword [ebp - 0x360]
test esi, esi
je 0x45eed3
test ecx, ecx
jne 0x45eed3
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 0x45eed3
mov esi, 1
jmp 0x45eed5
xor esi, esi
push esi
push dword [ebp - 0x374]
push edi
push str.XCopyFile____ReadFile_BUFLEN_d_BytesRead_d__d
call fcn.0045f4c0
mov eax, dword [ebp - 0x374]
add esp, 0x10
test eax, eax
je 0x45ef87
test esi, esi
je 0x45ef87
cmp dword [0x4c2e50], 0
jne 0x45ef2b
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 0x45ef2b
mov esi, 1
jmp 0x45ef2d
xor esi, esi
push esi
push dword [ebp - 0x380]
push str.XCopyFile____WriteFile_BytesWritten_d__d
call fcn.0045f4c0
mov eax, dword [ebp - 0x380]
add esp, 0xc
cmp eax, dword [ebp - 0x374]
jne 0x45ef5a
test esi, esi
je 0x45ef5a
mov esi, 1
jmp 0x45ef5c
xor esi, esi
test eax, eax
je 0x45ef87
mov ecx, dword [0x4a80a9]
add ecx, eax
mov eax, dword [0x4a80ad]
mov dword [0x4a80a9], ecx
adc eax, 0
push eax
push ecx
mov ecx, 0x4a8038
mov dword [0x4a80ad], eax
call fcn.00430700
cmp dword [ebp - 0x374], 0
je 0x45efa2
test esi, esi
je 0x45efa6
mov ecx, dword [0x4c2e50]
test ecx, ecx
je 0x45eea4
test esi, esi
jne 0x45efb3
mov edi, dword [ebp - 0x364]
mov esi, 0x17
jmp 0x45efcc
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 0x45f051
mov esi, dword [ebp + 0x10]
test esi, 0x100000
je 0x45eff6
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test esi, 0x1000
je 0x45f051
push 1
push 0x487854
push edi
call fcn.0045d7b0
add esp, 0xc
push dword [ebp - 0x360]
call fcn.0046d735
add esp, 4
jmp 0x45f06b
test dword [ebp + 0x10], 0x100
je 0x45f036
push dword [ebp - 0x364]
push edi
call fcn.0045e5d0
add esp, 8
push 0
push 0
push 0
push str.CreateFile
push 0
call fcn.0042e900
add esp, 0x14
mov dword [ebp - 0x368], eax
push dword [ebp - 0x360]
call fcn.0046d735
add esp, 4
jmp 0x45f06b
mov dword [ebp - 0x368], 8
test ebx, ebx
je 0x45f076
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x370]
test eax, eax
je 0x45f087
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x4c2e50], 0
je 0x45f097
mov ebx, 0x4c7
jmp 0x45f09d
mov ebx, dword [ebp - 0x368]
push ebx
push str.XCopyFile____End__d_
call fcn.0045f4c0
mov ecx, dword [ebp - 4]
add esp, 8
mov eax, ebx
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0046984a
mov esp, ebp
pop ebp
ret