Function at 0x14002452c
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 [0x1400390f8]
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 0x14002458b
lea ecx, [rax + 2]
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov r13, rax
xor edi, edi
cmp byte [0x1400502b9], dil
je 0x14002496b
lea eax, [rdi + 0x20]
cmp word [0x14003912c], ax
jae 0x14002496b
cmp word [0x140039128], ax
jae 0x14002496b
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 0x14002496b
mov cl, byte [0x14003912c]
lea edx, [rdi + 1]
movzx eax, word [0x140039128]
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.14002d550
mov dword [0x140039878], edi
mov dword [0x140039870], edi
mov dword [0x14003986c], edi
mov dword [0x140039874], edi
lea rcx, [0x140054530]
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, [0x140054530]
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 [0x140039834], r11d
mov dword [rbp - 0x31], ecx
je 0x140024683
call fcn.14000aa60
xor r11d, r11d
test rdi, rdi
je 0x140024680
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 0x1400246cd
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 0x1400246cd
movzx r8d, word [0x14003912c]
movzx r9d, word [0x140039128]
mov eax, ecx
cmp word [rsi + rax*2], 0xd
je 0x1400246fe
cmp word [rsi + rax*2], r8w
je 0x1400246f9
cmp word [rsi + rax*2], r9w
je 0x1400246ee
inc ecx
cmp ecx, dword [r10]
jb 0x1400246af
test rdi, rdi
je 0x1400246e6
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 0x1400249a0
mov r14d, ecx
mov r12d, 1
jmp 0x140024700
mov r14d, ecx
jmp 0x140024705
mov edx, ecx
cmp edx, 0xffffffff
jne 0x1400246cd
cmp r14d, 0xffffffff
je 0x1400246cd
mov eax, r14d
mov dword [r10], r14d
mov word [rsi + rax*2], r11w
test rdi, rdi
je 0x14002473f
mov r8, rdi
mov rax, rsi
sub r8, rsi
movzx ecx, word [rax]
movzx edx, word [rax + r8]
sub ecx, edx
jne 0x140024738
add rax, 2
test edx, edx
jne 0x140024724
mov r15d, r11d
test ecx, ecx
je 0x140024745
mov r15d, 1
test r12d, r12d
jne 0x140024811
cmp r14d, 2
jbe 0x140024811
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140031b18]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14002480b
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140031b20]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14002480b
lea r8d, [r12 + 3]
mov rcx, rsi
lea rdx, [0x140031b28]
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14002480b
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.chdir
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14002480b
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.rmdir
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14002480b
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.mkdir
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14002480b
lea r8d, [r12 + 6]
mov rcx, rsi
lea rdx, str.pushd
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x140024811
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.14002d29c
xor r12d, r12d
test eax, eax
je 0x1400248dd
call fcn.14002b66c
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 0x14002487a
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 0x140024881
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.14000fef0
jmp 0x140024903
call fcn.140017b2c
test al, al
je 0x1400248ef
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 0x1400248f6
mov dword [rbp - 0x15], eax
test rdi, rdi
je 0x14002491c
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 0x14002491f
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 0x140024969
mov r8, rsi
mov edx, r14d
mov rcx, rax
call fcn.140011620
mov r14, qword [rbp - 0x29]
mov r12, qword [rbp - 0x21]
jmp 0x140024612
jmp 0x1400249a0
lea rcx, [0x140054530]
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, [0x140054530]
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.1400173b0
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret