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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x290
push ebx
push esi
push edi
xor edi, edi
push edi
push edi
push 3
push edi
push edi
push 0xc0000000
push dword [ebp + 8]
mov dword [ebp - 0x10], edi
mov byte [ebp - 6], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x40176a
lea ecx, [ebp - 0x5c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [ebp - 0x58]
cmp eax, dword [0x42e40c]
jl 0x401762
jg 0x401247
mov eax, dword [ebp - 0x5c]
cmp eax, dword [0x42e408]
jb 0x401762
xor eax, eax
push 0x206
mov word [ebp - 0x28c], ax
lea eax, [ebp - 0x28a]
push edi
push eax
call sub.ntdll.dll_memset
add esp, 0xc
push 0x1f
push 0xb
lea eax, [ebp - 0x28c]
call fcn.0040949b
pop ecx
pop ecx
push 0x42f090
lea eax, [ebp - 0x28c]
push eax
push dword [ebp + 0xc]
mov ebx, 0x412018
push ecx
push 0x8eb82152
push 8
push ebx
call fcn.00408770
add esp, 0x10
push eax
lea ecx, [ebp - 0x10]
call fcn.004096cc
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x401310
mov esi, dword [ebp - 0x10]
call fcn.004060d7
and dword [ebp - 0x10], 0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x28c], ax
lea eax, [ebp - 0x28a]
push eax
call sub.ntdll.dll_memset
add esp, 0xc
push 0x1f
push 0xb
lea eax, [ebp - 0x28c]
call fcn.0040949b
pop ecx
pop ecx
push 0x42f090
lea eax, [ebp - 0x28c]
push eax
push dword [ebp + 0xc]
push ecx
push 0x8eb82152
push 8
push ebx
call fcn.00408770
add esp, 0x10
push eax
lea ecx, [ebp - 0x10]
call fcn.004096cc
add esp, 0x10
push dword [ebp - 0x10]
call edi
cmp eax, 0xffffffff
jne 0x4012ac
mov bx, word [0x42e424]
mov ecx, dword [ebp - 0x5c]
and dword [ebp - 0x1c], 0
and dword [ebp - 0x14], 0
mov esi, dword [ebp - 0x58]
movzx eax, bx
cdq
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], edx
mov edx, dword [0x42e438]
mov eax, ecx
sub eax, edx
mov dword [ebp - 0x64], eax
mov eax, esi
sbb eax, dword [0x42e43c]
mov byte [ebp - 5], 0
cmp eax, dword [ebp - 0x48]
jl 0x4013ab
jg 0x401364
mov eax, dword [ebp - 0x64]
cmp eax, dword [ebp - 0x4c]
jbe 0x4013ab
sub ecx, dword [ebp - 0x4c]
mov edi, dword [0x42e430]
sbb esi, dword [ebp - 0x48]
sub ecx, edx
sbb esi, dword [0x42e43c]
push 0
push edi
movzx eax, bx
mov ebx, ecx
push esi
push ebx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x34], eax
call sub.ntdll.dll__alldiv
mov cl, byte [0x42e402]
movzx edx, cl
cmp eax, edx
ja 0x4013a3
mov byte [ebp - 5], 1
mov dword [ebp - 0x1c], ebx
jmp 0x4013b1
mov byte [ebp - 5], cl
mov dword [ebp - 0x14], eax
jmp 0x4013b1
movzx eax, cx
mov dword [ebp - 0x34], eax
and dword [ebp - 0x18], 0
cmp byte [ebp - 5], 0
je 0x401403
movzx ebx, byte [ebp - 5]
mov edi, ebx
push 0
shl edi, 3
call fcn.00405fb6
pop ecx
mov dword [ebp - 0x18], eax
test eax, eax
je 0x401760
xor esi, esi
test ebx, ebx
je 0x401403
mov eax, dword [ebp - 0x14]
call fcn.00408d42
xor ecx, ecx
test esi, esi
je 0x4013f8
mov edx, dword [ebp - 0x18]
cmp dword [edx + ecx*8], eax
je 0x4013dd
inc ecx
cmp ecx, esi
jb 0x4013eb
mov ecx, dword [ebp - 0x18]
mov dword [ecx + esi*8], eax
inc esi
cmp esi, ebx
jb 0x4013dd
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x80]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov edi, dword [0x42e3f8]
add edi, 2
push 8
call fcn.00405fb6
mov ebx, eax
xor esi, esi
pop ecx
cmp ebx, esi
je 0x401758
movzx eax, word [0x42e41c]
push esi
push esi
push dword [0x42e43c]
lea eax, [eax + ebx + 0x17]
push dword [0x42e438]
mov dword [ebp - 0x14], eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
movzx edi, word [ebp - 0x34]
push esi
lea eax, [ebp - 0x48]
push eax
push edi
push dword [ebp - 0x14]
mov dword [ebp - 0x28], edi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp + 0x10]
xor eax, eax
mov word [ebx + 4], ax
mov al, byte [ebp - 5]
mov byte [ebx + 8], al
mov eax, dword [ebp - 0x1c]
mov dword [ebx + 9], eax
mov ax, word [0x42e438]
mov dword [ebx], 0x52627244
mov word [ebx + 0xf], ax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
mov word [ebx + 6], ax
mov ax, word [ebp - 0x34]
mov word [ebx + 0xd], ax
mov eax, dword [ebp - 0x14]
call fcn.00406b6a
mov dword [ebx + 0x11], eax
mov ax, word [0x42e41c]
lea ecx, [ebx + 0x17]
movzx edi, ax
push ecx
mov word [ebx + 0x15], ax
call fcn.00409925
cmp byte [ebp - 5], 0
pop ecx
mov dword [ebp - 0x24], esi
je 0x4014ee
mov edi, dword [ebp - 0x1c]
push esi
call fcn.00405fb6
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, esi
je 0x401751
movzx eax, byte [ebp - 5]
movzx ecx, word [ebx + 6]
lea edi, [ecx + eax*8 + 0x18]
push esi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x50], edi
call fcn.00405fb6
mov edi, eax
pop ecx
mov dword [ebp - 0x14], edi
cmp edi, esi
je 0x401749
mov eax, dword [ebp - 0x7c]
push dword [ebp + 0x10]
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x80]
mov dword [edi], eax
mov eax, dword [ebp - 0x74]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x78]
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x60]
mov dword [edi + 0x14], eax
mov eax, dword [ebp - 0x64]
mov dword [edi + 0x10], eax
lea eax, [edi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x30]
push eax
push ebx
mov dword [ebp - 0x30], esi
call fcn.004073c5
pop ecx
pop ecx
mov dword [ebp - 0x70], eax
cmp dword [ebp - 0x30], esi
je 0x401742
mov dword [ebp - 0x38], esi
cmp dword [ebp - 0x2c], esi
jbe 0x40161f
mov eax, dword [ebp - 0x28]
cdq
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], edx
mov ecx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + ecx*8]
mov edi, dword [ebp - 0x1c]
imul eax, edi
xor ecx, ecx
add eax, dword [ebp - 0x6c]
push esi
adc ecx, dword [ebp - 0x68]
add eax, dword [0x42e438]
push esi
adc ecx, dword [0x42e43c]
mov dword [ebp - 0x44], eax
push ecx
push eax
push dword [ebp - 0xc]
mov dword [ebp - 0x40], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push esi
lea eax, [ebp - 0x20]
push eax
push edi
push dword [ebp - 0x24]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x24]
call fcn.00406b6a
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x38]
push esi
push dword [ebp - 0x1c]
mov dword [ecx + edi*8 + 4], eax
movzx eax, word [0x42e41c]
push dword [ebp - 0x24]
push eax
lea eax, [ebx + 0x17]
push eax
call fcn.0040686f
add esp, 0x14
push esi
push esi
push dword [ebp - 0x40]
push dword [ebp - 0x44]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
push esi
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x24]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
inc edi
mov dword [ebp - 0x38], edi
cmp edi, dword [ebp - 0x2c]
jb 0x401575
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x2c]
shl eax, 3
push eax
movzx eax, word [ebx + 6]
push dword [ebp - 0x18]
lea eax, [eax + edi + 0x18]
push eax
call sub.ntdll.dll_memcpy
movzx eax, word [0x42e41c]
add esp, 0xc
push esi
push dword [ebp - 0x50]
push edi
push eax
lea eax, [ebx + 0x17]
push eax
call fcn.0040686f
add esp, 0x14
push esi
push esi
push dword [0x42e43c]
push dword [0x42e438]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov edi, dword [ebp - 0x28]
push esi
call fcn.00405fb6
pop ecx
mov dword [ebp - 0x2c], eax
cmp eax, esi
je 0x40169e
push eax
call fcn.00409925
pop ecx
push esi
mov esi, dword [ebp - 0x2c]
lea eax, [ebp - 0x20]
push eax
push edi
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
call fcn.004060d7
xor esi, esi
jmp 0x4016ca
xor eax, eax
cmp ax, word [ebp - 0x34]
jae 0x4016ca
mov eax, 0xff
call fcn.00408d42
push esi
mov byte [ebp - 6], al
lea eax, [ebp - 0x20]
push eax
push 1
lea eax, [ebp - 6]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
dec edi
jne 0x4016a6
push 2
push esi
xor eax, eax
mov dword [ebp - 0x44], esi
lea edi, [ebp - 0x40]
stosd dword es:[edi], eax
push dword [ebp - 0x40]
push dword [ebp - 0x44]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x50]
push dword [ebp - 0x14]
push dword [ebp - 0xc]
call edi
push esi
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x70]
push dword [ebp - 0x30]
push dword [ebp - 0xc]
call edi
push esi
lea eax, [ebp - 0x20]
push eax
push dword [0x42e404]
push dword [0x42e420]
push dword [ebp - 0xc]
call edi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push dword [ebp - 0xc]
call fcn.00403fa9
mov esi, dword [ebp - 0x30]
pop ecx
call fcn.004060d7
mov edi, dword [ebp - 0x14]
mov byte [ebp - 6], 1
mov esi, edi
call fcn.004060d7
mov esi, dword [ebp - 0x24]
call fcn.004060d7
mov eax, ebx
call fcn.0040611d
mov esi, dword [ebp - 0x18]
call fcn.004060d7
xor edi, edi
mov esi, dword [ebp - 0xc]
call fcn.004087bc
cmp dword [ebp - 0x10], edi
je 0x40178f
cmp byte [ebp - 6], 0
je 0x401787
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.004060d7
mov al, byte [ebp - 6]
pop edi
pop esi
pop ebx
leave
ret