Function at 0x14008f3a6
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x88
mov rax, qword [rdx]
mov rbx, rdx
xor edx, edx
mov qword [rsp + 0x30], rax
mov r12, rcx
mov dword [rsp + 0x3c], 0x7d0
mov dword [rsp + 0x38], edx
mov eax, dword [rsp + 0x38]
lea r15d, [rax + 1]
cmp dword [r12], r15d
jle 0x14008f636
mov rax, qword [rbx]
movsxd r13, r15d
lea rdi, [r13*8]
mov rsi, qword [rax + r13*8]
cmp byte [rsi], 0x40
jne 0x14008f62c
dec dword [rsp + 0x3c]
jne 0x14008f42c
mov r8, qword [rax]
mov ecx, 2
mov qword [rsp + 0x20], r8
call qword [fcn.14009ff50]
mov r8, qword [rsp + 0x20]
lea rdx, str._s:_error:_too_many___files_encountered_n
mov rcx, rax
jmp 0x14008f479
inc rsi
lea rdx, [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.msvcrt.dll__stat64]
test eax, eax
js 0x14008f62c
mov ax, word [rsp + 0x4e]
and ax, 0xf000
cmp ax, 0x4000
jne 0x14008f488
mov rax, qword [rbx]
mov ecx, 2
mov r8, qword [rax]
mov qword [rsp + 0x20], r8
call qword [fcn.14009ff50]
mov r8, qword [rsp + 0x20]
lea rdx, str._s:_error:___file_refers_to_a_directory_n
mov rcx, rax
call fcn.14008f07e
mov ecx, 1
call fcn.1400964d0
lea rdx, [0x1400dea75]
mov rcx, rsi
call sub.msvcrt.dll_fopen
mov qword [rsp + 0x20], rax
test rax, rax
je 0x14008f62c
xor edx, edx
mov r8d, 2
mov rcx, rax
call sub.msvcrt.dll_fseek
inc eax
je 0x14008f622
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_ftell
movsxd rsi, eax
cmp esi, 0xffffffff
je 0x14008f622
mov rcx, qword [rsp + 0x20]
xor r8d, r8d
xor edx, edx
call sub.msvcrt.dll_fseek
inc eax
je 0x14008f622
lea rcx, [rsi + 1]
call fcn.140096583
mov r9, qword [rsp + 0x20]
mov r8, rsi
mov edx, 1
mov rcx, rax
mov qword [rsp + 0x28], rax
call sub.msvcrt.dll_fread
mov rbp, rax
cmp rsi, rax
je 0x14008f532
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_ferror
test eax, eax
je 0x14008f532
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
jmp 0x14008f622
mov rax, qword [rsp + 0x28]
mov byte [rax + rbp], 0
mov rdx, rax
movzx eax, byte [rdx]
test al, al
je 0x14008f557
mov rsi, qword [0x1400e0770]
test byte [rsi + rax*2], 0x40
je 0x14008f56c
inc rdx
jmp 0x14008f53e
mov ecx, 8
call fcn.140096583
mov rbp, rax
xor eax, eax
mov qword [rbp], rax
jmp 0x14008f579
mov rcx, qword [rsp + 0x28]
call fcn.14008f13a
mov rbp, rax
mov rax, qword [rsp + 0x30]
cmp qword [rbx], rax
jne 0x14008f58e
mov rcx, rax
call fcn.14008f0a0
mov qword [rbx], rax
xor r14d, r14d
cmp qword [rbp + r14*8], 0
je 0x14008f59e
inc r14
jmp 0x14008f591
mov rax, qword [rbx]
mov rsi, rbp
mov rcx, qword [rax + r13*8]
add r13, r14
call sub.msvcrt.dll_free
movsxd rax, dword [r12]
mov rcx, qword [rbx]
lea rdx, [r14 + rax + 1]
shl rdx, 3
call fcn.1400965f5
mov edx, dword [r12]
mov qword [rbx], rax
lea r9, [rax + rdi + 8]
lea rcx, [rax + r13*8]
sub edx, r15d
movsxd rdx, edx
lea r8, [rdx*8]
mov rdx, r9
call sub.msvcrt.dll_memmove
mov rax, qword [rbx]
lea rcx, [r14*8]
add rax, rdi
mov rdi, rax
rep movsb byte [rdi], byte [rsi]
mov rcx, rbp
mov eax, dword [r12]
lea eax, [rax + r14 - 1]
mov dword [r12], eax
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x28]
call sub.msvcrt.dll_free
mov r15d, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x20]
call sub.msvcrt.dll_fclose
mov dword [rsp + 0x38], r15d
jmp 0x14008f3d5
add rsp, 0x88
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret