Function at 0x1401a1b7c
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x10], rdx
push rbx
push rbp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
movsxd r12, ecx
mov r15d, r8d
cmp r12d, 0xfffffffe
jne 0x1401a1bb4
call fcn.1401a3928
and dword [rax], 0
call fcn.1401a3908
mov dword [rax], 9
jmp 0x1401a20b6
test ecx, ecx
js 0x1401a209e
cmp r12d, dword [0x140257af0]
jae 0x1401a209e
mov rcx, r12
lea r11, [0x1402576f0]
and ecx, 0x3f
mov r9d, 1
mov rax, r12
shl rcx, 6
sar rax, 6
mov rbp, r12
mov qword [rsp + 0x40], r9
mov rax, qword [r11 + rax*8]
test byte [rax + rcx + 0x38], r9b
je 0x1401a209e
cmp r15d, 0x7fffffff
jbe 0x1401a1c1f
call fcn.1401a3928
and dword [rax], 0
call fcn.1401a3908
mov dword [rax], 0x16
jmp 0x1401a20b1
test r8d, r8d
je 0x1401a209a
mov rcx, rbp
mov rax, rbp
sar rax, 6
and ecx, 0x3f
shl rcx, 6
mov rax, qword [r11 + rax*8]
test byte [rax + rcx + 0x38], 2
jne 0x1401a209a
test rdx, rdx
je 0x1401a1c07
mov rcx, rbp
xor ebx, ebx
and ecx, 0x3f
mov rax, rbp
shl rcx, 6
sar rax, 6
mov rax, qword [r11 + rax*8]
mov r8, qword [rax + rcx + 0x28]
movsx r10d, byte [rax + rcx + 0x39]
mov ecx, r10d
mov qword [rsp + 0x38], r8
mov byte [rsp + 0x90], r10b
lea r8d, [rbx + 4]
sub ecx, r9d
je 0x1401a1ca2
cmp ecx, r9d
jne 0x1401a1c97
mov eax, r15d
not eax
test r9b, al
je 0x1401a1cac
mov r14d, r15d
mov r13, rdx
jmp 0x1401a1d4e
mov eax, r15d
not eax
test r9b, al
jne 0x1401a1cc8
call fcn.1401a3928
and dword [rax], ebx
call fcn.1401a3908
mov dword [rax], 0x16
call fcn.14019b140
jmp 0x1401a1f02
mov r14d, r15d
shr r14d, 1
cmp r14d, r8d
cmovb r14d, r8d
mov ecx, r14d
call fcn.1401b0f4c
xor ecx, ecx
mov rbx, rax
call fcn.1401b0098
xor ecx, ecx
call fcn.1401b0098
mov r13, rbx
test rbx, rbx
jne 0x1401a1d11
call fcn.1401a3908
mov dword [rax], 0xc
call fcn.1401a3928
mov dword [rax], 8
jmp 0x1401a1f02
xor edx, edx
mov ecx, r12d
lea r8d, [rdx + 1]
call fcn.1401b8450
mov r10b, byte [rsp + 0x90]
lea r11, [0x1402576f0]
mov rdx, rbp
mov rcx, rbp
sar rcx, 6
and edx, 0x3f
shl rdx, 6
mov r9d, 1
mov rcx, qword [r11 + rcx*8]
mov qword [rcx + rdx + 0x30], rax
mov rcx, rbp
mov qword [rsp + 0x48], r13
and ecx, 0x3f
xor edi, edi
mov rax, rbp
shl rcx, 6
sar rax, 6
mov rdx, qword [r11 + rax*8]
lea eax, [rdi + 0xa]
test byte [rdx + rcx + 0x38], 0x48
je 0x1401a1e7e
cmp byte [rdx + rcx + 0x3a], al
je 0x1401a1e7e
test r14d, r14d
je 0x1401a1e7e
mov rdx, rbp
mov r8, rbp
sar r8, 6
and edx, 0x3f
shl rdx, 6
dec r14d
mov edi, r9d
mov rax, qword [r11 + r8*8]
mov cl, byte [rdx + rax + 0x3a]
mov byte [r13], cl
add r13, r9
mov rax, qword [r11 + r8*8]
mov r8d, 0xa
mov byte [rdx + rax + 0x3a], r8b
test r10b, r10b
je 0x1401a1e7e
mov rcx, rbp
mov rax, rbp
sar rax, 6
and ecx, 0x3f
shl rcx, 6
mov rax, qword [r11 + rax*8]
cmp byte [rax + rcx + 0x3b], r8b
je 0x1401a1e7e
test r14d, r14d
je 0x1401a1e7e
mov rdx, rbp
mov r8, rbp
sar r8, 6
and edx, 0x3f
shl rdx, 6
mov edi, 2
dec r14d
mov rax, qword [r11 + r8*8]
mov cl, byte [rax + rdx + 0x3b]
mov byte [r13], cl
add r13, r9
mov rax, qword [r11 + r8*8]
lea r8d, [rdi + 8]
mov byte [rax + rdx + 0x3b], r8b
cmp r10b, r9b
jne 0x1401a1e7e
mov rcx, rbp
mov rax, rbp
sar rax, 6
and ecx, 0x3f
shl rcx, 6
mov rax, qword [r11 + rax*8]
cmp byte [rax + rcx + 0x3c], r8b
je 0x1401a1e7e
test r14d, r14d
je 0x1401a1e7e
mov rdx, rbp
mov r8, rbp
sar r8, 6
and edx, 0x3f
shl rdx, 6
mov edi, 3
mov rax, qword [r11 + r8*8]
mov cl, byte [rdx + rax + 0x3c]
mov byte [r13], cl
add r13, r9
mov rax, qword [r11 + r8*8]
dec r14d
mov byte [rdx + rax + 0x3c], 0xa
mov ecx, r12d
call fcn.14019de78
test eax, eax
je 0x1401a1f20
mov rcx, rbp
lea rdx, [0x1402576f0]
and ecx, 0x3f
mov rax, rbp
sar rax, 6
shl rcx, 6
mov rax, qword [rdx + rax*8]
cmp byte [rax + rcx + 0x38], 0
jge 0x1401a1f20
mov rcx, qword [rsp + 0x38]
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x1401a1f20
cmp byte [rsp + 0x90], 2
jne 0x1401a1f25
mov rcx, qword [rsp + 0x38]
lea r9, [rsp + 0xa8]
and qword [rsp + 0x20], 0
mov rdx, r13
shr r14d, 1
mov r8d, r14d
call qword [sym.imp.KERNEL32.dll_ReadConsoleW]
test eax, eax
jne 0x1401a1f14
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.1401a3948
or edi, 0xffffffff
mov rcx, rbx
call fcn.1401b0098
mov eax, edi
jmp 0x1401a20b9
mov eax, dword [rsp + 0xa8]
lea edi, [rdi + rax*2]
jmp 0x1401a1f61
mov byte [rsp + 0x40], 0
mov rcx, qword [rsp + 0x38]
lea r9, [rsp + 0xa8]
and qword [rsp + 0x20], 0
mov r8d, r14d
mov rdx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1401a2064
cmp dword [rsp + 0xa8], r15d
ja 0x1401a2064
add edi, dword [rsp + 0xa8]
mov rcx, rbp
lea r9, [0x1402576f0]
and ecx, 0x3f
mov rax, rbp
sar rax, 6
shl rcx, 6
mov rax, qword [r9 + rax*8]
cmp byte [rax + rcx + 0x38], 0
jge 0x1401a1f05
cmp byte [rsp + 0x90], 2
je 0x1401a1fb6
mov r9, qword [rsp + 0x98]
mov rax, r15
shr rax, 1
mov rdx, r13
movsxd r8, edi
mov ecx, r12d
mov qword [rsp + 0x20], rax
call fcn.1401a20cc
mov edi, eax
jmp 0x1401a1f05
mov rax, qword [rsp + 0x40]
test al, al
je 0x1401a204c
mov r8, qword [rsp + 0x48]
movsxd rax, edi
mov rdi, r8
shr rax, 1
lea rdx, [r8 + rax*2]
mov rax, r8
cmp r8, rdx
jae 0x1401a203f
movzx ecx, word [rax]
cmp cx, 0x1a
je 0x1401a2021
cmp cx, 0xd
jne 0x1401a200b
lea r9, [rax + 2]
cmp r9, rdx
jae 0x1401a200b
mov r10d, 0xa
cmp word [r9], r10w
jne 0x1401a200b
mov word [rdi], r10w
lea ecx, [r10 - 6]
jmp 0x1401a2013
mov word [rdi], cx
mov ecx, 2
add rdi, 2
add rax, rcx
cmp rax, rdx
jb 0x1401a1fdd
jmp 0x1401a203f
mov rax, rbp
lea rdx, [0x1402576f0]
sar rax, 6
and ebp, 0x3f
shl rbp, 6
mov rax, qword [rdx + rax*8]
or byte [rax + rbp + 0x38], 2
sub rdi, r8
sar rdi, 1
add edi, edi
jmp 0x1401a1f05
mov rdx, qword [rsp + 0x48]
mov ecx, r12d
movsxd r8, edi
shr r8, 1
call fcn.1401a24b4
jmp 0x1401a1faf
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x1401a208a
call fcn.1401a3908
mov dword [rax], 9
call fcn.1401a3928
mov dword [rax], 5
jmp 0x1401a1f02
cmp eax, 0x6d
jne 0x1401a1efb
xor edi, edi
jmp 0x1401a1f05
xor eax, eax
jmp 0x1401a20b9
call fcn.1401a3928
and dword [rax], 0
call fcn.1401a3908
mov dword [rax], 9
call fcn.14019b140
or eax, 0xffffffff
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbp
pop rbx
ret