Function at 0x140026500
Capabilities:
Manipulate console buffer

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x60
mov rbx, rdx
mov rbp, rcx
mov rcx, rdx
call qword [sym.imp.msvcrt.dll__fileno]
mov ecx, eax
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov rsi, rax
mov eax, 0xffffffff
cmp rsi, 0xffffffffffffffff
je 0x14002668b
mov rcx, rbx
call sym.fflush
lea rdx, [rsp + 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x140026670
movzx edx, byte [rbp]
test edx, edx
je 0x140026670
nop dword [rax]
mov rbx, rbp
nop dword [rax + rax]
movzx eax, byte [rbx + 1]
lea r8d, [rdx - 0x80]
mov ecx, edx
mov r9, rbx
add rbx, 1
movzx edx, al
mov r12d, edx
cmp r8d, 0x1f
jbe 0x140026850
cmp ecx, 0x1b
sete cl
test al, al
je 0x140026670
sub eax, 0x40
cmp al, 0x1f
ja 0x140026570
test cl, cl
je 0x140026570
lea rbx, [r9 + 2]
mov edx, 2
movzx eax, byte [rbx]
test al, al
je 0x140026686
mov rdi, rbx
jmp 0x1400265d8
movzx eax, byte [rdi + 1]
add rdi, 1
test al, al
je 0x140026686
sub eax, 0x40
cmp eax, 0x3e
ja 0x1400265c8
movsxd rax, edx
mov r8, rbx
mov rdx, rbp
mov rcx, rsi
sub r8, rax
sub r8, rbp
call sym.write_all_void__char_const__unsigned_long_long_
movzx eax, byte [rdi]
shl eax, 8
or eax, r12d
cmp ax, 0x465b
je 0x140026a8b
jg 0x1400266e8
cmp ax, 0x435b
je 0x140026a18
jle 0x1400266a0
cmp ax, 0x445b
je 0x140026ae8
cmp ax, 0x455b
jne 0x140026660
cmp rbx, rdi
je 0x140026d21
lea r13, [rsp + 0x38]
mov r8d, 0xa
mov rcx, rbx
mov rdx, r13
call sym.strtol
mov ebp, eax
cmp rdi, qword [rsp + 0x38]
je 0x140026d26
nop dword [rax]
lea rbp, [rdi + 1]
movzx edx, byte [rbp]
test edx, edx
jne 0x140026568
mov rcx, rbp
call sym.strlen
mov rdx, rbp
mov rcx, rsi
mov r8, rax
call sym.write_all_void__char_const__unsigned_long_long_
mov eax, 1
add rsp, 0x60
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
cmp ax, 0x415b
je 0x140026b58
cmp ax, 0x425b
jne 0x140026660
cmp rbx, rdi
je 0x140026c40
lea r13, [rsp + 0x38]
mov rcx, rbx
mov r8d, 0xa
mov rdx, r13
call sym.strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x38]
je 0x140026c45
lea rbp, [rdi + 1]
jmp 0x140026664
cmp ax, 0x4b5b
je 0x1400269b0
jle 0x140026768
cmp ax, 0x665b
je 0x1400268d0
cmp ax, 0x6d5b
jne 0x140026660
cmp rbx, rdi
je 0x140026d86
xor r12d, r12d
xor r14d, r14d
lea r13, [rsp + 0x38]
lea rbp, [0x1400ec348]
nop dword [rax + rax]
mov rcx, rbx
mov r8d, 0xa
mov rdx, r13
call sym.strtol
mov rbx, qword [rsp + 0x38]
cmp byte [rbx], 0x3b
je 0x14002674c
cmp rdi, rbx
jne case.0x14002675f.38
cmp eax, 0x31
ja case.0x14002675f.2
mov edx, eax
movsxd rdx, dword [rbp + rdx*4]
add rdx, rbp
jmp rdx
cmp ax, 0x485b
je 0x1400268d0
cmp ax, 0x4a5b
jne 0x1400267e8
cmp rbx, rdi
je 0x140026c93
lea r13, [rsp + 0x38]
mov rcx, rbx
mov r8d, 0xa
mov rdx, r13
call sym.strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x38]
jne 0x140026660
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026660
cmp ebx, 1
je 0x140026ee6
cmp ebx, 2
je 0x140026ec7
test ebx, ebx
je 0x140026ca9
movsx eax, word [rsp + 0x42]
pxor xmm0, xmm0
xor edx, edx
jmp 0x140026ccb
cmp ax, 0x475b
jne 0x140026660
cmp rbx, rdi
je 0x140026ce6
lea r13, [rsp + 0x38]
mov r8d, 0xa
mov rcx, rbx
mov rdx, r13
call sym.strtol
mov ebp, eax
cmp rdi, qword [rsp + 0x38]
jne 0x140026660
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026660
mov eax, ebp
mov ebx, dword [rsp + 0x44]
sub eax, 1
jns 0x140026d02
xor edx, edx
jmp 0x140026d0e
lea r12d, [rcx - 0x40]
mov edx, 1
jmp 0x1400265b3
or r14d, 7
mov r12d, 0xffffffff
nop dword [rax + rax]
add rbx, 1
cmp rdi, rbx
jne 0x140026728
cmp r12w, 0xffff
jne 0x140026c18
movzx edx, r14w
test r14w, 0x4000
je 0x1400268b5
mov eax, r14d
shl edx, 4
shr ax, 4
movzx edx, dl
and eax, 0xf
mov ecx, eax
mov eax, r14d
xor al, al
or eax, ecx
or edx, eax
and edx, 0xbfff
mov rcx, rsi
lea rbp, [rdi + 1]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
jmp 0x140026664
cmp rbx, rdi
je 0x140026ea9
mov r8, rdi
mov edx, 0x3b
lea r13, [rsp + 0x38]
mov rcx, rbx
sub r8, rbx
call sym.memchr
mov r8d, 0xa
mov rdx, r13
mov rcx, rbx
mov rbp, rax
test rax, rax
je 0x140026d6a
call sym.strtol
mov ebx, eax
cmp rbp, qword [rsp + 0x38]
jne 0x140026660
lea rcx, [rbp + 1]
mov r8d, 0xa
mov rdx, r13
call sym.strtol
mov ebp, eax
cmp rdi, qword [rsp + 0x38]
jne 0x140026660
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026660
movsx eax, word [rsp + 0x4c]
lea edx, [rbx + rax - 1]
movsx eax, word [rsp + 0x4a]
lea ecx, [rbp + rax - 1]
xor eax, eax
test edx, edx
js 0x140026977
movsx r8d, word [rsp + 0x42]
mov eax, r8d
cmp edx, r8d
cmovle eax, edx
xor edx, edx
test ecx, ecx
js 0x14002698c
movsx r8d, word [rsp + 0x40]
mov edx, r8d
cmp ecx, r8d
cmovle edx, ecx
movzx edx, dx
shl eax, 0x10
mov rcx, rsi
mov ebx, edx
or ebx, eax
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140026660
cmp rbx, rdi
je 0x140026e18
lea r13, [rsp + 0x38]
mov rcx, rbx
mov r8d, 0xa
mov rdx, r13
call sym.strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x38]
jne 0x140026660
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026660
movzx edx, word [rsp + 0x46]
test ebx, ebx
je 0x140026e33
cmp ebx, 1
je 0x140026eb8
movsx ebp, word [rsp + 0x40]
xor eax, eax
jmp 0x140026e41
cmp rbx, rdi
je 0x140026e0e
lea r13, [rsp + 0x38]
mov r8d, 0xa
mov rcx, rbx
mov rdx, r13
call sym.strtol
mov ebp, eax
cmp rdi, qword [rsp + 0x38]
jne 0x140026660
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026660
movsx r8d, word [rsp + 0x44]
movsx ecx, word [rsp + 0x40]
mov ebx, dword [rsp + 0x44]
mov edx, r8d
mov eax, ecx
sub ecx, r8d
add edx, ebp
cmp ecx, ebp
mov rcx, rsi
cmovg eax, edx
mov bx, ax
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140026660
cmp rbx, rdi
je 0x140026e9f
lea r13, [rsp + 0x38]
mov rcx, rbx
mov r8d, 0xa
mov rdx, r13
call sym.strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x38]
jne 0x140026660
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026660
movsx edx, word [rsp + 0x46]
mov eax, edx
sub eax, ebx
cmp edx, ebx
mov ebx, 0
jmp 0x140026d50
cmp rbx, rdi
je 0x140026e95
lea r13, [rsp + 0x38]
mov r8d, 0xa
mov rcx, rbx
mov rdx, r13
call sym.strtol
mov ebp, eax
cmp rdi, qword [rsp + 0x38]
jne 0x140026660
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026660
movsx edx, word [rsp + 0x44]
mov ebx, dword [rsp + 0x44]
mov rcx, rsi
mov eax, edx
sub eax, ebp
cmp edx, ebp
mov edx, 0
cmovle eax, edx
mov bx, ax
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140026660
cmp rbx, rdi
je 0x140026e8b
lea r13, [rsp + 0x38]
mov rcx, rbx
mov r8d, 0xa
mov rdx, r13
call sym.strtol
mov ebx, eax
cmp rdi, qword [rsp + 0x38]
jne 0x140026660
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026660
movsx edx, word [rsp + 0x46]
mov eax, edx
sub eax, ebx
cmp edx, ebx
mov edx, 0
cmovle eax, edx
jmp 0x140026c75
and r14d, 0xffffff8f
mov edx, r14d
or edx, 0x40
test al, 1
cmovne r14d, edx
mov edx, r14d
or edx, 0x20
test al, 2
cmovne r14d, edx
mov edx, r14d
or edx, 0x10
test al, 4
cmovne r14d, edx
or r12d, 0x70
jmp case.0x14002675f.2
and r14d, 0xfffffff8
lea edx, [rax - 0x1e]
mov ecx, r14d
or ecx, 4
test al, 1
cmovne r14d, ecx
mov ecx, r14d
or ecx, 2
test al, 2
cmove r14d, ecx
mov eax, r14d
or eax, 1
and edx, 4
cmovne r14d, eax
or r12d, 7
jmp case.0x14002675f.2
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026888
mov eax, r12d
not eax
and ax, word [rsp + 0x48]
or r14d, eax
jmp 0x140026888
mov ebx, 1
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026660
movsx r8d, word [rsp + 0x46]
movsx ecx, word [rsp + 0x42]
mov edx, r8d
mov eax, ecx
sub ecx, r8d
add edx, ebx
cmp ecx, ebx
cmovg eax, edx
movzx ebx, word [rsp + 0x44]
shl eax, 0x10
mov rcx, rsi
lea rbp, [rdi + 1]
or ebx, eax
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140026664
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026660
movd xmm0, dword [rsp + 0x44]
movsx edx, word [rsp + 0x40]
pextrw eax, xmm0, 0
pextrw ecx, xmm0, 1
cwde
movsx ecx, cx
sub edx, eax
movsx eax, word [rsp + 0x50]
sub eax, ecx
test eax, eax
js 0x140026660
movsx ebp, word [rsp + 0x40]
movd ebx, xmm0
imul ebp, eax
add ebp, edx
jmp 0x140026e4b
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026660
mov ebx, dword [rsp + 0x44]
xor eax, eax
movsx ecx, word [rsp + 0x40]
mov edx, ecx
cmp ecx, eax
cmovge edx, eax
mov bx, dx
mov rcx, rsi
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140026660
mov ebp, 1
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026660
movsx ecx, word [rsp + 0x46]
movsx edx, word [rsp + 0x42]
mov eax, ecx
mov ebx, edx
sub edx, ecx
add eax, ebp
cmp edx, ebp
cmovg ebx, eax
mov rcx, rsi
lea rbp, [rdi + 1]
shl ebx, 0x10
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140026664
call sym.strtol
mov ebp, 1
mov ebx, eax
cmp rdi, qword [rsp + 0x38]
jne 0x140026660
jmp 0x14002693a
mov edx, 7
jmp 0x1400268b5
and r14d, 0xffffff8f
or r12d, 0x70
jmp case.0x14002675f.2
and r14w, 0xbfff
or r12w, 0x4000
jmp case.0x14002675f.2
and r14b, 0x7f
or r12b, 0x80
jmp case.0x14002675f.2
or r14d, 7
or r12d, 7
jmp case.0x14002675f.2
and r14w, 0x7fff
or r12w, 0x8000
jmp case.0x14002675f.2
and r14d, 0xfffffff7
or r12d, 8
jmp case.0x14002675f.2
or r14w, 0x4000
jmp case.0x14002675f.2
or r14b, 0x80
jmp case.0x14002675f.2
or r14w, 0x8000
jmp case.0x14002675f.2
or r14d, 8
jmp case.0x14002675f.2
mov ebp, 1
jmp 0x140026a44
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140026660
movzx edx, word [rsp + 0x46]
movsx ecx, word [rsp + 0x44]
movsx ebp, word [rsp + 0x40]
mov eax, ecx
sub ebp, ecx
shl edx, 0x10
movzx eax, ax
or eax, edx
mov ebx, eax
lea r12, [rsp + 0x34]
mov r8d, ebp
mov r9d, ebx
mov edx, 0x20
mov rcx, rsi
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
mov r8d, ebp
mov qword [rsp + 0x20], r12
mov r9d, ebx
movzx edx, word [rsp + 0x48]
mov rcx, rsi
lea rbp, [rdi + 1]
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
jmp 0x140026664
mov ebx, 1
jmp 0x140026b84
mov ebp, 1
jmp 0x140026b14
mov ebx, 1
jmp 0x140026ab7
mov ebp, 1
mov ebx, 1
jmp 0x14002693a
movsx ebp, word [rsp + 0x44]
xor eax, eax
add ebp, 1
jmp 0x140026e41
movd xmm0, dword [rsp + 0x4a]
movsx eax, word [rsp + 0x50]
pextrw edx, xmm0, 1
movsx edx, dx
sub eax, edx
xor edx, edx
add eax, 1
jmp 0x140026ccb
movsx ecx, word [rsp + 0x4c]
movsx edx, word [rsp + 0x44]
mov eax, ecx
add edx, 1
shl eax, 0x10
movd xmm0, eax
movsx eax, word [rsp + 0x46]
sub eax, ecx
jmp 0x140026ccb