Function at 0x140001da8
Capabilities:
Read file on windows

Disassembly:
push rbp
push rbx
sub rsp, 0xb8
lea rbp, [rsp + 0xb0]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], rdx
mov dword [rbp + 0x30], r8d
mov dword [rbp - 4], 0xffffffff
mov qword [rbp - 0x10], 0
mov dword [rbp - 0x14], 0
mov dword [rbp - 0x18], 0
mov qword [rbp - 0x20], 0xffffffffffffffff
mov edx, 1
mov rcx, qword [rbp + 0x20]
call fcn.14000d52c
cmp eax, 0xffffffff
je 0x1400021ba
mov rax, qword [rbp + 0x20]
mov rax, qword [rax + 0x118]
add rax, 0x81
mov rcx, rax
call sub.msvcrt.dll_malloc
mov qword [rbp - 0x28], rax
cmp qword [rbp - 0x28], 0
jne 0x140001e2f
mov eax, 0
jmp 0x1400021d4
lea rdx, [rbp - 0x80]
mov rax, qword [rbp + 0x28]
mov r8, rdx
mov rdx, rax
mov rcx, qword [rbp + 0x20]
call fcn.14000bea4
cmp eax, 0xffffffff
je 0x140002164
test eax, eax
je 0x140001e5f
mov dword [rbp - 4], 0
jmp 0x14000216e
nop
cmp dword [rbp + 0x30], 0
jne 0x140001e79
mov edx, 0x8000
mov ecx, 0
mov rax, qword [sym.imp.msvcrt.dll__setmode]
call rax
cmp qword [rbp + 0x28], 0
je 0x140001f28
mov dword [rbp - 0x2c], 0x8000
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov dword [rax], 0
mov edx, dword [rbp - 0x2c]
mov rax, qword [rbp + 0x28]
mov rcx, rax
call sub.msvcrt.dll__open
mov dword [rbp + 0x30], eax
cmp dword [rbp + 0x30], 0
jns 0x140001f28
lea rdx, [rbp - 0x80]
mov rax, qword [rbp + 0x28]
mov rcx, rax
mov rax, qword [sym.imp.msvcrt.dll__stat64]
call rax
test eax, eax
sete al
movzx eax, al
mov dword [rbp - 0x18], eax
cmp dword [rbp - 0x18], 0
jne 0x140001ef4
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov eax, dword [rax]
cmp eax, 0xd
jne 0x140001ef4
mov word [rbp - 0x7a], 0x3000
mov dword [rbp - 0x18], 1
cmp dword [rbp - 0x18], 0
je 0x140001f1c
movzx eax, word [rbp - 0x7a]
movzx eax, ax
mov rdx, qword [rbp + 0x28]
mov r8, rdx
mov edx, eax
mov rcx, qword [rbp + 0x20]
call fcn.140001a11
cmp eax, 0xffffffff
je 0x140002167
mov dword [rbp - 4], 0
jmp 0x14000216e
cmp dword [rbp + 0x30], 0xffffffff
je 0x140001f8b
lea rdx, [rbp - 0x80]
mov eax, dword [rbp + 0x30]
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll__fstat64]
call rax
test eax, eax
sete al
movzx eax, al
mov dword [rbp - 0x18], eax
cmp dword [rbp - 0x18], 0
je 0x140001f6b
movzx eax, word [rbp - 0x7a]
movzx eax, ax
and eax, 0xf000
cmp eax, 0x1000
jne 0x140001f6b
mov dword [rbp - 0x14], 1
cmp qword [rbp + 0x28], 0
jne 0x140001f8b
mov eax, dword [rbp + 0x30]
mov r8d, 1
mov edx, 0
mov ecx, eax
call fcn.140037ac0
mov qword [rbp - 0x20], rax
cmp dword [rbp - 0x14], 0
je 0x14000203c
cmp dword [rbp + 0x30], 0xffffffff
je 0x140001ff8
mov qword [rbp - 0x40], 0
jmp 0x140001fb7
mov rax, qword [rbp - 0x40]
add qword [rbp - 0x10], rax
cmp qword [rbp - 0x40], 0x1ff
jle 0x140001ff7
mov rax, qword [rbp + 0x20]
mov rax, qword [rax + 0x118]
mov rdx, qword [rbp - 0x10]
sub rax, rdx
mov rcx, rax
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x28]
add rdx, rax
mov eax, dword [rbp + 0x30]
mov r9d, 1
mov r8, rcx
mov ecx, eax
call fcn.14000a9f2
mov qword [rbp - 0x40], rax
cmp qword [rbp - 0x40], 0
jg 0x140001fa5
jmp 0x140001ff8
nop
cmp qword [rbp - 0x10], 0
jne 0x1400020fd
cmp qword [rbp + 0x28], 0
je 0x1400020fd
movzx eax, word [rbp - 0x7a]
movzx eax, ax
mov rdx, qword [rbp + 0x28]
mov r8, rdx
mov edx, eax
mov rcx, qword [rbp + 0x20]
call fcn.140001a11
cmp eax, 0xffffffff
je 0x14000216a
mov dword [rbp - 4], 0
jmp 0x14000216e
cmp dword [rbp + 0x30], 0xffffffff
je 0x1400020fd
mov eax, dword [rbp + 0x30]
mov ecx, eax
mov rax, qword [sym.imp.msvcrt.dll__isatty]
call rax
test eax, eax
jne 0x140002065
mov rax, qword [rbp + 0x20]
mov rax, qword [rax + 0x118]
jmp 0x14000206a
mov eax, 0x2000
mov qword [rbp - 0x38], rax
mov rax, qword [rbp - 0x38]
mov ecx, eax
mov rdx, qword [rbp - 0x28]
mov eax, dword [rbp + 0x30]
mov r8d, ecx
mov ecx, eax
call sub.msvcrt.dll__read_1
cdqe
mov qword [rbp - 0x10], rax
cmp qword [rbp - 0x10], 0xffffffffffffffff
jne 0x1400020fd
cmp qword [rbp + 0x28], 0
jne 0x1400020c7
cmp dword [rbp + 0x30], 0
je 0x1400020c7
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov eax, dword [rax]
mov edx, dword [rbp + 0x30]
mov r9d, edx
lea r8, str.cannot_read_fd__d
mov edx, eax
mov rcx, qword [rbp + 0x20]
call fcn.14000cc45
jmp 0x14000216e
cmp qword [rbp + 0x28], 0
je 0x1400020d4
mov rbx, qword [rbp + 0x28]
jmp 0x1400020db
lea rbx, str._dev_stdin
mov rax, qword [sym.imp.msvcrt.dll__errno]
call rax
mov eax, dword [rax]
mov r9, rbx
lea r8, str.cannot_read___s
mov edx, eax
mov rcx, qword [rbp + 0x20]
call fcn.14000cc45
jmp 0x14000216e
mov rdx, qword [rbp - 0x10]
mov rax, qword [rbp - 0x28]
add rax, rdx
mov r8d, 0x81
mov edx, 0
mov rcx, rax
call sub.msvcrt.dll_memset
mov rdx, qword [rbp - 0x10]
cmp dword [rbp - 0x18], 0
je 0x14000212b
lea rcx, [rbp - 0x80]
jmp 0x140002130
mov ecx, 0
mov r8, qword [rbp + 0x28]
mov eax, dword [rbp + 0x30]
mov qword [rsp + 0x28], rdx
mov rdx, qword [rbp - 0x28]
mov qword [rsp + 0x20], rdx
mov r9, r8
mov r8, rcx
mov edx, eax
mov rcx, qword [rbp + 0x20]
call fcn.14000cf49
cmp eax, 0xffffffff
je 0x14000216d
mov dword [rbp - 4], 0
jmp 0x14000216e
nop
jmp 0x14000216e
nop
jmp 0x14000216e
nop
jmp 0x14000216e
nop
mov rax, qword [rbp - 0x28]
mov rcx, rax
call sub.msvcrt.dll_free
cmp dword [rbp + 0x30], 0xffffffff
je 0x1400021bd
cmp qword [rbp - 0x20], 0xffffffffffffffff
je 0x14000219b
mov rdx, qword [rbp - 0x20]
mov eax, dword [rbp + 0x30]
mov r8d, 0
mov ecx, eax
call fcn.140037ac0
lea rcx, [rbp - 0x80]
mov edx, dword [rbp + 0x30]
mov rax, qword [rbp + 0x28]
mov r9, rcx
mov r8d, edx
mov rdx, rax
mov rcx, qword [rbp + 0x20]
call fcn.140001cb0
jmp 0x1400021be
nop
jmp 0x1400021be
nop
cmp dword [rbp - 4], 0
jne 0x1400021cf
mov rcx, qword [rbp + 0x20]
call fcn.14000d5c4
jmp 0x1400021d4
mov eax, 0
add rsp, 0xb8
pop rbx
pop rbp
ret