Function at 0x40a1d0
Capabilities:
Check if file exists
Delete file
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5085bc
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x5635bc]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xa8], ecx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40a219
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [ebp + 8], 0
jne 0x40a226
xor al, al
jmp 0x40a3ff
cmp dword [ebp + 0xc], 0
jne 0x40a233
xor al, al
jmp 0x40a3ff
cmp dword [ebp + 8], 0
jne 0x40a240
xor al, al
jmp 0x40a3ff
cmp dword [ebp + 0xc], 0
jne 0x40a24d
xor al, al
jmp 0x40a3ff
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x80]
call fcn.00401c10
mov dword [ebp - 4], 0
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0x30]
push ecx
call fcn.0043a6e0
add esp, 8
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x80]
call fcn.00401c50
mov edx, dword [ebp + 0xc]
push edx
lea ecx, [ebp - 0x9c]
call fcn.00401c10
mov byte [ebp - 4], 3
lea eax, [ebp - 0x9c]
push eax
lea ecx, [ebp - 0x64]
push ecx
call fcn.0043a6e0
add esp, 8
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x9c]
call fcn.00401c50
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x3c], 0
push 0
push 0x80
push 4
push 0
push 1
push SysReAllocString
lea ecx, [ebp - 0x64]
call fcn.00401cf0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0xffffffff
je 0x40a2f8
push 0
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [eax]
sub edx, dword [ecx]
push edx
call fcn.004594ac
add esp, 4
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], 0
push 0
push 0
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea ecx, [ebp - 0x38]
push ecx
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov ecx, dword [edx]
sub ecx, dword [eax]
push ecx
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
lea ecx, [ebp - 0x30]
call fcn.00401cf0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0xffffffff
je 0x40a38d
push 0
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x3c], eax
push 2
push 0
push 0
mov edx, dword [ebp - 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x48], 0
push 0
lea eax, [ebp - 0x48]
push eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov eax, dword [ecx]
sub eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 0xa1], 1
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x64]
call fcn.00401cc0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.00401cc0
mov al, byte [ebp - 0xa1]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004626fa
mov esp, ebp
pop ebp
ret 0x10