Function at 0x14000c650
Capabilities:
Manipulate console buffer

Disassembly:
push rbx
push rsi
push rdi
push r12
sub rsp, 0x68
mov rax, qword [0x140045080]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rdi, qword [rcx + 0x108]
lea eax, [rdx - 1]
xor r12d, r12d
mov esi, edx
mov dword [rsp + 0x48], r12d
mov rbx, rcx
cmp eax, 1
ja 0x14000c7be
cmp byte [rcx + 0x1e0], r12b
je 0x14000c6ba
cmp byte [rcx + 0x38], r12b
jne 0x14000c6ba
mov r9d, 1
mov qword [rsp + 0x20], r12
xor r8d, r8d
mov edx, 3
mov ecx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateConsoleScreenBuffer]
mov byte [rbx + 0x38], 1
cmp byte [rbx + 0x1e0], r12b
je 0x14000c733
mov rcx, qword [rbx + 0x108]
call qword [sym.imp.KERNEL32.dll_SetConsoleActiveScreenBuffer]
mov r8d, dword [rbx + 0xd8]
lea rax, [rsp + 0x48]
imul r8d, dword [rbx + 0xd4]
xor edx, edx
mov r9d, dword [rbx + 0xce]
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
mov r8d, dword [rbx + 0xd8]
lea rax, [rsp + 0x48]
imul r8d, dword [rbx + 0xd4]
xor edx, edx
mov r9d, dword [rbx + 0xce]
mov rcx, rdi
mov qword [rsp + 0x20], rax
cmp esi, 2
jne 0x14000c72d
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
jmp 0x14000c733
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
movzx eax, word [rbx + 0xce]
movzx ecx, word [rbx + 0xd0]
movzx r8d, word [rbx + 0xd4]
movzx r9d, word [rbx + 0xd8]
mov rdx, qword [rbx + 0xe0]
mov word [rsp + 0x40], ax
add ax, r8w
mov word [rsp + 0x44], ax
mov word [rsp + 0x36], r9w
lea eax, [rcx + r9]
mov r9d, dword [rbx + 0xce]
mov word [rsp + 0x46], ax
lea rax, [rsp + 0x40]
mov word [rsp + 0x42], cx
mov rcx, rdi
mov word [rsp + 0x34], r8w
mov r8d, dword [rsp + 0x34]
mov qword [rsp + 0x20], rax
cmp esi, 1
jne 0x14000c7a6
call qword [sym.imp.KERNEL32.dll_WriteConsoleOutputA]
jmp 0x14000c7ac
call qword [sym.imp.KERNEL32.dll_WriteConsoleOutputW]
cmp byte [rbx + 0x1e0], r12b
je 0x14000c7be
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleActiveScreenBuffer]
test esi, esi
jne 0x14000c9cf
mov eax, dword [rbx + 0xd8]
mov esi, r12d
test eax, eax
jle 0x14000c971
mov qword [rsp + 0x98], rbp
mov qword [rsp + 0xa0], r14
mov qword [rsp + 0x60], r15
nop dword [rax]
mov edx, dword [rbx + 0xd4]
mov edi, r12d
test edx, edx
jle 0x14000c94c
movzx r11d, word [rbx + 0xce]
cmp di, r11w
jl 0x14000c858
cmp si, word [rbx + 0xd0]
jl 0x14000c858
movsx r8d, di
cmp r8d, edx
jg 0x14000c858
movsx ecx, si
cmp ecx, dword [rbx + 0xd8]
jg 0x14000c858
mov eax, edx
imul eax, ecx
add eax, r8d
movsxd rcx, eax
mov rax, qword [rbx + 0xe0]
mov r9d, dword [rax + rcx*4]
mov r10d, r9d
shr r10d, 0x10
movzx ebp, r9b
mov r8d, r9d
mov r14d, r9d
mov r15d, r9d
jmp 0x14000c86b
xor r9d, r9d
movzx r10d, r12w
xor bpl, bpl
mov r8d, r12d
mov r14d, r12d
mov r15d, r12d
mov rax, qword [rbx + 0xe8]
imul edx, esi
add edx, edi
movsxd rcx, edx
mov edx, dword [rax + rcx*4]
cmp byte [rbx + 0x1e0], r12b
je 0x14000c89e
mov r8d, r14d
cmp bpl, dl
jne 0x14000c89e
shr edx, 0x10
mov r8d, r15d
cmp r10w, dx
je 0x14000c93c
mov rcx, qword [rbx + 0x108]
lea rdx, [rsp + 0x38]
shr r8d, 0x10
movzx eax, si
add ax, word [rbx + 0xd0]
add r11w, di
mov word [rsp + 0x32], ax
lea rax, [rsp + 0x4c]
mov word [rsp + 0x30], r11w
mov byte [rsp + 0x38], r9b
mov r9d, dword [rsp + 0x30]
mov word [rsp + 0x34], r8w
mov r8d, 1
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x4c], r12d
mov byte [rsp + 0x39], r12b
call qword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterA]
mov rcx, qword [rbx + 0x108]
lea rdx, [rsp + 0x34]
movzx eax, di
mov r8d, 1
add ax, word [rbx + 0xce]
mov word [rsp + 0x40], ax
movzx eax, si
add ax, word [rbx + 0xd0]
mov word [rsp + 0x42], ax
lea rax, [rsp + 0x4c]
mov r9d, dword [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteConsoleOutputAttribute]
mov edx, dword [rbx + 0xd4]
inc edi
cmp edi, edx
jl 0x14000c801
mov eax, dword [rbx + 0xd8]
inc esi
cmp esi, eax
jl 0x14000c7f0
mov r15, qword [rsp + 0x60]
mov r14, qword [rsp + 0xa0]
mov rbp, qword [rsp + 0x98]
cmp byte [rbx + 0x1e0], r12b
je 0x14000c9cf
mov r9d, r12d
test eax, eax
jle 0x14000c9cf
mov eax, dword [rbx + 0xd4]
mov r8d, r12d
test eax, eax
jle 0x14000c9c3
nop
mov rcx, qword [rbx + 0xe8]
imul eax, r9d
add eax, r8d
inc r8d
cdqe
lea rdx, [rax*4]
mov rax, qword [rbx + 0xe0]
mov eax, dword [rdx + rax]
mov dword [rdx + rcx], eax
mov eax, dword [rbx + 0xd4]
cmp r8d, eax
jl 0x14000c990
inc r9d
cmp r9d, dword [rbx + 0xd8]
jl 0x14000c981
mov eax, dword [rbx + 0xd8]
imul eax, dword [rbx + 0xd4]
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1400150f0
add rsp, 0x68
pop r12
pop rdi
pop rsi
pop rbx
ret