Function at 0x140001bf0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x30
lea rdx, [0x14001f0c8]
lea rcx, [0x14001f6d8]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
mov qword [0x14001f6d0], rax
test rax, rax
jne 0x140001c2f
lea rdx, [0x14001f6d8]
lea ecx, [rax + 0xe]
call fcn.1400026c0
mov rax, qword [0x14001f6d0]
movzx r8d, byte [0x14001f5b3]
lea rdx, [rsp + 0x20]
mov rcx, rax
call fcn.1400013e0
mov edi, dword [rsp + 0x20]
xor ebx, ebx
test edi, edi
jne 0x140001c70
cmp byte [0x14001f5b2], bl
jne 0x140001c70
mov ecx, ebx
lea rdx, [0x14001f6d8]
cmp byte [0x14001f5b3], cl
setne cl
add ecx, 0x1a
call fcn.1400026c0
cmp byte [0x14001f5c8], bl
mov qword [0x14001f5c0], rbx
je 0x140001cba
test edi, edi
je 0x140001cba
lea rdx, [0x14001f0cc]
lea rcx, [0x14001f5c8]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
mov qword [0x14001f5c0], rax
test rax, rax
jne 0x140001cba
cmp byte [0x14001f5b3], bl
lea rdx, [0x14001f5c8]
setne bl
lea ecx, [rbx + 0x20]
call fcn.1400026c0
mov rcx, qword [0x14001f6d0]
xor r8d, r8d
xor edx, edx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
mov edi, dword [rsp + 0x24]
mov rbx, qword [0x14001fb10]
test edi, edi
je 0x140001d67
nop
mov r9, qword [0x14001f6d0]
mov edx, 1
mov rcx, qword [0x14001f5b8]
mov r8d, edi
cmp rbx, r8
cmovbe r8, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
mov rcx, qword [0x14001f6d0]
mov rbx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
test eax, eax
je 0x140001d26
lea rdx, [0x14001f6d8]
mov ecx, 0x12
call fcn.1400026c0
test rbx, rbx
je 0x140001d60
mov r9, qword [0x14001f8f0]
mov r8, rbx
mov rcx, qword [0x14001f5b8]
mov edx, 1
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
cmp rbx, rax
je 0x140001d5c
lea rdx, [0x14001f8f8]
mov ecx, 0x13
call fcn.1400026c0
sub edi, ebx
jne 0x140001ce0
mov rbx, qword [0x14001fb10]
mov rcx, qword [0x14001f5c0]
test rcx, rcx
je 0x140001e11
mov edi, dword [rsp + 0x28]
test edi, edi
je 0x140001e0a
mov r9, qword [0x14001f6d0]
mov edx, 1
mov rcx, qword [0x14001f5b8]
mov r8d, edi
cmp rbx, r8
cmovbe r8, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
mov rcx, qword [0x14001f6d0]
mov rbx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
test eax, eax
je 0x140001dc9
lea rdx, [0x14001f6d8]
mov ecx, 0x12
call fcn.1400026c0
test rbx, rbx
je 0x140001e03
mov r9, qword [0x14001f5c0]
mov r8, rbx
mov rcx, qword [0x14001f5b8]
mov edx, 1
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
cmp rbx, rax
je 0x140001dff
lea rdx, [0x14001f5c8]
mov ecx, 0x13
call fcn.1400026c0
sub edi, ebx
jne 0x140001d83
mov rcx, qword [0x14001f5c0]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose
jmp 0x140001e27
mov edx, dword [rsp + 0x28]
mov r8d, 1
mov rcx, qword [0x14001f6d0]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
mov rbx, qword [0x14001fb10]
mov edi, 0xffffffff
mov r9, qword [0x14001f6d0]
mov edx, 1
mov rcx, qword [0x14001f5b8]
mov r8d, edi
cmp rbx, r8
cmovbe r8, rbx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
mov rcx, qword [0x14001f6d0]
mov rbx, rax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
test eax, eax
je 0x140001e79
lea rdx, [0x14001f6d8]
mov ecx, 0x12
call fcn.1400026c0
test rbx, rbx
je 0x140001eb3
mov r9, qword [0x14001f8f0]
mov r8, rbx
mov rcx, qword [0x14001f5b8]
mov edx, 1
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
cmp rbx, rax
je 0x140001eaf
lea rdx, [0x14001f8f8]
mov ecx, 0x13
call fcn.1400026c0
sub edi, ebx
jne 0x140001e33
mov rcx, qword [0x14001f6d0]
mov rbx, qword [rsp + 0x40]
add rsp, 0x30
pop rdi
jmp sub.api_ms_win_crt_stdio_l1_1_0.dll_fclose