Function at 0x140008c60
Capabilities:
Manipulate console buffer

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
movsxd r13, r9d
mov r15, r8
mov r12, rdx
mov rdi, rcx
cmp r13d, 1
jl 0x140009159
xor r14d, r14d
cmp byte [r8], 3
jne 0x140008cbb
mov dword [rax + 0x20], r14d
lea rdx, [rax + 0x20]
mov rcx, qword [rcx + 8]
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
jne 0x140008ce3
lea rcx, str.GetConsoleMode_failed
call fcn.1400149c0
mov ebp, 1
cmp byte [r15], 0x1b
jne 0x140008e98
lea rsi, [r15 + r13]
lea rbx, [r15 + 1]
cmp rbx, rsi
jne 0x140008d7d
lea ebx, [rbp - 2]
jmp 0x140008e4c
test byte [rsp + 0xa8], 1
je 0x140008cbb
mov r10, qword [r12]
mov rcx, qword [r12 + 8]
sub rcx, r10
movabs rax, 0x6666666666666667
imul rcx
sar rdx, 3
mov rax, rdx
shr rax, 0x3f
add rdx, rax
je 0x140008d4f
mov dword [rsp + 0xa8], r14d
lea r9, [rsp + 0xa8]
mov r8d, edx
mov rdx, r10
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_WriteConsoleInputW]
test eax, eax
jne 0x140008d46
lea rcx, str.WriteConsoleInputW_failed
call fcn.1400149c0
mov rax, qword [r12]
mov qword [r12 + 8], rax
lea rcx, str.Ctrl_C
call fcn.1400149c0
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GenerateConsoleCtrlEvent]
mov edx, eax
lea rcx, str.GenerateConsoleCtrlEvent:__d
call fcn.1400149c0
mov eax, 1
jmp 0x140009141
cmp byte [rbx], 0x5b
je 0x140008d8a
mov ebx, r14d
jmp 0x140008e4c
inc rbx
cmp rbx, rsi
jne 0x140008d9c
mov ebx, 0xffffffff
jmp 0x140008e4c
movsx ecx, byte [rbx]
call fcn.140021380
test eax, eax
jne 0x140008db0
mov ebx, r14d
jmp 0x140008e4c
mov rdi, rbp
cmp rdi, 8
jge 0x140008e41
inc rbx
inc rdi
cmp rbx, rsi
je 0x140008de1
movsx ecx, byte [rbx]
call fcn.140021380
test eax, eax
jne 0x140008db3
cmp byte [rbx], 0x3b
jne 0x140008e41
inc rbx
cmp rbx, rsi
jne 0x140008de8
mov ebx, 0xffffffff
jmp 0x140008e44
movsx ecx, byte [rbx]
call fcn.140021380
test eax, eax
je 0x140008e41
mov rdi, rbp
cmp rdi, 8
jge 0x140008e41
inc rbx
inc rdi
cmp rbx, rsi
je 0x140008de1
movsx ecx, byte [rbx]
call fcn.140021380
test eax, eax
jne 0x140008df7
cmp byte [rbx], 0x52
jne 0x140008e41
sub ebx, r15d
inc ebx
test ebx, ebx
jle 0x140008e44
lea rcx, str.Received_a_DSR_reply
call fcn.1400149c0
mov rcx, qword [rsp + 0x90]
mov byte [rcx + 0x20], r14b
mov eax, ebx
jmp 0x140009141
mov ebx, r14d
mov rdi, qword [rsp + 0x90]
movzx esi, byte [rsp + 0xb0]
test sil, sil
jne 0x140008e71
cmp ebx, 0xffffffff
jne 0x140008e71
lea rcx, str.Incomplete_DSR_match
call fcn.1400149c0
mov eax, ebx
jmp 0x140009141
mov r9d, r13d
mov r8, r15
mov rdx, r12
mov rcx, rdi
call fcn.140009180
test eax, eax
jg 0x140009141
test sil, sil
jne 0x140008e98
cmp eax, 0xffffffff
je 0x140009141
xor sil, sil
lea rdx, [rdi + 0x78]
movsd xmm0, qword [0x14003b850]
movsd qword [rsp + 0x40], xmm0
mov eax, dword [0x14003b858]
mov dword [rsp + 0x48], eax
mov ebx, r14d
mov r11d, r14d
test r13d, r13d
je 0x140008f44
mov r10, r14
nop dword [rax]
movzx r9d, byte [r10 + r15]
movsxd rcx, dword [rdx + 0xc]
cmp ecx, 8
jg 0x140008efd
mov rax, r14
test ecx, ecx
jle 0x140008f4c
cmp byte [rdx + rax + 0x10], r9b
je 0x140008ef6
inc rax
cmp rax, rcx
jge 0x140008f4c
jmp 0x140008ee5
mov rdx, qword [rdx + rax*8 + 0x18]
jmp 0x140008f05
mov rax, qword [rdx + 0x10]
mov rdx, qword [rax + r9*8]
test rdx, rdx
je 0x140008f4c
cmp word [rdx], r14w
jne 0x140008f1a
cmp dword [rdx + 4], r14d
jne 0x140008f1a
xor cl, cl
jmp 0x140008f2f
movzx ecx, bpl
movsd xmm0, qword [rdx]
movsd qword [rsp + 0x40], xmm0
mov eax, dword [rdx + 8]
mov dword [rsp + 0x48], eax
inc r11d
mov eax, r11d
test cl, cl
cmove eax, ebx
mov ebx, eax
inc r10
cmp r10, r13
jl 0x140008ed0
cmp dword [rdx + 0xc], r14d
setg sil
cmp byte [rsp + 0xb0], r14b
jne 0x140008f71
test sil, sil
je 0x140008f71
lea rcx, str.Incomplete_escape_sequence
call fcn.1400149c0
mov eax, 0xffffffff
jmp 0x140009141
test ebx, ebx
jle 0x140008fc9
mov edx, dword [rsp + 0x44]
mov r9d, edx
movzx ecx, byte [rsp + 0x48]
test cl, 8
je 0x140008f8d
test cl, 2
cmovne r9d, r14d
test cl, 2
cmove r14d, r9d
movzx ecx, word [rsp + 0x48]
mov word [rsp + 0x38], cx
mov dword [rsp + 0x30], edx
mov word [rsp + 0x28], cx
mov dword [rsp + 0x20], r14d
movzx r8d, word [rsp + 0x40]
mov rdx, r12
mov rcx, qword [rsp + 0x90]
call fcn.140009a30
mov eax, ebx
jmp 0x140009141
movzx ecx, byte [r15]
cmp cl, 0x1b
jne 0x14000905b
cmp r13d, 2
jl 0x14000905b
lea r8, [r15 + 1]
movzx edx, byte [r8]
cmp dl, cl
je 0x14000905b
test dl, dl
js 0x140009010
mov ebx, 2
mov byte [rsp + 0x20], 1
mov r9d, ebp
mov rdx, r12
mov rcx, qword [rsp + 0x90]
call fcn.140009740
mov eax, ebx
jmp 0x140009141
movzx eax, dl
and al, 0xe0
cmp al, 0xc0
jne 0x140009020
mov ebp, 2
jmp 0x14000903d
movzx eax, dl
and al, 0xf0
cmp al, 0xe0
jne 0x140009030
mov ebp, 3
jmp 0x14000903d
and dl, 0xf8
cmp dl, 0xf0
jne 0x1400090a7
mov ebp, 4
lea ebx, [rbp + 1]
cmp ebx, r13d
jle 0x140008ff1
lea rcx, str.Incomplete_UTF_8_character_in_Alt__Char_
call fcn.1400149c0
mov eax, 0xffffffff
jmp 0x140009141
test cl, cl
jns 0x1400090a7
movzx eax, cl
and al, 0xe0
cmp al, 0xc0
jne 0x14000906f
mov ebp, 2
jmp 0x14000908c
movzx eax, cl
and al, 0xf0
cmp al, 0xe0
jne 0x14000907f
mov ebp, 3
jmp 0x14000908c
and cl, 0xf8
cmp cl, 0xf0
jne 0x1400090c4
mov ebp, 4
cmp ebp, r13d
jle 0x1400090a7
lea rcx, str.Incomplete_UTF_8_character
call fcn.1400149c0
mov eax, 0xffffffff
jmp 0x140009141
mov byte [rsp + 0x20], r14b
mov r9d, ebp
mov r8, r15
mov rdx, r12
mov rcx, qword [rsp + 0x90]
call fcn.140009740
jmp 0x14000913f
mov edx, 4
mov rax, qword gs:[0x58]
mov rcx, qword [rax]
mov eax, dword [rdx + rcx]
cmp dword [0x140046e84], eax
jle 0x140009126
lea rcx, [0x140046e84]
call fcn.140017ea8
cmp dword [0x140046e84], 0xffffffff
jne 0x140009126
call fcn.140014330
test al, al
je 0x140009112
lea rcx, str.input
call fcn.1400143d0
test al, al
je 0x140009112
mov al, 1
jmp 0x140009114
xor al, al
mov byte [0x140046e80], al
lea rcx, [0x140046e84]
call fcn.140017e48
cmp byte [0x140046e80], 0
je 0x14000913f
movzx edx, byte [r15]
lea rcx, str.Discarding_invalid_input_byte:__02X
call fcn.1400149c0
mov eax, ebp
mov rbx, qword [rsp + 0x98]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea r8, str.inputSize___1
mov edx, 0x181
lea rcx, str.D:_a_work1_s_node_modules_node_ptydepswinpty_src_agentConsoleInput.cc
call fcn.1400178c0
int3