Function at 0x140003c70
Capabilities:
Manipulate console buffer

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa0
mov rax, qword [0x140045010]
xor rax, rsp
mov qword [rsp + 0x90], rax
mov ebx, r8d
mov edi, edx
mov rbp, rcx
cmp edx, 1
jl 0x140003f63
cmp ebx, 1
jl 0x140003f63
cmp edx, 0x9c4
cmovg edi, dword [0x14003acd0]
cmp ebx, 0x7d0
cmovg ebx, dword [0x14003acd4]
movzx eax, byte [rcx + 0x48]
lea r14, [rcx + 0x40]
mov qword [rsp + 0x50], r14
movzx r12d, byte [r14 + 8]
mov byte [rsp + 0x58], r12b
mov edx, 0xfff2
lea r15d, [rdx + 3]
cmp al, r12b
je 0x140003d36
mov rcx, qword [r14]
test al, al
je 0x140003d1a
mov r8d, r15d
cmp byte [r14 + 9], 0
cmovne r8d, edx
xor r9d, r9d
mov edx, 0x112
call qword [sym.imp.USER32.dll_SendMessageW]
mov byte [r14 + 8], 1
jmp 0x140003d36
mov edx, 0x102
mov r9d, 0x10001
mov r8d, 0x1b
call qword [sym.imp.USER32.dll_SendMessageW]
mov byte [r14 + 8], 0
mov word [rsp + 0x40], di
mov word [rsp + 0x42], bx
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x60], xmm0
mov dword [rsp + 0x70], eax
mov word [rsp + 0x74], ax
xor r13d, r13d
cmp byte [rbp + 0x38], al
jne 0x140003db2
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0xc0000000
lea r8d, [rax + 3]
lea rcx, str.CONOUT_
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140003f4a
lea ecx, [r13 + 0x10]
call fcn.140017cb0
mov rbx, rax
mov qword [rsp + 0x48], rax
mov qword [rax], rdi
mov byte [rax + 8], 1
mov qword [rsp + 0x48], rax
jmp 0x140003ddb
mov ecx, 0x10
call fcn.140017cb0
mov rbx, rax
mov qword [rsp + 0x48], rax
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rbx], rax
mov byte [rbx + 8], r13b
mov qword [rsp + 0x48], rbx
mov rsi, qword [rbp + 0x68]
mov qword [rsi + 8], rbx
mov edi, dword [rsp + 0x40]
mov dword [rsi + 0x22], edi
lea r8, [rsp + 0x60]
mov dl, 1
mov rcx, rsi
call fcn.140010280
mov qword [rsi + 8], r13
mov rcx, qword [rbp + 0xa8]
mov rax, qword [rsp + 0x6a]
mov qword [rcx + 0xec], rax
mov rsi, qword [rbp + 0x70]
test rsi, rsi
je 0x140003e37
mov rax, qword [rbp + 0x78]
mov qword [rsi + 8], rax
mov dword [rsi + 0x22], edi
lea r8, [rsp + 0x60]
mov dl, 1
mov rcx, rsi
call fcn.140010280
mov qword [rsi + 8], r13
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x78], xmm0
mov dword [rsp + 0x88], eax
mov eax, 4
mov word [rsp + 0x78], ax
xor eax, eax
movups xmmword [rsp + 0x60], xmm0
mov dword [rsp + 0x70], eax
mov word [rsp + 0x74], ax
lea rdx, [rsp + 0x60]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x140003e80
lea rcx, str.GetConsoleScreenBufferInfo_failed
call fcn.1400149c0
mov eax, dword [rsp + 0x60]
mov dword [rsp + 0x7c], eax
mov dword [rsp + 0x44], r13d
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rcx, rax
lea r9, [rsp + 0x44]
mov r8d, 1
lea rdx, [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_WriteConsoleInputW]
nop
cmp byte [rbx + 8], 0
je 0x140003ec1
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 0x10
mov rcx, rbx
call fcn.140017cec
nop
cmp r12b, byte [r14 + 8]
je 0x140003f01
mov rcx, qword [r14]
test r12b, r12b
je 0x140003f2c
cmp byte [r14 + 9], 0
mov eax, 0xfff2
cmovne r15, rax
xor r9d, r9d
mov r8, r15
mov edx, 0x112
call qword [sym.imp.USER32.dll_SendMessageW]
mov byte [r14 + 8], 1
mov rcx, qword [rsp + 0x90]
xor rcx, rsp
call fcn.140017c90
mov rbx, qword [rsp + 0xf0]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov edx, 0x102
mov r9d, 0x10001
mov r8d, 0x1b
call qword [sym.imp.USER32.dll_SendMessageW]
mov byte [r14 + 8], 0
jmp 0x140003f01
lea r8, str.conout___INVALID_HANDLE_VALUE
mov edx, 0x27
lea rcx, str.D:_a_arduino_ide_arduino_ide_node_modules_node_ptydepswinpty_src_agentWin32ConsoleBuffer.cc
call fcn.1400178c0
nop
lea r8, str.cols___1__rows___1
mov edx, 0x227
lea rcx, str.D:_a_arduino_ide_arduino_ide_node_modules_node_ptydepswinpty_src_agentAgent.cc
call fcn.1400178c0
int3