Function at 0x140027070
Capabilities:
Check if file exists
Get file attributes
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0x88
mov r13, rdx
mov r14, rcx
mov edx, 1
mov rdi, r8
lea ecx, [rdx + 9]
call fcn.1402deebc
mov rdx, qword [rdi]
lea rcx, [rbp - 0x29]
add rax, 8
mov qword [rbp - 0x29], rax
mov edx, dword [rdx - 8]
call fcn.14001e440
mov rdx, qword [rdi]
mov rbx, qword [rbp - 0x29]
mov rcx, rbx
mov eax, dword [rdx - 8]
add eax, eax
movsxd r8, eax
call fcn.1402d15b0
mov rdx, qword [rdi]
lea rcx, [rbp - 0x21]
call fcn.140021d70
mov rsi, qword [rbp - 0x21]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1400270fc
mov rcx, rsi
call fcn.14001de70
mov edx, 1
lea rax, vtable.SFile.0
mov qword [rbp - 9], rax
lea ecx, [rdx + 9]
call fcn.1402deebc
xor r12d, r12d
add rax, 8
mov qword [rbp + 7], rax
mov qword [rbp - 1], r12
lea edx, [r12 + 1]
lea ecx, [rdx + 9]
call fcn.1402deebc
add rax, 8
mov r15, 0xffffffffffffffff
mov qword [rbp + 0x67], rax
mov rdx, r15
inc rdx
cmp word [rbx + rdx*2], r12w
jne 0x140027142
lea rcx, [rbp + 0x67]
call fcn.14001e440
mov rcx, qword [rbp + 0x67]
mov rdx, rbx
mov eax, dword [rcx - 8]
lea eax, [rax*2 + 2]
movsxd r8, eax
call fcn.1402d15b0
lea rdx, [rbp + 0x67]
lea rcx, [rbp + 0x7f]
call fcn.14001da90
lea rcx, [rbp + 7]
mov rdi, rax
mov rdx, qword [rax]
mov edx, dword [rdx - 8]
call fcn.14001e440
mov rdx, qword [rdi]
mov rdi, qword [rbp + 7]
mov rcx, rdi
mov eax, dword [rdx - 8]
add eax, eax
movsxd r8, eax
call fcn.1402d15b0
mov rcx, qword [rbp + 0x7f]
test rcx, rcx
je 0x1400271b6
add rcx, 0xfffffffffffffff8
call fcn.1402d83b4
mov qword [rsp + 0x30], r12
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
xor r8d, r8d
mov edx, 0xc0000000
mov dword [rsp + 0x20], 2
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, r15
jne 0x1400271f0
xor r12d, r12d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rax, qword [r14 + 0x30]
imul rdi, r13, 0x78
mov qword [rbp - 0x11], rdi
mov rcx, qword [rdi + rax + 8]
test rcx, rcx
je 0x14002746c
mov eax, dword [rdi + rax + 0x10]
cmp eax, 1
jne 0x140027266
add ecx, 0x1000
mov edx, eax
call fcn.1402deebc
mov rdx, qword [rbp + 0x6f]
mov r8, rax
mov rcx, r14
mov r13, rax
call fcn.140026e00
mov rax, qword [r14 + 0x30]
mov r8d, dword [rdi + rax + 8]
test r8d, r8d
je 0x140027259
lea r9, [rbp + 0x6f]
mov qword [rsp + 0x20], 0
mov rdx, r13
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r13
call fcn.1402d83b4
jmp 0x14002746c
mov rdx, qword [r14]
lea rcx, [r14 + 8]
mov r8d, 0x40
test eax, eax
jne 0x140027331
call fcn.14001e170
mov rdx, qword [r14 + 0x30]
lea r8, [rbp + 0x6f]
mov rcx, qword [r14 + 0x10]
xor r9d, r9d
mov rdx, qword [rdi + rdx + 0x38]
mov qword [rbp + 0x6f], rdx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov edx, 1
mov ecx, 0x1001000
call fcn.1402deebc
mov r13, rax
mov rax, qword [r14 + 0x30]
mov rdi, qword [rdi + rax + 8]
test rdi, rdi
je 0x140027329
nop
cmp rdi, 0x1000000
ja 0x1400272da
xor eax, eax
mov r15d, edi
mov dword [rbp + 0x6f], eax
mov edi, eax
test r15d, r15d
je 0x140027322
jmp 0x1400272e8
mov r15d, 0x1000000
sub rdi, r15
xor eax, eax
mov dword [rbp + 0x6f], eax
mov rcx, qword [r14 + 0x10]
lea r9, [rbp + 0x6f]
mov r8d, r15d
mov qword [rsp + 0x20], rax
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
lea r9, [rbp + 0x67]
mov qword [rsp + 0x20], 0
mov r8d, r15d
mov rdx, r13
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test rdi, rdi
jne 0x1400272c0
mov r15, 0xffffffffffffffff
mov rcx, r13
jmp 0x140027450
xor r13d, r13d
call fcn.14001e170
mov rdx, qword [r14 + 0x30]
lea r8, [rbp + 0x67]
mov rcx, qword [r14 + 0x10]
xor r9d, r9d
mov rdx, qword [rdi + rdx + 0x38]
mov qword [rbp + 0x67], rdx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
lea edx, [r13 + 1]
mov ecx, 0x1001000
call fcn.1402deebc
mov qword [rbp - 0x19], rax
mov rax, qword [r14 + 0x30]
cmp qword [rdi + rax + 8], r13
jbe 0x14002744c
mov rsi, qword [rbp - 0x19]
mov rbx, rdi
nop
mov rcx, qword [r14 + 0x10]
lea r9, [rbp + 0x67]
xor r15d, r15d
lea rdx, [rbp + 0x6f]
mov dword [rbp + 0x67], r15d
mov qword [rsp + 0x20], r15
lea r8d, [r15 + 4]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [rbp + 0x6f]
lea edx, [r15 + 1]
add ecx, 0x100
call fcn.1402deebc
mov r8d, dword [rbp + 0x6f]
mov rdi, rax
mov dword [rbp + 0x67], r15d
test r8d, r8d
je 0x1400273da
mov rcx, qword [r14 + 0x10]
lea r9, [rbp + 0x67]
mov rdx, rax
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rax, qword [r14 + 0x30]
lea r9, [rbp + 0x67]
mov r8, rsi
mov qword [rbp + 0x67], 0x1000000
mov ecx, dword [rbx + rax + 0x14]
xor dword [rdi], ecx
mov rcx, rdi
mov edx, dword [rbp + 0x6f]
call fcn.140033e50
mov r15, qword [rbp + 0x67]
test r15d, r15d
je 0x140027423
lea r9, [rbp + 0x7f]
mov qword [rsp + 0x20], 0
mov r8d, r15d
mov rdx, rsi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
add r13, r15
call fcn.1402d83b4
mov rax, qword [r14 + 0x30]
cmp r13, qword [rbx + rax + 8]
jb 0x140027380
mov rbx, qword [rbp - 0x29]
mov r15, 0xffffffffffffffff
mov rsi, qword [rbp - 0x21]
mov rcx, qword [rbp - 0x19]
call fcn.1402d83b4
mov rcx, qword [r14 + 0x10]
test rcx, rcx
je 0x14002746c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r14 + 0x10], 0
test r12, r12
je 0x14002747d
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r12d, r12d
mov rax, qword [r14 + 0x30]
mov rdx, qword [rbp - 0x11]
mov rdi, qword [rdx + rax + 0x40]
test rdi, rdi
je 0x140027579
mov r14, qword [rdx + rax + 0x48]
mov edx, 1
lea ecx, [rdx + 9]
call fcn.1402deebc
add rax, 8
mov qword [rbp + 0x6f], rax
nop dword [rax]
inc r15
cmp word [rbx + r15*2], 0
jne 0x1400274b0
mov rdx, r15
lea rcx, [rbp + 0x6f]
call fcn.14001e440
mov rcx, qword [rbp + 0x6f]
mov rdx, rbx
mov eax, dword [rcx - 8]
lea eax, [rax*2 + 2]
movsxd r8, eax
call fcn.1402d15b0
lea rdx, [rbp + 0x6f]
lea rcx, [rbp - 0x19]
call fcn.14001da90
mov rax, rdi
mov dword [rbp - 0x11], edi
mov rdi, qword [rbp - 0x19]
xor r9d, r9d
shr rax, 0x20
mov edx, 0x40000000
mov dword [rbp - 0xd], eax
mov rcx, rdi
mov qword [rsp + 0x30], 0
mov rax, r14
shr rax, 0x20
lea r8d, [r9 + 7]
mov dword [rsp + 0x28], 0x80
mov dword [rbp + 0x6b], eax
mov dword [rbp + 0x83], eax
mov dword [rbp + 0x67], r14d
mov dword [rbp + 0x7f], r14d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x14002756b
lea r9, [rbp + 0x67]
mov rcx, rax
lea r8, [rbp + 0x7f]
lea rdx, [rbp - 0x11]
call qword [sym.imp.KERNEL32.dll_SetFileTime]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rdi, rdi
je 0x140027579
lea rcx, [rdi - 8]
call fcn.1402d83b4
test r12, r12
je 0x140027587
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbp + 7]
test rax, rax
je 0x140027599
lea rcx, [rax - 8]
call fcn.1402d83b4
test rsi, rsi
je 0x1400275a7
lea rcx, [rsi - 8]
call fcn.1402d83b4
test rbx, rbx
je 0x1400275b5
lea rcx, [rbx - 8]
call fcn.1402d83b4
mov rcx, qword [rbp + 0x77]
mov rcx, qword [rcx]
test rcx, rcx
je 0x1400275ca
add rcx, 0xfffffffffffffff8
call fcn.1402d83b4
mov eax, 1
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret