Function at 0x140027ec0
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 [0x14003d0f8]
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 r14, 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 0x140027f2b
lea ecx, [rax + 2]
call qword [sym.imp.msvcrt.dll__get_osfhandle]
nop dword [rax + rax]
mov r13, rax
xor edi, edi
cmp byte [0x140045b25], dil
je 0x14002839f
lea eax, [rdi + 0x20]
cmp word [0x14003d124], ax
jae 0x14002839f
cmp word [0x14003d120], ax
jae 0x14002839f
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 0x14002839f
mov cl, byte [0x14003d124]
lea edx, [rdi + 1]
movzx eax, word [0x14003d120]
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], edi
call fcn.140031338
mov dword [0x140045ae4], edi
mov dword [0x140045adc], edi
mov dword [0x140045ad8], edi
mov dword [0x140045ae0], edi
lea rcx, [0x140058470]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockShared]
nop dword [rax + rax]
lea rax, [rbp - 0x19]
mov r9, r14
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, [0x140058470]
mov r15d, eax
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
nop dword [rax + rax]
mov ecx, dword [r14]
xor r11d, r11d
cmp dword [0x140041924], r11d
mov dword [rbp - 0x31], ecx
je 0x140028047
call fcn.1400158e4
xor r11d, r11d
test rdi, rdi
je 0x140028044
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_HeapFree]
nop dword [rax + rax]
xor r11d, r11d
mov rdi, r11
test r15d, r15d
je 0x140028091
mov r10, qword [rbp - 0x29]
or eax, 0xffffffff
mov r12d, r11d
mov r14d, eax
mov edx, eax
mov ecx, r11d
cmp dword [r10], r11d
jbe 0x140028091
movzx r8d, word [0x14003d124]
movzx r9d, word [0x14003d120]
mov eax, ecx
cmp word [rsi + rax*2], 0xd
je 0x1400280ce
cmp word [rsi + rax*2], r8w
je 0x1400280c9
cmp word [rsi + rax*2], r9w
je 0x1400280be
inc ecx
cmp ecx, dword [r10]
jb 0x140028073
test rdi, rdi
je 0x1400280b6
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_HeapFree]
nop dword [rax + rax]
mov eax, r15d
jmp 0x1400283e6
mov r14d, ecx
mov r12d, 1
jmp 0x1400280d0
mov r14d, ecx
jmp 0x1400280d5
mov edx, ecx
cmp edx, 0xffffffff
jne 0x140028091
cmp r14d, 0xffffffff
je 0x140028091
mov eax, r14d
mov dword [r10], r14d
mov word [rsi + rax*2], r11w
test rdi, rdi
je 0x14002810f
mov r8, rdi
mov rax, rsi
sub r8, rsi
movzx ecx, word [rax]
movzx edx, word [rax + r8]
sub ecx, edx
jne 0x140028108
add rax, 2
test edx, edx
jne 0x1400280f4
mov r15d, r11d
test ecx, ecx
je 0x140028115
mov r15d, 1
test r12d, r12d
jne 0x14002820f
cmp r14d, 2
jbe 0x14002820f
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140035e70]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x140028209
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140035e78]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x140028209
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140035e80]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x140028209
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.chdir
call qword [sym.imp.msvcrt.dll__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x140028209
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.rmdir
call qword [sym.imp.msvcrt.dll__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x140028209
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.mkdir
call qword [sym.imp.msvcrt.dll__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x140028209
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.pushd
call qword [sym.imp.msvcrt.dll__wcsnicmp]
nop dword [rax + rax]
test eax, eax
jne 0x14002820f
mov r12d, 1
mov r9d, dword [rbp - 0xd]
mov r8d, r14d
shr r9d, 4
mov rcx, rsi
not r9d
mov dword [rsp + 0x28], r15d
mov r15d, dword [rbp - 0x2d]
and r9d, 1
mov edx, r15d
mov dword [rsp + 0x20], r12d
call fcn.140031078
xor r12d, r12d
test eax, eax
je 0x1400282f3
call fcn.14002f1ec
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 0x14002827e
movsx ecx, word [rbp - 9]
xor edx, edx
movsx eax, word [rbp - 0x39]
add eax, r14d
div ecx
movzx ecx, word [rbp - 3]
sub cx, ax
mov word [rbp - 0x37], cx
mov ebx, dword [rbp - 0x39]
or r14, 0xffffffffffffffff
mov rax, r14
inc rax
cmp word [rsi + rax*2], r12w
jne 0x140028285
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.140010580
jmp 0x14002831f
call fcn.1400197cc
test al, al
je 0x14002830b
or ecx, 0xffffffff
call qword [sym.imp.ext_ms_win_cmd_util_l1_1_0.dll_MessageBeepStub]
nop dword [rax + rax]
or r14, 0xffffffffffffffff
mov rax, r14
inc rax
cmp word [rsi + rax*2], r12w
jne 0x140028312
mov dword [rbp - 0x15], eax
test rdi, rdi
je 0x140028344
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_HeapFree]
nop dword [rax + rax]
mov rax, r14
inc rax
cmp word [rsi + rax*2], r12w
jne 0x140028347
inc eax
mov r14d, 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 rdi, rax
test rax, rax
je 0x14002839d
mov r8, rsi
mov edx, r14d
mov rcx, rax
call fcn.1400113e0
mov r14, qword [rbp - 0x29]
mov r12, qword [rbp - 0x21]
jmp 0x140027fb8
jmp 0x1400283e6
lea rcx, [0x140058470]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockShared]
nop dword [rax + rax]
mov r9, r14
mov qword [rsp + 0x20], rdi
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, [0x140058470]
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.140018f90
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret