Function at 0x40a895
Capabilities:
Check if file exists
Read file on windows
Timestomp file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
mov eax, dword [0x492840]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x108]
push esi
mov esi, dword [ebp + 0xc]
push edi
push 0x104
xor edi, edi
push edi
push eax
call fcn.0043dc10
add esp, 0xc
mov dword [ebp - 0x10c], edi
mov dword [ebp - 0x120], edi
mov dword [ebp - 0x118], edi
test ebx, ebx
je 0x40a98c
cmp byte [ebx], 0
je 0x40a98c
test esi, esi
je 0x40a98c
cmp byte [esi], 0
je 0x40a98c
mov ecx, dword [ebp + 0x14]
mov eax, 0x106
push 6
pop edx
push edi
push 0x61a8
test ecx, ecx
push edi
cmove eax, edx
mov dword [ebp - 0x110], eax
lea eax, [edx + 0x7b]
push 0x20
xor edx, edx
push 3
inc edx
test ecx, ecx
push edi
push 7
cmove eax, edx
push eax
push ebx
call fcn.0040b32b
add esp, 0x24
mov dword [ebp - 0x114], eax
cmp eax, 0xffffffff
jne 0x40a99d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 2
je 0x40a98c
cmp edi, 3
je 0x40a98c
cmp edi, 0xf
je 0x40a98c
cmp edi, 0x35
je 0x40a98c
push str.tempGetStoreId.dat
push esi
call fcn.0042ecfe
pop ecx
pop ecx
push edi
push str._GetLastError_
push dword [ebp + 0x10]
push esi
push ebx
test eax, eax
je 0x40a97f
push str.:1:CopyFileSafe___s_____s____d__FAILED:_CreateFile_hSrc__FAILED:_Note_that_this_error_may_have_been_caused_by_GetUpdateFromBranchStore__:__s_ld
jmp 0x40a984
push str.:1:CopyFileSafe___s_____s____d__FAILED:_CreateFile_hSrc__FAILED:__s_ld
call fcn.0040953d
add esp, 0x18
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043c5ec
leave
ret
push 0x104
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.0042ee2a
lea eax, [ebp - 0x108]
push eax
call fcn.0042e2bc
lea eax, [ebp - 0x108]
push eax
call fcn.0042da83
add esp, 0x14
test eax, eax
jne 0x40aa07
lea eax, [ebp - 0x108]
push eax
call fcn.004476a0
pop ecx
cmp byte [ebp + eax - 0x109], 0x5c
jne 0x40aa07
push 0x104
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.0042ee2a
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.0042de39
add esp, 0x14
push edi
push 0x61a8
push edi
mov edi, dword [ebp + 0x10]
xor eax, eax
test edi, edi
push SQLGetDiagRec
sete al
inc eax
push eax
push 0
push 7
push dword [ebp - 0x110]
lea eax, [ebp - 0x108]
push eax
call fcn.0040b32b
add esp, 0x24
mov dword [ebp - 0x110], eax
cmp eax, 0xffffffff
jne 0x40aa8a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
je 0x40aa6b
cmp eax, 0xb7
je 0x40aa6b
push str._GetLastError_
push eax
push edi
push esi
push ebx
push str.:1:CopyFileSafe___s_____s____d__FAILED:_CreateFile_hDest__FAILED:_GetLastError___should_be___ld:__s
call fcn.0040953d
add esp, 0x18
push 0xbe4
push str.C:UsersOfficeDocumentsVisual_StudioHoodSoftUpdateFile.c
push str.CopyFileSafe
push dword [ebp - 0x114]
call fcn.0040a58b
jmp 0x40a98c
push 0x100000
call fcn.0044772b
pop ecx
mov ecx, eax
mov dword [ebp - 0x124], ecx
test ecx, ecx
je 0x40ab97
xor eax, eax
and dword [ebp - 0x118], eax
mov dword [ebp - 0x11c], eax
jmp 0x40aabb
mov ecx, dword [ebp - 0x124]
and dword [ebp - 0x10c], 0
lea eax, [ebp - 0x10c]
push 0
push eax
push 0x100000
push ecx
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40ab14
mov eax, dword [0x49bea8]
mov ecx, eax
inc eax
mov dword [0x49bea8], eax
cmp ecx, 0xa
jae 0x40ab0e
push str._GetLastError_
push dword [ebp - 0x10c]
push edi
push esi
push ebx
push str.CopyFileSafe___s_____s____d__FAILED:_ReadFile___FAILED_Could_only_read__ld_bytes:__s
call fcn.0040906e
add esp, 0x18
inc dword [ebp - 0x118]
cmp dword [ebp - 0x10c], 0
jbe 0x40ab89
and dword [ebp - 0x120], 0
lea eax, [ebp - 0x120]
push 0
push eax
push dword [ebp - 0x10c]
push dword [ebp - 0x124]
push dword [ebp - 0x110]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40ab7c
mov eax, dword [0x49bea8]
mov ecx, eax
inc eax
mov dword [0x49bea8], eax
cmp ecx, 0xa
jae 0x40ab76
push str._GetLastError_
push dword [ebp - 0x120]
push edi
push esi
push ebx
push str.CopyFileSafe___s_____s____d__FAILED:_WriteFile___FAILED:_Could_only_write__ld_bytes:__s
call fcn.0040906e
add esp, 0x18
inc dword [ebp - 0x11c]
cmp dword [ebp - 0x10c], 0
ja 0x40aab5
push dword [ebp - 0x124]
call fcn.0044731f
pop ecx
jmp 0x40aba1
mov dword [ebp - 0x11c], 1
cmp dword [ebp + 0x14], 0
je 0x40ac15
lea eax, [ebp - 0x128]
push eax
lea eax, [ebp - 0x130]
push eax
lea eax, [ebp - 0x138]
push eax
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_GetFileTime]
test eax, eax
je 0x40ac00
lea eax, [ebp - 0x128]
push eax
lea eax, [ebp - 0x130]
push eax
lea eax, [ebp - 0x138]
push eax
push dword [ebp - 0x110]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
jne 0x40ac15
push str._GetLastError_
push edi
push esi
push ebx
push str.:5:CopyFileSafe___s_____s____d__FAILED:_Could_not_SET_the_destination_files_time_stamp:__s
jmp 0x40ac0d
push str._GetLastError_
push edi
push esi
push ebx
push str.:5:CopyFileSafe___s_____s____d__FAILED:_Could_not_GET_the_source_files_time_stamp:__s
call fcn.0040953d
add esp, 0x14
push 0xc1e
mov edi, str.C:UsersOfficeDocumentsVisual_StudioHoodSoftUpdateFile.c
mov esi, str.CopyFileSafe
push edi
push esi
push dword [ebp - 0x110]
call fcn.0040a58b
push 0xc1f
push edi
push esi
push dword [ebp - 0x114]
call fcn.0040a58b
cmp dword [ebp - 0x118], 0
jne 0x40a98c
cmp dword [ebp - 0x11c], 0
jne 0x40a98c
xor eax, eax
inc eax
jmp 0x40a98e