Function at 0x140166e30
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x60
mov rax, qword [0x14021f740]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov ebp, r8d
mov rdi, rcx
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
xor r15d, r15d
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x50], r15
mov r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], r15b
jne 0x140166e71
lea rcx, [rsp + 0x38]
call fcn.1400067d0
nop
lea rbx, [rdi + 0x38]
lea rax, [rsp + 0x38]
cmp rbx, rax
je 0x140166eb1
lea rdx, [rsp + 0x38]
cmp qword [rsp + 0x50], 0xf
cmova rdx, qword [rsp + 0x38]
mov r8, qword [rsp + 0x48]
mov rcx, rbx
call fcn.140016820
cmp qword [rbx + 0x18], 0xf
jbe 0x140166ebb
mov rbx, qword [rbx]
mov qword [rsp + 0x30], r15
lea r8, [0x1401d4790]
mov rdx, rbx
lea rcx, [rsp + 0x30]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen_s]
test eax, eax
jne 0x140167014
mov rsi, qword [rsp + 0x30]
test rsi, rsi
je 0x140167014
mov rcx, rdi
call fcn.140165e90
mov qword [rdi + 8], 0xffffffffffffffff
xor edx, edx
lea r8d, [rdx + 2]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
movsxd rbx, eax
xor r8d, r8d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
test ebx, ebx
jg 0x140166f4f
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 0xc]
mov rcx, rdi
call fcn.14016a4e0
xor bl, bl
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x14016702d
mov r14, rbx
lea rcx, [rbx + 1]
call fcn.14016cd8c
mov rbx, rax
mov byte [rax], 0
mov r9, rsi
mov r8d, 1
mov rdx, r14
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rcx, rbx
cmp rax, 1
je 0x140166fab
call fcn.14016cca4
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 2]
mov rcx, rdi
call fcn.14016a4e0
xor bl, bl
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x14016702d
mov rax, rbx
mov byte [r14 + rbx], 0
movzx edx, byte [rbx]
test dl, dl
je 0x140166fe5
nop word [rax + rax]
lea r8, [rcx + 1]
inc rax
cmp dl, 0xd
jne 0x140166fd9
mov byte [rcx], 0xa
cmp byte [rax], 0xa
jne 0x140166fdb
inc rax
jmp 0x140166fdb
mov byte [rcx], dl
movzx edx, byte [rax]
mov rcx, r8
test dl, dl
jne 0x140166fc0
mov byte [rcx], 0
mov rax, qword [rdi]
mov r9d, ebp
xor r8d, r8d
mov rdx, rbx
mov rcx, rdi
call qword [rax + 0x10]
mov rcx, rbx
call fcn.14016cca4
cmp byte [rdi + 0x68], 0
sete bl
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x14016702d
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 2]
mov rcx, rdi
call fcn.14016a4e0
xor bl, bl
mov rdx, qword [rsp + 0x50]
cmp rdx, 0xf
jbe 0x14016706d
inc rdx
mov rcx, qword [rsp + 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140167068
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140167068
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14016cca4
movzx eax, bl
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14016cd40
mov rbx, qword [rsp + 0xa8]
add rsp, 0x60
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
cmp qword [rcx + 0x50], 0xf
mov r8d, edx
lea rdx, [rcx + 0x38]
jbe 0x1401670b1
mov rdx, qword [rdx]
jmp 0x140166e30