Function at 0x140016980
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x460
mov rax, qword [0x14013e040]
xor rax, rsp
mov qword [rsp + 0x450], rax
mov rax, qword [rcx + 0x20]
mov rbx, rcx
mov r15, qword [rcx + 0x10]
mov r13d, r8d
mov rcx, rdx
mov r14, rdx
sub r15, qword [rax]
sub r15, 0x10
sar r15, 4
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_clearerr]
mov rcx, rbx
sub r15d, 1
jne 0x140016a30
mov r8d, 1
mov rdx, r14
call fcn.1400167e0
mov esi, eax
lea ebp, [r13 + 1]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
test eax, eax
je 0x140016d14
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
movsxd rdi, dword [rax]
mov rax, qword [rbx + 0x10]
mov ecx, edi
mov byte [rax + 8], 0
add qword [rbx + 0x10], 0x10
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
test rax, rax
jne 0x140016cca
mov rax, qword [rbx + 0x10]
mov byte [rax + 8], 0
jmp 0x140016ce5
lea edx, [r15 + 0x14]
call fcn.140001950
test eax, eax
je 0x140016d62
mov esi, 1
mov ebp, r13d
xor r12d, r12d
nop dword [rax]
dec r15d
test esi, esi
je 0x1400169eb
mov edx, ebp
mov rcx, rbx
call fcn.1400018e0
movzx edx, byte [rax + 8]
test dl, 0xf
jne 0x140016a7b
mov rcx, qword [rbx + 0x18]
add rcx, 0x50
cmp rax, rcx
je 0x140016b99
and dl, 0xf
cmp dl, 3
jne 0x140016b99
mov edx, ebp
mov qword [rsp + 0x20], r12
mov rcx, rbx
call fcn.1400018e0
cmp byte [rax + 8], 3
jne 0x140016aa1
mov rdi, qword [rax]
jmp 0x140016abe
xor r8d, r8d
lea rdx, [rsp + 0x20]
mov rcx, rax
call fcn.1400323e0
test eax, eax
je 0x140016d79
mov rdi, qword [rsp + 0x20]
test rdi, rdi
jne 0x140016b1f
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getc]
mov ecx, eax
mov rdx, r14
mov edi, eax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ungetc]
lea rdx, [0x1400e2e98]
mov rcx, rbx
call fcn.1400273a0
mov rdx, qword [rbx + 0x10]
mov qword [rdx], rax
movzx ecx, byte [rax + 8]
or cl, 0x40
mov byte [rdx + 8], cl
mov rcx, qword [rbx + 0x18]
add qword [rbx + 0x10], 0x10
cmp qword [rcx + 0x18], r12
jle 0x140016b10
mov rcx, rbx
call fcn.1400151b0
cmp edi, 0xffffffff
mov esi, r12d
setne sil
jmp 0x140016cba
mov qword [rsp + 0x48], rbx
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x30]
mov rax, qword [rbx + 0x10]
mov r8d, 0xffffffff
mov qword [rsp + 0x40], r12
mov rdx, rdi
mov qword [rsp + 0x38], 0x400
mov qword [rax], rcx
lea rcx, [rsp + 0x30]
mov byte [rax + 8], 2
add qword [rbx + 0x10], 0x10
call fcn.140004730
mov r9, r14
mov r8, rdi
mov edx, 1
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add qword [rsp + 0x40], rax
lea rcx, [rsp + 0x30]
mov rdi, rax
call fcn.140004940
test rdi, rdi
mov esi, r12d
setne sil
jmp 0x140016cba
mov edx, ebp
mov rcx, rbx
call fcn.1400018e0
movzx ecx, byte [rax + 8]
and cl, 0xf
cmp cl, 4
je 0x140016bdf
cmp cl, 3
jne 0x140016d93
mov rdx, rax
mov rcx, rbx
call fcn.14001e510
mov rax, qword [rbx + 0x18]
cmp qword [rax + 0x18], r12
jle 0x140016bd5
mov rcx, rbx
call fcn.1400151b0
mov edx, ebp
mov rcx, rbx
call fcn.1400018e0
mov rcx, qword [rax]
add rcx, 0x18
je 0x140016d93
movzx eax, byte [rcx]
cmp al, 0x2a
jne 0x140016bf7
movzx eax, byte [rcx + 1]
cmp al, 0x4c
je 0x140016caa
cmp al, 0x61
je 0x140016c2a
cmp al, 0x6c
je 0x140016c1f
mov rcx, rbx
cmp al, 0x6e
jne 0x140016d84
mov rdx, r14
call fcn.140016450
jmp 0x140016cb8
mov r8d, 1
jmp 0x140016cad
lea rax, [rsp + 0x50]
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x30]
mov rax, qword [rbx + 0x10]
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], 0x400
mov qword [rax], rcx
mov byte [rax + 8], 2
add qword [rbx + 0x10], 0x10
nop dword [rax]
mov edx, 0x400
lea rcx, [rsp + 0x30]
mov r8d, 0xffffffff
call fcn.140004730
mov r9, r14
mov edx, 1
mov r8d, 0x400
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add qword [rsp + 0x40], rax
cmp rax, 0x400
je 0x140016c60
lea rcx, [rsp + 0x30]
call fcn.140004940
mov esi, 1
jmp 0x140016cba
xor r8d, r8d
mov rdx, r14
mov rcx, rbx
call fcn.1400167e0
mov esi, eax
inc ebp
test r15d, r15d
jne 0x140016a50
jmp 0x1400169eb
mov rdx, rax
mov rcx, rbx
call fcn.1400273a0
mov rcx, qword [rbx + 0x10]
mov qword [rcx], rax
movzx eax, byte [rax + 8]
or al, 0x40
mov byte [rcx + 8], al
mov rax, qword [rbx + 0x18]
add qword [rbx + 0x10], 0x10
cmp qword [rax + 0x18], 0
jle 0x140016cfd
mov rcx, rbx
call fcn.1400151b0
mov rcx, qword [rbx + 0x10]
mov eax, 3
mov qword [rcx], rdi
mov byte [rcx + 8], 3
add qword [rbx + 0x10], 0x10
jmp 0x140016d37
test esi, esi
jne 0x140016d32
mov edx, 0xfffffffe
mov rcx, rbx
call fcn.140001a70
mov rax, qword [rbx + 0x10]
mov byte [rax + 8], sil
add qword [rbx + 0x10], 0x10
sub ebp, r13d
mov eax, ebp
mov rcx, qword [rsp + 0x450]
xor rcx, rsp
call fcn.1400dce40
mov rbx, qword [rsp + 0x4b8]
add rsp, 0x460
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, str.too_many_arguments
mov rcx, rbx
lea rdx, str.stack_overflow___s_
call fcn.1400040e0
int3
mov edx, ebp
mov rcx, rbx
call fcn.140004510
int3
lea r8, str.invalid_format
mov edx, ebp
call fcn.140003e60
int3
mov r8d, 4
mov edx, ebp
mov rcx, rbx
call fcn.140003ff0
int3