Function at 0x140004a50
Capabilities:
Manipulate console buffer

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x70
mov rax, qword [0x1400a4080]
xor rax, rsp
mov qword [rsp + 0x60], rax
mov ebx, edx
mov rdi, rcx
mov qword [rsp + 0x50], rcx
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x140004ada
mov rdx, qword [rdi + 0x18]
cmp rdx, 0xf
jbe 0x140004acd
inc rdx
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x140004ac8
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140004d0c
mov rcx, r8
call fcn.14008151c
xor r14d, r14d
mov byte [rdi], r14b
xor al, al
jmp 0x140004cda
mov r15, qword [rdi + 0x10]
cmp qword [rdi + 0x18], 0xf
jbe 0x140004aed
add r15, qword [rdi]
mov rsi, qword [rdi]
jmp 0x140004af3
add r15, rdi
mov rsi, rdi
xorps xmm0, xmm0
movups xmmword [rsp + 0x30], xmm0
xor r14d, r14d
mov ebp, 7
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x48], rbp
cmp rsi, r15
jne 0x140004b22
mov word [rsp + 0x30], r14w
lea rdx, [rsp + 0x30]
jmp 0x140004c3f
sub r15, rsi
movabs rax, 0x7ffffffffffffffe
cmp r15, rax
ja 0x140004d19
cmp r15, rbp
jbe 0x140004bed
mov rbp, r15
or rbp, 7
cmp rbp, rax
jbe 0x140004b60
mov rbp, rax
movabs rax, 0x7fffffffffffffff
lea rcx, [rax + rax]
jmp 0x140004b8f
mov eax, 0xa
cmp rbp, rax
cmovb rbp, rax
lea rcx, [rbp + 1]
movabs rax, 0x7fffffffffffffff
cmp rcx, rax
ja 0x140004d13
add rcx, rcx
cmp rcx, 0x1000
jb 0x140004bc8
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140004d13
mov rcx, rax
call fcn.140081410
mov rcx, rax
test rax, rax
je 0x140004c92
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x48], rbp
jmp 0x140004bf2
test rcx, rcx
je 0x140004bde
call fcn.140081410
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x48], rbp
jmp 0x140004bf2
mov rax, r14
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x48], rbp
jmp 0x140004bf2
mov rax, qword [rsp + 0x30]
lea r8, [rsp + 0x30]
cmp rbp, 7
cmova r8, rax
mov rcx, r8
mov rdx, r15
test r15, r15
je 0x140004c24
nop word [rax + rax]
movsx eax, byte [rsi]
mov word [rcx], ax
lea rcx, [rcx + 2]
lea rsi, [rsi + 1]
sub rdx, 1
jne 0x140004c10
mov qword [rsp + 0x40], r15
mov word [r8 + r15*2], r14w
lea rdx, [rsp + 0x30]
cmp qword [rsp + 0x48], 7
cmova rdx, qword [rsp + 0x30]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
mov r9d, ebx
mov r8d, dword [rdi + 0x10]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterW]
mov rdx, qword [rsp + 0x48]
cmp rdx, 7
jbe 0x140004c9f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004c99
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004c99
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14008151c
nop
mov rdx, qword [rdi + 0x18]
cmp rdx, 0xf
jbe 0x140004cd5
inc rdx
mov rcx, qword [rdi]
cmp rdx, 0x1000
jb 0x140004cd0
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140004d0c
mov rcx, r8
call fcn.14008151c
mov byte [rdi], 0
mov al, 1
mov qword [rdi + 0x18], reloc.WS2_32.dll_ntohs
mov qword [rdi + 0x10], r14
mov rcx, qword [rsp + 0x60]
xor rcx, rsp
call fcn.1400813f0
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call fcn.140001110
nop
call fcn.1400011b0
int3