Function at 0x40f465
Capabilities:
Get file size
Read file via mapping
Timestomp file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
or dword [ebp - 0x10], 0xffffffff
push ebx
push esi
xor esi, esi
push edi
mov dword [ebp - 0x18], ecx
push esi
push 0x8003
lea ecx, [ebp - 0x7c]
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
call fcn.004161d1
mov edi, dword [ebp + 8]
mov ecx, edi
call fcn.004024bf
mov edi, dword [edi + 4]
mov ebx, 0x80
push esi
push ebx
push 3
push esi
push 1
push SysReAllocString
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
call edi
cmp dword [ebp - 0x10], eax
mov dword [ebp + 8], eax
je 0x40f4c8
lea ecx, [ebp - 0x10]
call fcn.00410d02
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
push esi
push esi
push esi
push 2
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp dword [ebp - 8], eax
mov dword [ebp + 8], eax
je 0x40f4ed
lea ecx, [ebp - 8]
call fcn.004055d3
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
push esi
push esi
push esi
push 4
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp + 8], eax
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 8]
je 0x40f514
lea ecx, [ebp - 4]
call fcn.00410ef9
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, dword [eax]
push esi
push dword [ebp - 0x10]
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0xfffffffffffffffc
pop ecx
sub ecx, dword [ebp + 8]
push 1
push esi
push dword [ebp - 4]
add eax, ecx
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x14], eax
call fcn.004164c8
test al, al
je 0x40f56a
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
push dword [ebp - 0x14]
lea eax, [ecx + eax + 4]
lea ecx, [ebp - 0x7c]
push eax
call fcn.004166fe
test al, al
je 0x40f56a
mov ecx, dword [ebp - 0x18]
lea eax, [ebp - 0x7c]
push eax
call fcn.0040f264
test eax, eax
jne 0x40f594
lea ecx, [ebp - 0x7c]
call fcn.00416262
lea ecx, [ebp - 4]
call fcn.00410ef9
lea ecx, [ebp - 8]
call fcn.004055d3
lea ecx, [ebp - 0x10]
call fcn.00410d02
mov eax, 0x80090006
jmp 0x40f6f7
mov ecx, dword [ebp + 0xc]
or dword [ebp - 0xc], 0xffffffff
call fcn.004024bf
mov eax, dword [ebp + 0xc]
push esi
push ebx
push 2
mov eax, dword [eax + 4]
push esi
push 1
push 0x40000000
push eax
call edi
mov edi, eax
cmp dword [ebp - 0xc], edi
je 0x40f5c7
lea ecx, [ebp - 0xc]
call fcn.00410d02
mov dword [ebp - 0xc], edi
or ebx, 0xffffffff
cmp dword [ebp - 0xc], ebx
jne 0x40f623
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0xc], ebx
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0xc], eax
je 0x40f5eb
push dword [ebp - 0xc]
call edi
mov dword [ebp - 0xc], ebx
lea ecx, [ebp - 0x7c]
call fcn.00416262
cmp dword [ebp - 4], esi
je 0x40f604
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 4], esi
cmp dword [ebp - 8], esi
je 0x40f611
push dword [ebp - 8]
call edi
mov dword [ebp - 8], esi
cmp dword [ebp - 0x10], ebx
je 0x40f61b
push dword [ebp - 0x10]
call edi
mov eax, dword [ebp + 0xc]
jmp 0x40f6f7
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x1c]
push esi
push eax
mov eax, dword [ebp - 4]
push dword [ebp - 0x14]
lea eax, [ecx + eax + 4]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40f694
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0xc], ebx
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0xc], eax
je 0x40f65f
push dword [ebp - 0xc]
call edi
mov dword [ebp - 0xc], ebx
lea ecx, [ebp - 0x7c]
call fcn.00416262
cmp dword [ebp - 4], esi
je 0x40f678
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 4], esi
cmp dword [ebp - 8], esi
je 0x40f685
push dword [ebp - 8]
call edi
mov dword [ebp - 8], esi
cmp dword [ebp - 0x10], ebx
je 0x40f68f
push dword [ebp - 0x10]
call edi
mov eax, dword [ebp + 0xc]
jmp 0x40f6f7
lea eax, [ebp - 0x24]
push eax
push esi
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea eax, [ebp - 0x24]
push eax
push esi
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp - 0xc], ebx
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x40f6c5
push dword [ebp - 0xc]
call edi
mov dword [ebp - 0xc], ebx
lea ecx, [ebp - 0x7c]
call fcn.00416262
cmp dword [ebp - 4], esi
je 0x40f6de
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 4], esi
cmp dword [ebp - 8], esi
je 0x40f6eb
push dword [ebp - 8]
call edi
mov dword [ebp - 8], esi
cmp dword [ebp - 0x10], ebx
je 0x40f6f5
push dword [ebp - 0x10]
call edi
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8