Function at 0x14002bf68
Capabilities:
Manipulate console buffer

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0x88
mov rax, qword [0x1400400b0]
xor rax, rsp
mov qword [rbp + 0xf], rax
mov r12, rcx
mov qword [rbp - 0x21], rcx
mov ecx, 0xfffffff5
mov qword [rbp - 0x29], r9
mov rdi, r9
mov dword [rbp - 0x2d], r8d
mov r15d, r8d
mov rsi, rdx
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetStdHandle]
nop dword [rax + rax]
mov r13, rax
cmp rax, 0xffffffffffffffff
jne 0x14002bfd3
lea ecx, [rax + 2]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__get_osfhandle]
nop dword [rax + rax]
mov r13, rax
xor r14d, r14d
cmp byte [0x14004cbc5], r14b
je 0x14002c43b
lea eax, [r14 + 0x20]
cmp word [0x1400400f4], ax
jae 0x14002c43b
cmp word [0x1400400f0], ax
jae 0x14002c43b
lea rdx, [rbp - 9]
mov rcx, r13
call qword [sym.imp.api_ms_win_core_console_l2_1_0.dll_GetConsoleScreenBufferInfo]
nop dword [rax + rax]
test eax, eax
je 0x14002c43b
mov cl, byte [0x1400400f4]
lea edx, [r14 + 1]
movzx eax, word [0x1400400f0]
mov ebx, dword [rbp - 5]
shl edx, cl
bts edx, eax
mov dword [rbp - 0x39], ebx
mov dword [rbp - 0x11], edx
mov qword [rbp - 0x19], 0x10
mov dword [rbp - 0xd], r14d
call fcn.140034e98
mov dword [0x14004cb84], r14d
mov dword [0x14004cb7c], r14d
mov dword [0x14004cb78], r14d
mov dword [0x14004cb80], r14d
lea rcx, [0x14005b420]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockShared]
nop dword [rax + rax]
lea rax, [rbp - 0x19]
mov r9, rdi
mov r8d, r15d
mov qword [rsp + 0x20], rax
mov rdx, rsi
mov rcx, r12
call qword [sym.imp.api_ms_win_core_console_l1_1_0.dll_ReadConsoleW]
nop dword [rax + rax]
lea rcx, [0x14005b420]
mov r15d, eax
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
nop dword [rax + rax]
mov ecx, dword [rdi]
xor r9d, r9d
cmp dword [0x1400449b4], r9d
mov dword [rbp - 0x31], ecx
je 0x14002c0f6
call fcn.140013ed4
xor r9d, r9d
test r14, r14
je 0x14002c0f3
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
xor r9d, r9d
mov r14, r9
test r15d, r15d
je 0x14002c13b
mov r8, qword [rbp - 0x29]
mov r12d, r9d
mov edi, r9d
cmp dword [r8], r9d
jbe 0x14002c13b
movzx ecx, word [0x1400400f4]
mov r10d, 1
movzx edx, word [0x1400400f0]
mov eax, edi
cmp word [rsi + rax*2], 0xd
je 0x14002c16d
cmp word [rsi + rax*2], cx
je 0x14002c178
cmp word [rsi + rax*2], dx
je 0x14002c168
add edi, r10d
cmp edi, dword [r8]
jb 0x14002c11e
test r14, r14
je 0x14002c160
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
mov eax, r15d
jmp 0x14002c482
mov r12d, r10d
jmp 0x14002c178
mov eax, edi
or ecx, 0xffffffff
mov edi, ecx
cmp eax, ecx
jne 0x14002c13b
cmp edi, 0xffffffff
je 0x14002c13b
mov eax, edi
mov dword [r8], edi
mov word [rsi + rax*2], r9w
test r14, r14
je 0x14002c1b0
mov r8, r14
mov rax, rsi
sub r8, rsi
movzx ecx, word [rax]
movzx edx, word [rax + r8]
sub ecx, edx
jne 0x14002c1a9
add rax, 2
test edx, edx
jne 0x14002c195
mov r15d, r9d
test ecx, ecx
je 0x14002c1b3
mov r15d, r10d
test r12d, r12d
jne 0x14002c2ac
cmp edi, 2
jbe 0x14002c2ac
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140039548]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x14002c2a6
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140039550]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x14002c2a6
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140039558]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x14002c2a6
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.chdir
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x14002c2a6
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.rmdir
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x14002c2a6
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.mkdir
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x14002c2a6
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.pushd
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsnicmp]
nop dword [rax + rax]
test eax, eax
jne 0x14002c2ac
mov r12d, 1
mov r9d, dword [rbp - 0xd]
mov r8d, edi
mov edx, dword [rbp - 0x2d]
mov rcx, rsi
shr r9d, 4
not r9d
mov dword [rsp + 0x28], r15d
and r9d, 1
mov dword [rsp + 0x20], r12d
call fcn.140034bd8
xor r12d, r12d
test eax, eax
je 0x14002c38b
call fcn.140032c0c
lea rdx, [rbp - 9]
mov rcx, r13
call qword [sym.imp.api_ms_win_core_console_l2_1_0.dll_GetConsoleScreenBufferInfo]
nop dword [rax + rax]
test eax, eax
je 0x14002c316
movsx ecx, word [rbp - 9]
xor edx, edx
movsx eax, word [rbp - 0x39]
add eax, edi
div ecx
movzx ecx, word [rbp - 3]
sub cx, ax
mov word [rbp - 0x37], cx
mov ebx, dword [rbp - 0x39]
or rdi, 0xffffffffffffffff
mov rax, rdi
inc rax
cmp word [rsi + rax*2], r12w
jne 0x14002c31d
mov edx, ebx
mov dword [rbp - 0x35], eax
mov rcx, r13
call qword [sym.imp.api_ms_win_core_console_l2_1_0.dll_SetConsoleCursorPosition]
nop dword [rax + rax]
mov r8d, dword [rbp - 0x31]
lea rax, [rbp - 0x31]
mov edx, 0x20
mov qword [rsp + 0x20], rax
mov r9d, ebx
mov rcx, r13
call qword [sym.imp.api_ms_win_core_console_l2_1_0.dll_FillConsoleOutputCharacterW]
nop dword [rax + rax]
mov r8d, dword [rbp - 0x35]
lea r9, [rbp - 0x35]
mov rdx, rsi
mov qword [rsp + 0x20], r12
mov rcx, r13
call qword [sym.imp.api_ms_win_core_console_l1_1_0.dll_WriteConsoleW]
nop dword [rax + rax]
mov eax, dword [rbp - 0x35]
mov dword [rbp - 0x15], eax
call fcn.140014740
jmp 0x14002c3b7
call fcn.140020bec
test al, al
je 0x14002c3a3
or ecx, 0xffffffff
call qword [sym.imp.ext_ms_win_cmd_util_l1_1_0.dll_MessageBeepStub]
nop dword [rax + rax]
or rdi, 0xffffffffffffffff
mov rax, rdi
inc rax
cmp word [rsi + rax*2], r12w
jne 0x14002c3aa
mov dword [rbp - 0x15], eax
test r14, r14
je 0x14002c3dc
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
mov rax, rdi
inc rax
cmp word [rsi + rax*2], r12w
jne 0x14002c3df
inc eax
mov r15d, eax
lea rdi, [rax + rax]
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
nop dword [rax + rax]
mov r14, rax
test rax, rax
je 0x14002c439
mov r8, rsi
mov edx, r15d
mov rcx, rax
call fcn.1400158f0
mov rdi, qword [rbp - 0x29]
mov r15d, dword [rbp - 0x2d]
mov r12, qword [rbp - 0x21]
jmp 0x14002c068
jmp 0x14002c482
lea rcx, [0x14005b420]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockShared]
nop dword [rax + rax]
mov r9, rdi
mov qword [rsp + 0x20], r14
mov r8d, r15d
mov rdx, rsi
mov rcx, r12
call qword [sym.imp.api_ms_win_core_console_l1_1_0.dll_ReadConsoleW]
nop dword [rax + rax]
lea rcx, [0x14005b420]
mov ebx, eax
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
nop dword [rax + rax]
mov eax, ebx
mov rcx, qword [rbp + 0xf]
xor rcx, rsp
call fcn.14001f920
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret