Function at 0x140026884
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 [0x14003b0f8]
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]
mov r13, rax
cmp rax, 0xffffffffffffffff
jne 0x1400268e3
lea ecx, [rax + 2]
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov r13, rax
xor edi, edi
cmp byte [0x140043aa5], dil
je 0x140026cc3
lea eax, [rdi + 0x20]
cmp word [0x14003b124], ax
jae 0x140026cc3
cmp word [0x14003b120], ax
jae 0x140026cc3
lea rdx, [rbp - 9]
mov rcx, r13
call qword [sym.imp.api_ms_win_core_console_l2_1_0.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026cc3
mov cl, byte [0x14003b124]
lea edx, [rdi + 1]
movzx eax, word [0x14003b120]
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.14002ed90
mov dword [0x140043a64], edi
mov dword [0x140043a5c], edi
mov dword [0x140043a58], edi
mov dword [0x140043a60], edi
lea rcx, [0x1400561f0]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockShared]
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]
lea rcx, [0x1400561f0]
mov r15d, eax
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
mov ecx, dword [r14]
xor r11d, r11d
cmp dword [0x14003f8a4], r11d
mov dword [rbp - 0x31], ecx
je 0x1400269db
call fcn.140014794
xor r11d, r11d
test rdi, rdi
je 0x1400269d8
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
xor r11d, r11d
mov rdi, r11
test r15d, r15d
je 0x140026a25
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 0x140026a25
movzx r8d, word [0x14003b124]
movzx r9d, word [0x14003b120]
mov eax, ecx
cmp word [rsi + rax*2], 0xd
je 0x140026a56
cmp word [rsi + rax*2], r8w
je 0x140026a51
cmp word [rsi + rax*2], r9w
je 0x140026a46
inc ecx
cmp ecx, dword [r10]
jb 0x140026a07
test rdi, rdi
je 0x140026a3e
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov eax, r15d
jmp 0x140026cf8
mov r14d, ecx
mov r12d, 1
jmp 0x140026a58
mov r14d, ecx
jmp 0x140026a5d
mov edx, ecx
cmp edx, 0xffffffff
jne 0x140026a25
cmp r14d, 0xffffffff
je 0x140026a25
mov eax, r14d
mov dword [r10], r14d
mov word [rsi + rax*2], r11w
test rdi, rdi
je 0x140026a97
mov r8, rdi
mov rax, rsi
sub r8, rsi
movzx ecx, word [rax]
movzx edx, word [rax + r8]
sub ecx, edx
jne 0x140026a90
add rax, 2
test edx, edx
jne 0x140026a7c
mov r15d, r11d
test ecx, ecx
je 0x140026a9d
mov r15d, 1
test r12d, r12d
jne 0x140026b69
cmp r14d, 2
jbe 0x140026b69
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140033e40]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x140026b63
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140033e48]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x140026b63
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140033e50]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x140026b63
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.chdir
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x140026b63
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.rmdir
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x140026b63
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.mkdir
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x140026b63
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.pushd
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x140026b69
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.14002eadc
xor r12d, r12d
test eax, eax
je 0x140026c35
call fcn.14002ccec
lea rdx, [rbp - 9]
mov rcx, r13
call qword [sym.imp.api_ms_win_core_console_l2_1_0.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026bd2
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 0x140026bd9
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]
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]
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]
mov eax, dword [rbp - 0x35]
mov dword [rbp - 0x15], eax
call fcn.14000f980
jmp 0x140026c5b
call fcn.140018b0c
test al, al
je 0x140026c47
or ecx, 0xffffffff
call qword [sym.imp.ext_ms_win_cmd_util_l1_1_0.dll_MessageBeepStub]
or r14, 0xffffffffffffffff
mov rax, r14
inc rax
cmp word [rsi + rax*2], r12w
jne 0x140026c4e
mov dword [rbp - 0x15], eax
test rdi, rdi
je 0x140026c74
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
mov rax, r14
inc rax
cmp word [rsi + rax*2], r12w
jne 0x140026c77
inc eax
mov r14d, eax
lea rdi, [rax + rax]
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x140026cc1
mov r8, rsi
mov edx, r14d
mov rcx, rax
call fcn.1400106e0
mov r14, qword [rbp - 0x29]
mov r12, qword [rbp - 0x21]
jmp 0x14002696a
jmp 0x140026cf8
lea rcx, [0x1400561f0]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockShared]
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]
lea rcx, [0x1400561f0]
mov ebx, eax
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
mov eax, ebx
mov rcx, qword [rbp + 0xf]
xor rcx, rsp
call fcn.1400182e0
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret