Function at 0x14002d888
Capabilities:
Manipulate console buffer

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x70
mov rdi, rdx
mov rbx, rcx
mov rcx, rdx
call qword [sym.imp.msvcrt.dll__fileno]
mov ecx, eax
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov rsi, rax
or eax, 0xffffffff
cmp rsi, 0xffffffffffffffff
je 0x14002e099
mov rcx, rdi
call sub.msvcrt.dll_fflush
lea rdx, [rsp + 0x48]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x14002e07e
mov r12, rbx
xor edx, edx
movzx ebp, byte [r12]
mov eax, ebp
test ebp, ebp
je 0x14002e07e
sub eax, 0x40
inc r12
cmp al, 0x1f
ja 0x14002d8fd
test edx, edx
jne 0x14002d919
lea eax, [rbp - 0x80]
cmp eax, 0x1f
ja 0x14002d90f
sub ebp, 0x40
mov edx, 1
jmp 0x14002d91e
xor edx, edx
cmp ebp, 0x1b
sete dl
jmp 0x14002d8e0
mov edx, 2
mov rdi, r12
movzx eax, byte [rdi]
test al, al
jne 0x14002d932
mov eax, 1
jmp 0x14002e099
sub eax, 0x40
cmp eax, 0x3e
jbe 0x14002d93f
inc rdi
jmp 0x14002d921
mov r8, r12
mov rcx, rsi
sub r8, rdx
mov rdx, rbx
sub r8, rbx
call fcn.14002d6dc
movzx eax, byte [rdi]
shl eax, 8
or eax, ebp
cmp ax, 0x465b
je 0x14002dbd8
jg 0x14002d9a1
cmp ax, 0x435b
je 0x14002dab6
jg 0x14002d988
cmp ax, 0x415b
je 0x14002d9e9
cmp ax, 0x425b
je 0x14002da48
jmp 0x14002e075
cmp ax, 0x445b
je 0x14002db1e
cmp ax, 0x455b
je 0x14002db7d
jmp 0x14002e075
cmp ax, 0x4b5b
je 0x14002de60
jg 0x14002d9d0
cmp ax, 0x485b
je 0x14002dca1
cmp ax, 0x4a5b
je 0x14002dd90
cmp ax, 0x475b
je 0x14002dc33
jmp 0x14002e075
cmp ax, 0x665b
je 0x14002dca1
cmp ax, 0x6d5b
je 0x14002df20
jmp 0x14002e075
cmp rdi, r12
je 0x14002da10
lea rdx, [rsp + 0x50]
mov r8d, 0xa
mov rcx, r12
call sub.msvcrt.dll_strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x50]
jne 0x14002e075
jmp 0x14002da15
mov ebx, 1
lea rdx, [rsp + 0x5a]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x14002e075
movsx ecx, word [rsp + 0x60]
mov r9d, dword [rsp + 0x5e]
xor eax, eax
cmp ecx, ebx
jle 0x14002dd81
mov eax, ecx
sub eax, ebx
jmp 0x14002dd81
cmp rdi, r12
je 0x14002da6f
lea rdx, [rsp + 0x50]
mov r8d, 0xa
mov rcx, r12
call sub.msvcrt.dll_strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x50]
jne 0x14002e075
jmp 0x14002da74
mov ebx, 1
lea rdx, [rsp + 0x5a]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x14002e075
movsx eax, word [rsp + 0x5c]
movsx r8d, word [rsp + 0x60]
mov r9d, dword [rsp + 0x5e]
mov edx, eax
sub eax, r8d
cmp eax, ebx
jle 0x14002daa7
lea edx, [r8 + rbx]
shl edx, 0x10
movzx r9d, r9w
or r9d, edx
jmp 0x14002dc90
cmp rdi, r12
je 0x14002dadd
lea rdx, [rsp + 0x50]
mov r8d, 0xa
mov rcx, r12
call sub.msvcrt.dll_strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x50]
jne 0x14002e075
jmp 0x14002dae2
mov ebx, 1
lea rdx, [rsp + 0x5a]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x14002e075
movsx edx, word [rsp + 0x5a]
movsx r8d, word [rsp + 0x5e]
mov r9d, dword [rsp + 0x5e]
mov eax, edx
sub edx, r8d
cmp edx, ebx
jle 0x14002dc8c
lea eax, [r8 + rbx]
jmp 0x14002dc8c
cmp rdi, r12
je 0x14002db45
lea rdx, [rsp + 0x50]
mov r8d, 0xa
mov rcx, r12
call sub.msvcrt.dll_strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x50]
jne 0x14002e075
jmp 0x14002db4a
mov ebx, 1
lea rdx, [rsp + 0x5a]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x14002e075
movsx ecx, word [rsp + 0x5e]
mov r9d, dword [rsp + 0x5e]
xor eax, eax
cmp ecx, ebx
jle 0x14002dc8c
mov eax, ecx
sub eax, ebx
jmp 0x14002dc8c
cmp rdi, r12
je 0x14002dba4
lea rdx, [rsp + 0x50]
mov r8d, 0xa
mov rcx, r12
call sub.msvcrt.dll_strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x50]
jne 0x14002e075
jmp 0x14002dba9
mov ebx, 1
lea rdx, [rsp + 0x5a]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x14002e075
movsx eax, word [rsp + 0x5c]
movsx ecx, word [rsp + 0x60]
mov r9d, eax
sub eax, ecx
cmp eax, ebx
jle 0x14002dc2d
lea r9d, [rcx + rbx]
jmp 0x14002dc2d
cmp rdi, r12
je 0x14002dbff
lea rdx, [rsp + 0x50]
mov r8d, 0xa
mov rcx, r12
call sub.msvcrt.dll_strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x50]
jne 0x14002e075
jmp 0x14002dc04
mov ebx, 1
lea rdx, [rsp + 0x5a]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x14002e075
movsx edx, word [rsp + 0x60]
xor r9d, r9d
mov eax, edx
cmp edx, ebx
jle 0x14002dc2d
sub eax, ebx
mov r9d, eax
shl r9d, 0x10
jmp 0x14002dc90
cmp rdi, r12
je 0x14002dc5a
lea rdx, [rsp + 0x50]
mov r8d, 0xa
mov rcx, r12
call sub.msvcrt.dll_strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x50]
jne 0x14002e075
jmp 0x14002dc5f
mov ebx, 1
lea rdx, [rsp + 0x5a]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x14002e075
mov r9d, dword [rsp + 0x5e]
xor eax, eax
dec ebx
js 0x14002dc8c
movsx edx, word [rsp + 0x5a]
mov eax, edx
cmp ebx, edx
cmovle eax, ebx
mov r9w, ax
mov edx, r9d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x14002e075
cmp rdi, r12
je 0x14002dd25
mov r8, rdi
mov edx, 0x3b
mov rcx, r12
sub r8, r12
call fcn.1400742a0
mov r8d, 0xa
lea rdx, [rsp + 0x50]
test rax, rax
mov rbp, rax
jne 0x14002dce8
mov rcx, r12
mov ebp, 1
call sub.msvcrt.dll_strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x50]
jne 0x14002e075
jmp 0x14002dd2f
mov rcx, r12
mov qword [rsp + 0x30], rdx
call sub.msvcrt.dll_strtol
cmp rbp, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x30]
mov ebx, eax
jne 0x14002e075
lea rcx, [rbp + 1]
mov r8d, 0xa
call sub.msvcrt.dll_strtol
mov ebp, eax
cmp rdi, qword [rsp + 0x50]
jne 0x14002e075
jmp 0x14002dd2f
mov ebp, 1
mov ebx, 1
lea rdx, [rsp + 0x5a]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x14002e075
movsx eax, word [rsp + 0x66]
lea ecx, [rbx + rax - 1]
movsx eax, word [rsp + 0x64]
lea edx, [rbp + rax - 1]
xor eax, eax
test ecx, ecx
js 0x14002dd6c
movsx r8d, word [rsp + 0x5c]
mov eax, r8d
cmp ecx, r8d
cmovle eax, ecx
xor r9d, r9d
test edx, edx
js 0x14002dd81
movsx ecx, word [rsp + 0x5a]
mov r9d, ecx
cmp edx, ecx
cmovle r9d, edx
shl eax, 0x10
movzx r9d, r9w
or r9d, eax
jmp 0x14002dc90
cmp rdi, r12
je 0x14002ddb7
lea rdx, [rsp + 0x50]
mov r8d, 0xa
mov rcx, r12
call sub.msvcrt.dll_strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x50]
jne 0x14002e075
jmp 0x14002ddb9
xor ebx, ebx
lea rdx, [rsp + 0x5a]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x14002e075
cmp ebx, 1
je 0x14002ddff
cmp ebx, 2
je 0x14002de1c
test ebx, ebx
jne 0x14002de33
movsx eax, word [rsp + 0x5e]
movsx ecx, word [rsp + 0x5a]
movsx r8d, word [rsp + 0x60]
mov r9d, eax
sub ecx, eax
movsx eax, word [rsp + 0x6a]
mov edx, r8d
sub eax, r8d
jmp 0x14002de3f
movsx r8d, word [rsp + 0x66]
movsx ecx, word [rsp + 0x5e]
xor r9d, r9d
movsx eax, word [rsp + 0x60]
mov edx, r8d
inc ecx
sub eax, r8d
jmp 0x14002de3f
movsx ecx, word [rsp + 0x66]
movsx eax, word [rsp + 0x6a]
mov r9d, dword [rsp + 0x64]
sub eax, ecx
mov edx, ecx
inc eax
jmp 0x14002de3d
movsx eax, word [rsp + 0x5c]
xor edx, edx
xor r9d, r9d
xor ecx, ecx
test eax, eax
js 0x14002e075
movsx r8d, word [rsp + 0x5a]
shl edx, 0x10
movzx r9d, r9w
or r9d, edx
imul r8d, eax
add r8d, ecx
jmp 0x14002dedc
cmp rdi, r12
je 0x14002de87
lea rdx, [rsp + 0x50]
mov r8d, 0xa
mov rcx, r12
call sub.msvcrt.dll_strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x50]
jne 0x14002e075
jmp 0x14002de89
xor ebx, ebx
lea rdx, [rsp + 0x5a]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x14002e075
mov eax, dword [rsp + 0x60]
test ebx, ebx
je 0x14002deb6
dec ebx
jne 0x14002dec9
movsx r8d, word [rsp + 0x5e]
inc r8d
jmp 0x14002decf
movsx edx, word [rsp + 0x5e]
movsx r8d, word [rsp + 0x5a]
mov r9d, edx
sub r8d, edx
jmp 0x14002ded2
movsx r8d, word [rsp + 0x5a]
xor r9d, r9d
shl eax, 0x10
movzx r9d, r9w
or r9d, eax
lea rbx, [rsp + 0x4c]
mov dword [rsp + 0x3c], r9d
mov rcx, rsi
mov edx, 0x20
mov dword [rsp + 0x30], r8d
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
mov qword [rsp + 0x20], rbx
movzx edx, word [rsp + 0x62]
mov rcx, rsi
mov r9d, dword [rsp + 0x3c]
mov r8d, dword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
jmp 0x14002e075
mov ebx, 7
cmp rdi, r12
je 0x14002e04a
xor ebp, ebp
lea r13, [rsp + 0x50]
lea r14, [0x1400fa334]
xor ebx, ebx
mov rcx, r12
mov r8d, 0xa
mov rdx, r13
call sub.msvcrt.dll_strtol
mov r12, qword [rsp + 0x50]
cmp byte [r12], 0x3b
je 0x14002df64
cmp rdi, r12
jne case.0x14002df76.38
cmp eax, 0x31
ja case.0x14002df76.2
mov edx, eax
movsxd rdx, dword [r14 + rdx*4]
add rdx, r14
jmp rdx
or ebx, 7
or ebp, 0xffffffff
jmp case.0x14002df76.2
or ebx, 8
jmp case.0x14002df76.2
or bx, 0x8000
jmp case.0x14002df76.2
or bl, 0x80
jmp case.0x14002df76.2
or bh, 0x40
jmp case.0x14002df76.2
and ebx, 0xfffffff7
or ebp, 8
jmp case.0x14002df76.2
and bx, 0x7fff
or bp, 0x8000
jmp case.0x14002df76.2
and bl, 0x7f
or bpl, 0x80
jmp case.0x14002df76.2
and bh, 0xbf
or bp, 0x4000
jmp case.0x14002df76.2
mov ecx, eax
and ebx, 0xfffffff8
lea r8d, [rax - 0x1e]
and ecx, 1
shl ecx, 2
or ebx, ecx
test al, 2
jne 0x14002dfe1
or ebx, 2
and r8d, 4
je 0x14002dfef
or ebx, 1
jmp 0x14002dfef
or ebx, 7
or ebp, 7
jmp case.0x14002df76.2
mov ecx, eax
and ebx, 0xffffff8f
lea r8d, [rax - 0x28]
and ecx, 1
shl ecx, 6
or ebx, ecx
test al, 2
je 0x14002e00c
or ebx, 0x20
and r8d, 4
je 0x14002e01a
or ebx, 0x10
jmp 0x14002e01a
and ebx, 0xffffff8f
or ebp, 0x70
inc r12
cmp rdi, r12
jne 0x14002df3e
cmp bp, 0xffff
je 0x14002e04a
lea rdx, [rsp + 0x5a]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x14002e04a
not ebp
and bp, word [rsp + 0x62]
or ebx, ebp
test bh, 0x40
je 0x14002e069
mov eax, ebx
mov edx, ebx
shl ebx, 4
shr ax, 4
xor dl, dl
movzx ebx, bl
and eax, 0xf
or eax, edx
or ebx, eax
and bh, 0xbf
movzx edx, bx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
lea rbx, [rdi + 1]
jmp 0x14002d8db
mov rcx, rbx
call sub.msvcrt.dll_strlen
mov rdx, rbx
mov rcx, rsi
mov r8, rax
call fcn.14002d6dc
jmp 0x14002d928
add rsp, 0x70
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret