Function at 0x1400032fc
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 [0x14002f008]
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_2_0.dll_GetStdHandle]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x14001e62c
xor edi, edi
cmp byte [0x140046d39], dil
je 0x14001e950
lea eax, [rdi + 0x20]
cmp word [0x14002f030], ax
jae 0x14001e950
cmp word [0x14002f034], ax
jae 0x14001e950
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 0x14001e950
mov cl, byte [0x14002f030]
lea edx, [rdi + 1]
movzx eax, word [0x14002f034]
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.14000355c
mov dword [0x140030348], edi
mov dword [0x14003034c], edi
mov dword [0x140030344], edi
mov dword [0x140030340], edi
lea rcx, [0x140030378]
call qword [sym.imp.api_ms_win_core_synch_l1_2_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, [0x140030378]
mov r15d, eax
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_ReleaseSRWLockShared]
mov ecx, dword [r14]
xor r11d, r11d
cmp dword [0x14002f70c], r11d
mov dword [rbp - 0x31], ecx
jne 0x14001e63f
jmp 0x14001e666
mov ecx, 1
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov r13, rax
jmp 0x140003353
call fcn.140006068
xor r11d, r11d
test rdi, rdi
je 0x14001e663
call qword [sym.imp.api_ms_win_core_heap_l1_2_0.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_2_0.dll_HeapFree]
xor r11d, r11d
mov rdi, r11
test r15d, r15d
je 0x14001e6b0
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 0x14001e6b0
movzx r8d, word [0x14002f030]
movzx r9d, word [0x14002f034]
mov eax, ecx
cmp word [rsi + rax*2], 0xd
je 0x14001e6e1
cmp word [rsi + rax*2], r8w
je 0x14001e6dc
cmp word [rsi + rax*2], r9w
je 0x14001e6d1
inc ecx
cmp ecx, dword [r10]
jb 0x14001e692
test rdi, rdi
je 0x14001e6c9
call qword [sym.imp.api_ms_win_core_heap_l1_2_0.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_2_0.dll_HeapFree]
mov eax, r15d
jmp 0x14001e985
mov r14d, ecx
mov r12d, 1
jmp 0x14001e6e3
mov r14d, ecx
jmp 0x14001e6e8
mov edx, ecx
cmp edx, 0xffffffff
jne 0x14001e6b0
cmp r14d, 0xffffffff
je 0x14001e6b0
mov eax, r14d
mov dword [r10], r14d
mov word [rsi + rax*2], r11w
test rdi, rdi
je 0x14001e722
mov r8, rdi
mov rax, rsi
sub r8, rsi
movzx ecx, word [rax]
movzx edx, word [rax + r8]
sub ecx, edx
jne 0x14001e71b
add rax, 2
test edx, edx
jne 0x14001e707
mov r15d, r11d
test ecx, ecx
je 0x14001e728
mov r15d, 1
test r12d, r12d
jne 0x14001e7f4
cmp r14d, 2
jbe 0x14001e7f4
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140029130]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14001e7ee
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140029138]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14001e7ee
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140029140]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14001e7ee
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.chdir
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14001e7ee
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.rmdir
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14001e7ee
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.mkdir
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14001e7ee
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.pushd
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x14001e7f4
mov r12d, 1
mov al, byte [rbp - 0xd]
mov r8d, r14d
not al
mov dword [rsp + 0x28], r15d
mov r15d, dword [rbp - 0x2d]
mov rcx, rsi
movzx r9d, al
mov edx, r15d
shr r9d, 4
and r9d, 1
mov dword [rsp + 0x20], r12d
call fcn.1400264f4
xor r12d, r12d
test eax, eax
je 0x14001e8c2
call fcn.140024c08
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 0x14001e85f
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 0x14001e866
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.14000c0f0
jmp 0x14001e8e8
call fcn.1400158e4
test al, al
je 0x14001e8d4
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 0x14001e8db
mov dword [rbp - 0x15], eax
test rdi, rdi
je 0x14001e901
call qword [sym.imp.api_ms_win_core_heap_l1_2_0.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_2_0.dll_HeapFree]
mov rax, r14
inc rax
cmp word [rsi + rax*2], r12w
jne 0x14001e904
inc eax
mov r14d, eax
lea rdi, [rax + rax]
call qword [sym.imp.api_ms_win_core_heap_l1_2_0.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_2_0.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x14001e94e
mov r8, rsi
mov edx, r14d
mov rcx, rax
call fcn.14000dc10
mov r14, qword [rbp - 0x29]
mov r12, qword [rbp - 0x21]
jmp 0x1400033da
jmp 0x14001e985
lea rcx, [0x140030378]
call qword [sym.imp.api_ms_win_core_synch_l1_2_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, [0x140030378]
mov ebx, eax
call qword [sym.imp.api_ms_win_core_synch_l1_2_0.dll_ReleaseSRWLockShared]
mov eax, ebx
mov rcx, qword [rbp + 0xf]
xor rcx, rsp
call fcn.1400151c0
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret