Function at 0x436880
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 [0x4b1120]
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 [0x4c9c48], 0
jne 0x43706d
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 0x437066
mov eax, dword [ebp + 0x10]
and eax, 0x200000
je 0x436947
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 0x43698a
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 0x4369af
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 0
cmp dword [ebp - 0x28], 0
je 0x436a56
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 0x436a4f
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 0x436a26
push str.XCopyFile____Files_are_not_on_the_same_date_
call fcn.00437970
add esp, 4
mov dword [ebp - 0x28], 0
jmp 0x436a4d
lea edx, [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x436a46
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x70], ecx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x6c], edx
jmp 0x436a4d
mov dword [ebp - 0x28], 0
jmp 0x436a56
mov dword [ebp - 0x28], 0
cmp dword [ebp - 0x28], 0
je 0x436aca
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 0x436a9a
push 0
push 0x49839c
call fcn.0040e620
add esp, 8
mov dword [ebp - 0x28], 0
jmp 0x436aca
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 0x436aca
push 0
push 0x49848c
call fcn.0040e620
add esp, 8
mov dword [ebp - 0x28], 0
cmp dword [ebp - 0x28], 0
jne 0x436d61
mov ecx, dword [ebp + 0x10]
and ecx, 0x40000
je 0x436c24
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.00447660
add esp, 0xc
push 0x50
lea ecx, [ebp - 0x1c0]
push ecx
push 0x4984b0
mov edx, dword [ebp + 8]
push edx
call fcn.004383d0
add esp, 0x10
test eax, eax
je 0x436b3f
lea eax, [ebp - 0x1c0]
push eax
call fcn.004387c0
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.00447660
add esp, 0xc
push 0x50
lea eax, [ebp - 0x120]
push eax
push 0x4984c8
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004383d0
add esp, 0x10
test eax, eax
je 0x436b95
lea edx, [ebp - 0x120]
push edx
call fcn.004387c0
add esp, 4
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x1c4], 0
jne 0x436bb1
cmp dword [ebp - 0x7c], 0
jne 0x436bb1
mov eax, dword [ebp + 0x10]
or eax, 0x10000
mov dword [ebp + 0x10], eax
jmp 0x436c24
mov ecx, dword [ebp + 0x10]
and ecx, 0x20000
je 0x436bf1
mov edx, dword [ebp - 0x1c4]
cmp edx, dword [ebp - 0x7c]
jae 0x436bef
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.00437970
add esp, 0x14
jmp 0x43706d
jmp 0x436c24
mov ecx, dword [ebp - 0x1c4]
cmp ecx, dword [ebp - 0x7c]
ja 0x436c24
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.00437970
add esp, 0x14
jmp 0x43706d
mov eax, dword [ebp + 0x10]
and eax, 0x10000
je 0x436c93
mov ecx, dword [ebp + 0x10]
and ecx, 0x20000
je 0x436c67
lea edx, [ebp - 0x20]
push edx
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jle 0x436c65
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.00437970
add esp, 0xc
jmp 0x43706d
jmp 0x436c93
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jl 0x436c93
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.00437970
add esp, 0xc
jmp 0x43706d
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 0
cmp dword [ebp - 0x34], 0
je 0x436cb1
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp + 0x10]
and edx, 0x400000
je 0x436d0f
xor eax, eax
mov word [ebp - 0x3d0], ax
push 0x206
push 0
lea ecx, [ebp - 0x3ce]
push ecx
call fcn.00447660
add esp, 0xc
mov edx, dword [ebp + 0xc]
push edx
push 0x104
lea eax, [ebp - 0x3d0]
push eax
call fcn.0044a00d
add esp, 0xc
lea ecx, [ebp - 0x3d0]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [ebp - 0x3d0]
push edx
call fcn.0040cdb0
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 0x436d4d
push 0
push 0x498788
call fcn.0040e620
add esp, 8
mov dword [ebp - 0x38], eax
jmp 0x43706d
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 [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov ecx, 0x4b34a8
call fcn.0040fb10
mov edx, dword [0x4b3520]
add edx, dword [ebp - 0x70]
mov eax, dword [0x4b3524]
adc eax, dword [ebp - 0x6c]
mov dword [0x4b3520], edx
mov dword [0x4b3524], eax
mov ecx, dword [0x4b3524]
push ecx
mov edx, dword [0x4b3520]
push edx
mov ecx, 0x4b34a8
call fcn.0040fc60
mov dword [ebp - 0x68], 0x100000
mov eax, dword [ebp - 0x60]
or eax, dword [ebp - 0x5c]
je 0x436df7
mov ecx, dword [ebp - 0x68]
xor edx, edx
mov dword [ebp - 0x3e0], ecx
mov dword [ebp - 0x3dc], edx
mov eax, dword [ebp - 0x5c]
cmp eax, dword [ebp - 0x3dc]
ja 0x436df7
jb 0x436df1
mov ecx, dword [ebp - 0x60]
cmp ecx, dword [ebp - 0x3e0]
jae 0x436df7
mov edx, dword [ebp - 0x60]
mov dword [ebp - 0x68], edx
xor ecx, ecx
mov eax, dword [ebp - 0x68]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0044763a
add esp, 4
mov dword [ebp - 0x3d4], eax
mov eax, dword [ebp - 0x3d4]
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
je 0x43705f
push 4
push 0
mov ecx, dword [ebp - 0x64]
push ecx
call fcn.00447660
add esp, 0xc
cmp dword [ebp - 0x34], 0xffffffff
je 0x437019
cmp dword [0x4c9c48], 0
jne 0x437019
cmp dword [ebp - 0x10], 0
je 0x436e8a
cmp dword [0x4c9c48], 0
jne 0x436e8a
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 0x436e8a
mov dword [ebp - 0x3e4], 1
jmp 0x436e94
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.00437970
add esp, 0x10
cmp dword [ebp - 0x44], 0
jbe 0x436f8b
cmp dword [ebp - 0x10], 0
je 0x436f8b
cmp dword [ebp - 0x10], 0
je 0x436f01
cmp dword [0x4c9c48], 0
jne 0x436f01
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 0x436f01
mov dword [ebp - 0x3e8], 1
jmp 0x436f0b
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.00437970
add esp, 0xc
mov edx, dword [ebp - 4]
cmp edx, dword [ebp - 0x44]
jne 0x436f43
cmp dword [ebp - 0x10], 0
je 0x436f43
mov dword [ebp - 0x3ec], 1
jmp 0x436f4d
mov dword [ebp - 0x3ec], 0
mov eax, dword [ebp - 0x3ec]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 4]
xor edx, edx
add ecx, dword [0x4b3520]
mov eax, dword [0x4b3524]
adc eax, edx
mov dword [0x4b3520], ecx
mov dword [0x4b3524], eax
mov ecx, dword [0x4b3524]
push ecx
mov edx, dword [0x4b3520]
push edx
mov ecx, 0x4b34a8
call fcn.0040fc60
cmp dword [ebp - 0x44], 0
je 0x436fa4
cmp dword [ebp - 0x10], 0
je 0x436fa4
cmp dword [0x4c9c48], 0
je 0x436e53
cmp dword [ebp - 0x10], 0
jne 0x436fb3
mov dword [ebp - 0x38], 0x17
jmp 0x436fc8
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x436fc8
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 0x437017
mov edx, dword [ebp + 0x10]
and edx, 0x100000
je 0x436ff9
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 0x437017
push 1
push 0x498584
mov edx, dword [ebp + 0xc]
push edx
call fcn.00437700
add esp, 0xc
jmp 0x437045
mov eax, dword [ebp + 0x10]
and eax, 0x100
je 0x437033
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.004370b0
add esp, 8
push 0
push str.CreateFile
call fcn.0040e620
add esp, 8
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x3d8], eax
mov ecx, dword [ebp - 0x3d8]
push ecx
call fcn.0044a25c
add esp, 4
jmp 0x437066
mov dword [ebp - 0x38], 8
jmp 0x43706d
cmp dword [ebp - 0x34], 0
je 0x43707d
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x24], 0
je 0x43708d
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x38]
push ecx
push str.XCopyFile____End__d_
call fcn.00437970
add esp, 8
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x80]
xor ecx, ebp
call fcn.00447645
mov esp, ebp
pop ebp
ret