Function at 0x45e970
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 0x45f0f0
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 0x45f0dc
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 0x45ea87
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 0x45eb9e
mov eax, dword [ebp - 0x360]
test eax, eax
je 0x45eb9e
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 0x45eb9e
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 0x45eb2a
push str.XCopyFile____Files_are_not_on_the_same_date_
call fcn.0045f520
add esp, 4
jmp 0x45eb9e
lea eax, [ebp - 0x388]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x45eb9e
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 0x45eb8d
push dword [ebp - 0x384]
push dword [ebp - 0x388]
push dword [ebp - 0x370]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x45ee0e
push eax
push eax
push 0
push 0x48c898
push 0
call fcn.0042e900
add esp, 0x14
mov eax, dword [ebp + 0x10]
test eax, 0x40000
je 0x45ecc8
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.0046a390
push 0x50
lea eax, [ebp - 0xa4]
push eax
push 0x49558c
push edi
call fcn.0045fb50
add esp, 0x1c
test eax, eax
je 0x45ebfd
lea eax, [ebp - 0xa4]
push eax
call fcn.0045fdf0
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.0046a390
push 0x50
lea eax, [ebp - 0x144]
push eax
push 0x49558c
push dword [ebp - 0x364]
call fcn.0045fb50
add esp, 0x1c
test eax, eax
je 0x45ec49
lea eax, [ebp - 0x144]
push eax
call fcn.0045fdf0
add esp, 4
jmp 0x45ec4b
xor eax, eax
mov ecx, dword [ebp - 0x360]
test ecx, ecx
jne 0x45ec66
test eax, eax
jne 0x45ec66
mov eax, dword [ebp + 0x10]
or eax, 0x10000
mov dword [ebp + 0x10], eax
jmp 0x45ecc8
test dword [ebp + 0x10], 0x20000
je 0x45ec9a
cmp ecx, eax
jae 0x45ecc5
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.0045f520
add esp, 0x14
jmp 0x45f0cb
cmp ecx, eax
ja 0x45ecc5
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.0045f520
add esp, 0x14
jmp 0x45f0cb
mov eax, dword [ebp + 0x10]
test eax, 0x10000
je 0x45ed2a
test eax, 0x20000
lea eax, [ebp - 0x390]
push eax
lea eax, [ebp - 0x37c]
push eax
je 0x45ed07
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jle 0x45ed2a
push dword [ebp - 0x364]
push edi
push str.XCopyFile__s___s___First_file_time_is_later_than_second_file_time
call fcn.0045f520
add esp, 0xc
jmp 0x45f0cb
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
js 0x45ed2a
push dword [ebp - 0x364]
push edi
push str.XCopyFile__s___s___First_file_time_is_later_or_equal_than_second_file_time
call fcn.0045f520
add esp, 0xc
jmp 0x45f0cb
xorps xmm0, xmm0
movlpd qword [ebp - 0x398], xmm0
test ebx, ebx
je 0x45ed40
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test dword [ebp + 0x10], 0x400000
je 0x45ed9a
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x34c], ax
lea eax, [ebp - 0x34a]
push eax
call fcn.0046a390
push dword [ebp - 0x364]
lea eax, [ebp - 0x34c]
push 0x104
push eax
call fcn.0046bf5a
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 0x45eddf
push 0
push 0
push 0
push str.CreateFile
push 0
call fcn.0042e900
add esp, 0x14
mov dword [ebp - 0x368], eax
jmp 0x45f0cf
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 0x45ee5a
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 0x45eebc
test edx, edx
ja 0x45eebc
jb 0x45eeb2
cmp ecx, 0x100000
jae 0x45eebc
mov eax, ecx
mov dword [ebp - 0x36c], eax
jmp 0x45eec1
mov eax, 0x100000
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00464dea
add esp, 4
mov dword [ebp - 0x360], eax
test eax, eax
je 0x45f0c1
mov dword [eax], 0
mov ecx, dword [0x4c2e50]
test ecx, ecx
jne 0x45f07e
mov edi, dword [ebp - 0x36c]
jmp 0x45ef0a
mov eax, dword [ebp - 0x360]
test esi, esi
je 0x45ef33
test ecx, ecx
jne 0x45ef33
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 0x45ef33
mov esi, 1
jmp 0x45ef35
xor esi, esi
push esi
push dword [ebp - 0x374]
push edi
push str.XCopyFile____ReadFile_BUFLEN_d_BytesRead_d__d
call fcn.0045f520
mov eax, dword [ebp - 0x374]
add esp, 0x10
test eax, eax
je 0x45efe7
test esi, esi
je 0x45efe7
cmp dword [0x4c2e50], 0
jne 0x45ef8b
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 0x45ef8b
mov esi, 1
jmp 0x45ef8d
xor esi, esi
push esi
push dword [ebp - 0x380]
push str.XCopyFile____WriteFile_BytesWritten_d__d
call fcn.0045f520
mov eax, dword [ebp - 0x380]
add esp, 0xc
cmp eax, dword [ebp - 0x374]
jne 0x45efba
test esi, esi
je 0x45efba
mov esi, 1
jmp 0x45efbc
xor esi, esi
test eax, eax
je 0x45efe7
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 0x45f002
test esi, esi
je 0x45f006
mov ecx, dword [0x4c2e50]
test ecx, ecx
je 0x45ef04
test esi, esi
jne 0x45f013
mov edi, dword [ebp - 0x364]
mov esi, 0x17
jmp 0x45f02c
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 0x45f0b1
mov esi, dword [ebp + 0x10]
test esi, 0x100000
je 0x45f056
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test esi, 0x1000
je 0x45f0b1
push 1
push 0x487854
push edi
call fcn.0045d800
add esp, 0xc
push dword [ebp - 0x360]
call fcn.0046d795
add esp, 4
jmp 0x45f0cb
test dword [ebp + 0x10], 0x100
je 0x45f096
push dword [ebp - 0x364]
push edi
call fcn.0045e630
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.0046d795
add esp, 4
jmp 0x45f0cb
mov dword [ebp - 0x368], 8
test ebx, ebx
je 0x45f0d6
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x370]
test eax, eax
je 0x45f0e7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x4c2e50], 0
je 0x45f0f7
mov ebx, 0x4c7
jmp 0x45f0fd
mov ebx, dword [ebp - 0x368]
push ebx
push str.XCopyFile____End__d_
call fcn.0045f520
mov ecx, dword [ebp - 4]
add esp, 8
mov eax, ebx
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004698aa
mov esp, ebp
pop ebp
ret