Function at 0x4557e0
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, 0x3ec
mov eax, dword [0x4ce724]
xor eax, ebp
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x40], 0
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0xc], 0
xor ecx, ecx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x20], 0
xor edx, edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x30], 0
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x10], 1
mov dword [ebp - 4], 0
mov dword [ebp - 0x44], 0
cmp dword [0x4e8c34], 0
jne 0x45600b
push 0
push 0x80
push 3
push 0
push 1
push closesocket
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
je 0x456004
mov eax, dword [ebp + 0x10]
and eax, 0x200000
je 0x4558a7
mov dword [ebp - 0x28], 1
xor ecx, ecx
mov word [ebp - 0x54], cx
xor edx, edx
mov dword [ebp - 0x52], edx
mov dword [ebp - 0x4e], edx
mov dword [ebp - 0x4a], edx
mov word [ebp - 0x46], dx
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea ecx, [ebp - 0xc]
push ecx
push 0
push 0
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
jne 0x4558ea
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0x3c], eax
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x45590f
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 0
cmp dword [ebp - 0x28], 0
je 0x4559b6
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0xffffffff
je 0x4559af
lea ecx, [ebp - 0x20]
push ecx
push 0
push 0
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea eax, [ebp - 0xc]
push eax
lea ecx, [ebp - 0x20]
push ecx
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
je 0x455986
push str.XCopyFile____Files_are_not_on_the_same_date_
call fcn.00456fc0
add esp, 4
mov dword [ebp - 0x28], 0
jmp 0x4559ad
lea edx, [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x4559a6
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x70], ecx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x6c], edx
jmp 0x4559ad
mov dword [ebp - 0x28], 0
jmp 0x4559b6
mov dword [ebp - 0x28], 0
cmp dword [ebp - 0x28], 0
je 0x455a36
mov dword [ebp - 0x78], 0
xor eax, eax
mov dword [ebp - 0x74], eax
push 2
push 0
mov ecx, dword [ebp - 0x74]
push ecx
mov edx, dword [ebp - 0x78]
push edx
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x455a00
push 0
push 0
push 0
push 0x4bda64
push 0
call fcn.0040ece0
add esp, 0x14
mov dword [ebp - 0x28], 0
jmp 0x455a36
push 0
push 0
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x455a36
push 0
push 0
push 0
push 0x4bdb74
push 0
call fcn.0040ece0
add esp, 0x14
mov dword [ebp - 0x28], 0
cmp dword [ebp - 0x28], 0
jne 0x455cd3
mov ecx, dword [ebp + 0x10]
and ecx, 0x40000
je 0x455b90
mov dword [ebp - 0x1c4], 0
xor edx, edx
mov word [ebp - 0x1c0], dx
push 0x9e
push 0
lea eax, [ebp - 0x1be]
push eax
call fcn.00467d60
add esp, 0xc
push 0x50
lea ecx, [ebp - 0x1c0]
push ecx
push 0x4bdb98
mov edx, dword [ebp + 8]
push edx
call fcn.00457a00
add esp, 0x10
test eax, eax
je 0x455aab
lea eax, [ebp - 0x1c0]
push eax
call fcn.00457df0
add esp, 4
mov dword [ebp - 0x1c4], eax
mov dword [ebp - 0x7c], 0
xor ecx, ecx
mov word [ebp - 0x120], cx
push 0x9e
push 0
lea edx, [ebp - 0x11e]
push edx
call fcn.00467d60
add esp, 0xc
push 0x50
lea eax, [ebp - 0x120]
push eax
push 0x4bdbb0
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00457a00
add esp, 0x10
test eax, eax
je 0x455b01
lea edx, [ebp - 0x120]
push edx
call fcn.00457df0
add esp, 4
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x1c4], 0
jne 0x455b1d
cmp dword [ebp - 0x7c], 0
jne 0x455b1d
mov eax, dword [ebp + 0x10]
or eax, 0x10000
mov dword [ebp + 0x10], eax
jmp 0x455b90
mov ecx, dword [ebp + 0x10]
and ecx, 0x20000
je 0x455b5d
mov edx, dword [ebp - 0x1c4]
cmp edx, dword [ebp - 0x7c]
jae 0x455b5b
lea eax, [ebp - 0x120]
push eax
lea ecx, [ebp - 0x1c0]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
push str.XCopyFile__s___s___First_file_version___s__is_later_than_second_file_version___s_
call fcn.00456fc0
add esp, 0x14
jmp 0x45600b
jmp 0x455b90
mov ecx, dword [ebp - 0x1c4]
cmp ecx, dword [ebp - 0x7c]
ja 0x455b90
lea edx, [ebp - 0x120]
push edx
lea eax, [ebp - 0x1c0]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.XCopyFile__s___s___First_file_version___s__is_later_or_equal_than_second_file_version___s_
call fcn.00456fc0
add esp, 0x14
jmp 0x45600b
mov eax, dword [ebp + 0x10]
and eax, 0x10000
je 0x455bff
mov ecx, dword [ebp + 0x10]
and ecx, 0x20000
je 0x455bd3
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jle 0x455bd1
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
push str.XCopyFile__s___s___First_file_time_is_later_than_second_file_time
call fcn.00456fc0
add esp, 0xc
jmp 0x45600b
jmp 0x455bff
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jl 0x455bff
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
push str.XCopyFile__s___s___First_file_time_is_later_or_equal_than_second_file_time
call fcn.00456fc0
add esp, 0xc
jmp 0x45600b
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 0
cmp dword [ebp - 0x34], 0
je 0x455c1d
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp + 0x10]
and edx, 0x400000
je 0x455c7b
xor eax, eax
mov word [ebp - 0x3d0], ax
push 0x206
push 0
lea ecx, [ebp - 0x3ce]
push ecx
call fcn.00467d60
add esp, 0xc
mov edx, dword [ebp + 0xc]
push edx
push 0x104
lea eax, [ebp - 0x3d0]
push eax
call fcn.0046a6ad
add esp, 0xc
lea ecx, [ebp - 0x3d0]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [ebp - 0x3d0]
push edx
call fcn.0040d340
add esp, 4
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0xffffffff
jne 0x455cbf
push 0
push 0
push 0
push 0x4bde70
push 0
call fcn.0040ece0
add esp, 0x14
mov dword [ebp - 0x38], eax
jmp 0x45600b
lea ecx, [ebp - 0xc]
push ecx
push 0
lea edx, [ebp - 0x40]
push edx
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov ecx, dword [ebp - 0x18]
sub ecx, dword [ebp - 0x70]
mov edx, dword [ebp - 0x14]
sbb edx, dword [ebp - 0x6c]
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x5c], edx
mov eax, dword [0x4d0a15]
or eax, dword [0x4d0a19]
jne 0x455d18
mov dword [0x4d0a31], 0
mov dword [0x4d0a35], 0
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov ecx, 0x4d09c0
call fcn.00412610
mov eax, dword [0x4d0a31]
add eax, dword [ebp - 0x70]
mov ecx, dword [0x4d0a35]
adc ecx, dword [ebp - 0x6c]
mov dword [0x4d0a31], eax
mov dword [0x4d0a35], ecx
mov edx, dword [0x4d0a35]
push edx
mov eax, dword [0x4d0a31]
push eax
mov ecx, 0x4d09c0
call fcn.00412760
mov dword [ebp - 0x68], 0x100000
mov ecx, dword [ebp - 0x60]
or ecx, dword [ebp - 0x5c]
je 0x455d89
mov edx, dword [ebp - 0x68]
xor eax, eax
mov dword [ebp - 0x3e0], edx
mov dword [ebp - 0x3dc], eax
mov ecx, dword [ebp - 0x5c]
cmp ecx, dword [ebp - 0x3dc]
ja 0x455d89
jb 0x455d83
mov edx, dword [ebp - 0x60]
cmp edx, dword [ebp - 0x3e0]
jae 0x455d89
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x68], eax
xor ecx, ecx
mov eax, dword [ebp - 0x68]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00466bee
add esp, 4
mov dword [ebp - 0x3d4], eax
mov eax, dword [ebp - 0x3d4]
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
je 0x455ffd
push 4
push 0
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.00467d60
add esp, 0xc
cmp dword [ebp - 0x34], 0xffffffff
je 0x455fb1
cmp dword [0x4e8c34], 0
jne 0x455fb1
cmp dword [ebp - 0x10], 0
je 0x455e1c
cmp dword [0x4e8c34], 0
jne 0x455e1c
push 0
lea edx, [ebp - 0x44]
push edx
mov eax, dword [ebp - 0x68]
push eax
mov ecx, dword [ebp - 0x64]
push ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x455e1c
mov dword [ebp - 0x3e4], 1
jmp 0x455e26
mov dword [ebp - 0x3e4], 0
mov eax, dword [ebp - 0x3e4]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x44]
push edx
mov eax, dword [ebp - 0x68]
push eax
push str.XCopyFile____ReadFile_BUFLEN_d_BytesRead_d__d
call fcn.00456fc0
add esp, 0x10
cmp dword [ebp - 0x44], 0
jbe 0x455f23
cmp dword [ebp - 0x10], 0
je 0x455f23
cmp dword [ebp - 0x10], 0
je 0x455e93
cmp dword [0x4e8c34], 0
jne 0x455e93
push 0
lea ecx, [ebp - 4]
push ecx
mov edx, dword [ebp - 0x44]
push edx
mov eax, dword [ebp - 0x64]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x455e93
mov dword [ebp - 0x3e8], 1
jmp 0x455e9d
mov dword [ebp - 0x3e8], 0
mov edx, dword [ebp - 0x3e8]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 4]
push ecx
push str.XCopyFile____WriteFile_BytesWritten_d__d
call fcn.00456fc0
add esp, 0xc
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x44]
jne 0x455ed5
cmp dword [ebp - 0x10], 0
je 0x455ed5
mov dword [ebp - 0x3ec], 1
jmp 0x455edf
mov dword [ebp - 0x3ec], 0
mov eax, dword [ebp - 0x3ec]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 4], 0
jbe 0x455f23
mov ecx, dword [ebp - 4]
xor edx, edx
add ecx, dword [0x4d0a31]
mov eax, dword [0x4d0a35]
adc eax, edx
mov dword [0x4d0a31], ecx
mov dword [0x4d0a35], eax
mov ecx, dword [0x4d0a35]
push ecx
mov edx, dword [0x4d0a31]
push edx
mov ecx, 0x4d09c0
call fcn.00412760
cmp dword [ebp - 0x44], 0
je 0x455f3c
cmp dword [ebp - 0x10], 0
je 0x455f3c
cmp dword [0x4e8c34], 0
je 0x455de5
cmp dword [ebp - 0x10], 0
jne 0x455f4b
mov dword [ebp - 0x38], 0x17
jmp 0x455f60
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x455f60
mov dword [ebp - 0x38], 2
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x34], 0
cmp dword [ebp - 0x38], 0
jne 0x455faf
mov edx, dword [ebp + 0x10]
and edx, 0x100000
je 0x455f91
push 0x80
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, dword [ebp + 0x10]
and ecx, 0x1000
je 0x455faf
push 1
push 0x4bdc6c
mov edx, dword [ebp + 0xc]
push edx
call fcn.004566b0
add esp, 0xc
jmp 0x455fe3
mov eax, dword [ebp + 0x10]
and eax, 0x100
je 0x455fcb
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00456060
add esp, 8
push 0
push 0
push 0
push str.CreateFile
push 0
call fcn.0040ece0
add esp, 0x14
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x3d8], eax
mov ecx, dword [ebp - 0x3d8]
push ecx
call fcn.0046ad12
add esp, 4
jmp 0x456004
mov dword [ebp - 0x38], 8
jmp 0x45600b
cmp dword [ebp - 0x34], 0
je 0x45601b
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x24], 0
je 0x45602b
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x4e8c34], 0
je 0x45603b
mov dword [ebp - 0x38], 0x4c7
mov ecx, dword [ebp - 0x38]
push ecx
push str.XCopyFile____End__d_
call fcn.00456fc0
add esp, 8
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x80]
xor ecx, ebp
call fcn.00467d4f
mov esp, ebp
pop ebp
ret