Function at 0x140001308
Capabilities:
Read file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1898]
mov eax, 0x1998
call fcn.14000ec30
sub rsp, rax
mov rax, qword [0x1400150f8]
xor rax, rsp
mov qword [rbp + 0x1880], rax
mov eax, dword [rdx + 0x34]
xor r12d, r12d
or dword [rcx + 0xc40], eax
mov r13, r9
cmp dword [rdx + 0x2c], r12d
mov rdi, rdx
mov qword [rsp + 0x58], r8
mov rsi, rcx
mov r14d, 1
jne 0x1400016a9
cmp dword [rdi + 0x30], 0
lea rbx, [rbp + 0x1080]
mov r15d, 0x400
je 0x140001686
mov rcx, qword [rdi + 0x18]
mov rax, qword [rdi + 0x20]
cmp rcx, rax
ja 0x1400013bd
mov dl, byte [rcx]
mov al, dl
cmp dl, 0xa
je 0x14000143f
cmp al, 0xd
je 0x1400013b0
cmp al, 0x1a
je 0x140001407
cmp r15d, 1
jle 0x140001675
dec r15d
mov byte [rbx], dl
inc rbx
inc rcx
mov qword [rdi + 0x18], rcx
cmp rcx, qword [rdi + 0x20]
jbe 0x140001389
cmp dword [rdi + 0x28], 0
jne 0x140001449
mov r8d, dword [rdi + 0xc]
mov rdx, qword [rdi + 0x10]
mov ecx, dword [rdi + 8]
call qword [sym.imp.msvcrt.dll__read]
nop dword [rax + rax]
cmp eax, dword [rdi + 0xc]
je 0x1400013ea
mov dword [rdi + 0x28], 1
mov rcx, qword [rdi + 0x10]
cdqe
dec rax
mov qword [rdi + 0x18], rcx
add rax, rcx
mov qword [rdi + 0x20], rax
test r15d, r15d
jg 0x140001384
xor ebx, ebx
jmp 0x140001467
mov rax, qword [rdi + 0x10]
and qword [rdi + 0x20], 0
mov qword [rdi + 0x18], rax
lea rax, [rbp + 0x1080]
mov dword [rdi + 0x28], 1
mov byte [rbx], 0
cmp rbx, rax
ja 0x140001431
mov dword [rdi + 0x2c], 1
inc rbx
lea rax, [rbp + 0x1080]
sub ebx, eax
jmp 0x140001467
lea rax, [rcx + 1]
mov qword [rdi + 0x18], rax
jmp 0x140001459
lea rax, [rbp + 0x1080]
cmp rbx, rax
jbe 0x14000167a
mov byte [rbx], 0
lea rax, [rbp + 0x1080]
sub ebx, eax
inc ebx
test ebx, ebx
je 0x14000169f
inc r12d
lea rax, [rbp + 0x1080]
mov dword [r13 + 0x210], r12d
mov qword [r13 + 0x218], rax
cmp dword [rsi + 0x50], 2
jl 0x1400014aa
lea r8, [rbp + 0x1080]
mov edx, r12d
lea rcx, str._d:__s_n
call qword [sym.imp.msvcrt.dll_printf]
nop dword [rax + rax]
xor edx, edx
lea rcx, [rbp + 0x1480]
mov r8d, 0x400
call sub.msvcrt.dll_memset
xor ebx, ebx
cmp dword [rsi + 0xc0], ebx
je 0x140001501
lea rax, [rbp + 0x1480]
mov dword [rsp + 0x40], 0x400
mov qword [rsp + 0x50], rax
lea r8, [rsp + 0x48]
lea rax, [rbp + 0x1080]
xor r9d, r9d
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x48], rax
lea rcx, [rsp + 0x50]
call fcn.14000d50c
jmp 0x14000151d
mov r9, qword [rsi + 0x10]
lea r8, [rbp + 0x1080]
lea rcx, [rbp + 0x1480]
mov qword [rsp + 0x20], r13
call fcn.140002720
test eax, eax
je 0x14000160d
lea rdx, [0x140010c88]
mov dword [rsp + 0x60], ebx
lea rcx, [rbp + 0x1480]
call qword [sym.imp.msvcrt.dll_strspn]
nop dword [rax + rax]
mov rcx, rax
mov al, byte [rbp + rax + 0x1480]
cmp al, 0x3b
je 0x140001605
test al, al
je 0x140001605
cmp al, 0x2e
jne 0x14000158c
mov al, byte [rbp + rcx + 0x1481]
cmp al, 0x2e
je 0x14000158c
cmp al, 0x5c
je 0x14000158c
mov r9, r13
lea r8, [rbp + 0x1480]
mov rdx, rsi
lea rcx, [rsp + 0x60]
call fcn.14000188c
jmp 0x14000160d
cmp dword [rsi + 0xc0], ebx
je 0x1400015dd
mov eax, dword [rsi + 0xc4]
lea r8, [rsp + 0x48]
mov dword [rsp + 0x68], eax
lea rdx, [rsp + 0x40]
lea rax, [rsp + 0x6c]
mov dword [rsp + 0x60], 8
mov qword [rsp + 0x50], rax
lea rcx, [rsp + 0x50]
lea rax, [rbp + 0x1480]
mov dword [rsp + 0x40], 0x200
xor r9d, r9d
mov qword [rsp + 0x48], rax
call fcn.14000d50c
jmp 0x14000160d
lea r8, [rbp + 0x1480]
mov r9, r13
lea rcx, [rsp + 0x60]
mov rdx, rsi
cmp dword [rsi + 0xbc], ebx
je 0x1400015fe
call fcn.14000225c
jmp 0x14000160d
call fcn.1400020c8
jmp 0x14000160d
mov dword [rsp + 0x60], 1
mov rax, qword [rsp + 0x58]
lea r9, [rbp + 0x1080]
mov qword [rsp + 0x28], r13
lea rdx, [rsp + 0x60]
mov r8, rdi
mov dword [rsp + 0x20], r12d
mov rcx, rsi
call qword [vtable._SH_.0]
mov ecx, dword [rsp + 0x60]
mov r14d, eax
cmp ecx, 5
jne 0x140001655
mov rcx, qword [rbp + 0x1068]
test rcx, rcx
je 0x140001668
call fcn.14000a410
mov ecx, dword [rsp + 0x60]
cmp ecx, 0xd
jne 0x140001668
mov rcx, qword [rbp + 0x68]
test rcx, rcx
je 0x140001668
call fcn.14000a410
test r14d, r14d
je 0x1400016a9
cmp dword [rdi + 0x2c], ebx
jmp 0x14000135f
mov byte [rbx], 0
jmp 0x14000169f
mov byte [rbx], 0
mov dword [rdi + 0x2c], 1
jmp 0x14000169f
mov r9, qword [rdi]
lea r8, [0x140010c00]
lea rdx, str.Tried_to_read_from_write_only_file:__1
mov rcx, r13
call fcn.1400081b0
mov eax, dword [rdi + 0x2c]
neg eax
sbb ecx, ecx
and r14d, ecx
mov eax, r14d
mov rcx, qword [rbp + 0x1880]
xor rcx, rsp
call fcn.14000e520
add rsp, 0x1998
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret