Function at 0x1400096f0
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
mov r11, rsp
push rbx
push rbp
push rsi
push rdi
sub rsp, 0x288
mov rax, qword [0x1402ba4e0]
xor rax, rsp
mov qword [rsp + 0x270], rax
xor ebp, ebp
mov rdi, r8
mov rsi, rdx
mov rbx, rcx
test rcx, rcx
je 0x1400099d7
test rdx, rdx
je 0x1400099d7
mov qword [r11 + 0x10], r12
mov ecx, 0x1ffff
mov dword [rsp + 0x40], ebp
mov qword [r11 + 0x18], r13
call fcn.14010a204
mov qword [rsp + 0x30], rbp
lea r8d, [rbp + 3]
xor r9d, r9d
mov edx, 0xc0000000
mov rcx, rbx
mov dword [rsp + 0x28], ebp
mov r13, rax
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x1400099b6
lea r9, [rsp + 0x40]
mov r8d, 0x1fffe
mov rdx, r13
mov rcx, rax
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, r12
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x1400099b6
cmp dword [rsp + 0x40], ebp
je 0x1400099b6
lea rcx, [rsp + 0x161]
xor edx, edx
mov r8d, 0x103
mov byte [rsp + 0x160], bpl
call fcn.14010da60
lea rcx, [rsp + 0x160]
sub rcx, rsi
nop word [rax + rax]
movzx eax, byte [rsi]
inc rsi
mov byte [rcx + rsi - 1], al
test al, al
jne 0x1400097e0
lea rcx, [rsp + 0x51]
xor edx, edx
mov r8d, 0x103
mov byte [rsp + 0x50], bpl
call fcn.14010da60
cmp dword [0x1402c0964], ebp
je 0x140009843
test rdi, rdi
je 0x140009830
cmp byte [rdi], bpl
je 0x140009830
lea rcx, [rsp + 0x50]
sub rcx, rdi
nop
movzx eax, byte [rdi]
inc rdi
mov byte [rcx + rdi - 1], al
test al, al
jne 0x140009820
jmp 0x140009843
lea rdx, [rsp + 0x50]
mov r8d, 0x103
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
xor r9d, r9d
mov qword [rsp + 0x30], rbp
lea rcx, [rsp + 0x50]
lea r8d, [r9 + 1]
mov edx, 0x80000000
mov dword [rsp + 0x28], ebp
mov r12d, ebp
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400099b6
xor edx, edx
mov rcx, rax
mov qword [rsp + 0x2c8], r14
mov qword [rsp + 0x280], r15
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov eax, dword [rsp + 0x40]
lea edi, [rsi + rax + 8]
mov eax, 8
mov ecx, edi
and ecx, 7
sub eax, ecx
add edi, eax
mov ecx, edi
mov r15d, edi
call fcn.14010a204
mov r14, rax
test rax, rax
je 0x14000991c
mov r8d, r15d
xor edx, edx
mov rcx, rax
call fcn.14010da60
lea r9, [rsp + 0x44]
mov r8d, esi
mov rdx, r14
mov rcx, rbx
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000991c
cmp dword [rsp + 0x44], esi
jne 0x14000991c
mov rax, qword [0x1401eaf40]
lea rcx, [rsi + r14 + 8]
mov rdx, r13
mov qword [rsi + r14], rax
mov r8d, dword [rsp + 0x40]
call fcn.14010c9b0
mov edx, edi
mov rcx, r14
sub edx, esi
call fcn.1400d8f80
mov r12d, eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r15, qword [rsp + 0x280]
test r12d, r12d
je 0x1400099ae
mov qword [rsp + 0x30], rbp
lea rcx, [rsp + 0x160]
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x1400099ae
lea r9, [rsp + 0x44]
mov r8d, edi
mov rdx, r14
mov rcx, rax
mov qword [rsp + 0x20], rbp
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x140009992
cmp dword [rsp + 0x44], edi
mov eax, 1
cmove ebp, eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x1400099ae
lea rcx, [rsp + 0x160]
call fcn.1400d7ee0
mov ebp, eax
mov r14, qword [rsp + 0x2c8]
mov r12, qword [rsp + 0x2b8]
test r13, r13
je 0x1400099cb
mov rcx, r13
call fcn.14010d304
mov r13, qword [rsp + 0x2c0]
mov eax, ebp
jmp 0x1400099d9
xor eax, eax
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.14010d170
add rsp, 0x288
pop rdi
pop rsi
pop rbp
pop rbx
ret