Function at 0x42da40
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 r12, rcx
mov rcx, rdx
call qword [sym.imp.msvcrt.dll__fileno]
mov ecx, eax
call qword [sym.imp.msvcrt.dll__get_osfhandle]
cmp rax, 0xffffffffffffffff
mov rsi, rax
je 0x42e4c5
mov rcx, rbx
call sub.msvcrt.dll_fflush
lea rdx, [rsp + 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x42dae0
lea rdi, [0x004f12ec]
movzx ebx, byte [r12]
test bl, bl
je 0x42dae0
lea eax, [rbx - 0x80]
cmp eax, 0x1f
jbe 0x42db10
mov rdx, r12
jmp 0x42dacb
sub eax, 0x40
cmp al, 0x1f
ja 0x42dac0
test r8b, r8b
jne 0x42dc60
lea eax, [rbx - 0x80]
mov rdx, rcx
cmp eax, 0x1f
jbe 0x42db13
cmp ebx, 0x1b
movzx ebx, byte [rdx + 1]
lea rcx, [rdx + 1]
sete r8b
test bl, bl
mov eax, ebx
jne 0x42dab0
mov rcx, r12
call sub.msvcrt.dll_strlen
mov rdx, r12
mov r8, rax
mov rcx, rsi
call fcn.0042d800
mov eax, 1
add rsp, 0x60
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rcx, r12
sub ebx, 0x40
lea r13, [rcx + 1]
je 0x42dae0
mov edx, 1
movzx eax, byte [r13]
test al, al
je 0x42db54
sub eax, 0x40
mov rbp, r13
cmp eax, 0x3e
ja 0x42db48
jmp 0x42db70
sub eax, 0x40
cmp eax, 0x3e
jbe 0x42db70
add rbp, 1
movzx eax, byte [rbp]
test al, al
jne 0x42db40
mov eax, 1
add rsp, 0x60
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
movsxd rax, edx
mov r8, r13
mov rdx, r12
sub r8, rax
mov rcx, rsi
movzx ebx, bl
sub r8, r12
call fcn.0042d800
movzx eax, byte [rbp]
shl eax, 8
or ebx, eax
cmp bx, 0x465b
je 0x42e17b
jg 0x42dc21
cmp bx, 0x435b
je 0x42e100
jg 0x42dc70
cmp bx, 0x415b
je 0x42dd54
cmp bx, 0x425b
jne 0x42dc53
cmp r13, rbp
je 0x42e408
lea rbx, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r13
mov rdx, rbx
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], rbp
mov r12d, eax
jne 0x42dc53
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x42dc53
movsx ecx, word [rsp + 0x46]
movsx edx, word [rsp + 0x42]
mov eax, ecx
mov ebx, edx
sub edx, ecx
add eax, r12d
cmp edx, r12d
jmp 0x42dda6
cmp bx, 0x4a5b
je 0x42e073
jle 0x42dcf0
cmp bx, 0x665b
je 0x42de94
cmp bx, 0x6d5b
je 0x42de37
cmp bx, 0x4b5b
je 0x42dfc6
lea r12, [rbp + 1]
jmp 0x42da93
lea r13, [rdx + 2]
mov edx, 2
jmp 0x42db21
cmp bx, 0x445b
je 0x42ddc5
cmp bx, 0x455b
jne 0x42dc53
cmp r13, rbp
je 0x42e443
lea rbx, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r13
mov rdx, rbx
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], rbp
mov r12d, eax
jne 0x42dc53
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x42dc53
movsx ecx, word [rsp + 0x46]
movsx edx, word [rsp + 0x42]
mov eax, ecx
mov ebx, edx
sub edx, ecx
add eax, r12d
cmp edx, r12d
cmovg ebx, eax
mov rcx, rsi
shl ebx, 0x10
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x42dc53
cmp bx, 0x475b
jne 0x42de89
cmp r13, rbp
je 0x42e3cd
lea rbx, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r13
mov rdx, rbx
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], rbp
mov r12d, eax
jne 0x42dc53
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x42dc53
xor eax, eax
sub r12d, 1
movzx ebx, word [rsp + 0x46]
js 0x42e161
jmp 0x42e3eb
cmp r13, rbp
je 0x42e3fe
lea rbx, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r13
mov rdx, rbx
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], rbp
mov ebx, eax
jne 0x42dc53
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x42dc53
movsx edx, word [rsp + 0x46]
mov eax, edx
sub eax, ebx
cmp edx, ebx
mov ebx, 0
cmovg ebx, eax
mov rcx, rsi
mov eax, ebx
movzx ebx, word [rsp + 0x44]
shl eax, 0x10
or ebx, eax
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x42dc53
cmp r13, rbp
je 0x42e494
lea rbx, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r13
mov rdx, rbx
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], rbp
mov ebx, eax
jne 0x42dc53
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x42dc53
movsx edx, word [rsp + 0x44]
mov rcx, rsi
mov eax, edx
sub eax, ebx
cmp edx, ebx
mov ebx, 0
cmovg ebx, eax
movzx eax, word [rsp + 0x46]
movzx ebx, bx
shl eax, 0x10
or ebx, eax
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x42dc53
cmp r13, rbp
mov edx, 7
je 0x42dfb8
lea rbx, [rsp + 0x38]
xor r12d, r12d
xor r14d, r14d
mov rdx, rbx
mov r8d, 0xa
mov rcx, r13
call sub.msvcrt.dll_strtol
mov rdx, qword [rsp + 0x38]
cmp byte [rdx], 0x3b
je 0x42de74
cmp rdx, rbp
jne case.0x42de86.38
cmp eax, 0x31
ja case.0x42de86.2
mov ecx, eax
movsxd r8, dword [rdi + rcx*4]
add r8, rdi
jmp r8
cmp bx, 0x485b
jne 0x42dc53
cmp r13, rbp
je 0x42e4a8
mov r8, rbp
mov edx, 0x3b
mov rcx, r13
sub r8, r13
lea rbx, [rsp + 0x38]
call sub.msvcrt.dll_memchr
test rax, rax
mov r12, rax
mov r8d, 0xa
mov rdx, rbx
mov rcx, r13
je 0x42e3b0
call sub.msvcrt.dll_strtol
cmp r12, qword [rsp + 0x38]
mov r13d, eax
jne 0x42dc53
lea rcx, [r12 + 1]
mov rdx, rbx
mov r8d, 0xa
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], rbp
mov ebx, eax
jne 0x42dc53
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x42dc53
movsx eax, word [rsp + 0x4c]
movsx edx, word [rsp + 0x4a]
lea eax, [r13 + rax - 1]
lea ecx, [rbx + rdx - 1]
xor edx, edx
test eax, eax
js 0x42df3e
movsx r8d, word [rsp + 0x42]
mov edx, r8d
cmp eax, r8d
cmovle edx, eax
xor eax, eax
test ecx, ecx
js 0x42df53
movsx r8d, word [rsp + 0x40]
mov eax, r8d
cmp ecx, r8d
cmovle eax, ecx
shl edx, 0x10
movzx eax, ax
mov rcx, rsi
or eax, edx
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x42dc53
or r14d, 7
mov r12d, 0xffffffff
lea r13, [rdx + 1]
cmp r13, rbp
jne 0x42de50
cmp r12w, 0xffff
jne 0x42e1d2
test r14w, 0x4000
movzx edx, r14w
je 0x42dfb8
mov eax, edx
shl edx, 4
and r14w, 0xbf00
sar eax, 4
mov ecx, eax
movzx eax, dl
and ecx, 0xf
or eax, ecx
or r14d, eax
movzx edx, r14w
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
jmp 0x42dc53
cmp r13, rbp
je 0x42e413
lea rbx, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r13
mov rdx, rbx
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], rbp
mov r12d, eax
jne 0x42dc53
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x42dc53
test r12d, r12d
movzx ebx, word [rsp + 0x46]
je 0x42e42e
cmp r12d, 1
jne 0x42e4b8
movsx r12d, word [rsp + 0x44]
xor eax, eax
add r12d, 1
mov edx, ebx
movzx ebx, ax
shl edx, 0x10
or ebx, edx
lea r13, [rsp + 0x34]
mov r9d, ebx
mov r8d, r12d
mov rcx, rsi
mov edx, 0x20
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
movzx edx, word [rsp + 0x48]
mov qword [rsp + 0x20], r13
mov r9d, ebx
mov r8d, r12d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
jmp 0x42dc53
cmp r13, rbp
je 0x42e458
lea rbx, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r13
mov rdx, rbx
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], rbp
mov ebx, eax
jne 0x42dc53
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x42dc53
cmp ebx, 1
je 0x42e4eb
cmp ebx, 2
je 0x42e4ca
test ebx, ebx
je 0x42e46e
movsx edx, word [rsp + 0x42]
xor ecx, ecx
xor eax, eax
xor r8d, r8d
test edx, edx
js 0x42dc53
movsx r12d, word [rsp + 0x40]
shl ecx, 0x10
movzx eax, ax
or eax, ecx
mov ebx, eax
imul edx, r12d
lea r12d, [rdx + r8]
jmp 0x42e037
cmp r13, rbp
je 0x42e49e
lea rbx, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r13
mov rdx, rbx
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], rbp
mov ebx, eax
jne 0x42dc53
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x42dc53
movsx r8d, word [rsp + 0x44]
movsx ecx, word [rsp + 0x40]
mov edx, r8d
mov eax, ecx
sub ecx, r8d
add edx, ebx
cmp ecx, ebx
movzx ebx, word [rsp + 0x46]
cmovg eax, edx
mov edx, ebx
movzx ebx, ax
mov rcx, rsi
shl edx, 0x10
or ebx, edx
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x42dc53
cmp r13, rbp
je 0x42e44e
lea rbx, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r13
mov rdx, rbx
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], rbp
mov ebx, eax
jne 0x42dc53
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x42dc53
movsx edx, word [rsp + 0x46]
mov eax, edx
sub eax, ebx
cmp edx, ebx
mov ebx, 0
jmp 0x42dcd3
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x42df8d
mov eax, r12d
not eax
and ax, word [rsp + 0x48]
or r14d, eax
jmp 0x42df8d
lea r13, [rdx + 1]
and r14d, 0xffffff8f
or r12d, 0x70
cmp r13, rbp
jne 0x42de50
jmp case.0x42de86.38
and r14d, 0xffffff8f
sub eax, 0x28
lea r13, [rdx + 1]
mov ecx, r14d
or ecx, 0x40
test al, 1
cmovne r14d, ecx
mov ecx, r14d
or ecx, 0x20
test al, 2
cmovne r14d, ecx
mov ecx, r14d
or ecx, 0x10
test al, 4
cmovne r14d, ecx
or r12d, 0x70
cmp r13, rbp
jne 0x42de50
jmp case.0x42de86.38
lea r13, [rdx + 1]
or r14d, 7
or r12d, 7
cmp r13, rbp
jne 0x42de50
jmp case.0x42de86.38
and r14d, 0xfffffff8
sub eax, 0x1e
lea r13, [rdx + 1]
mov ecx, r14d
or ecx, 4
test al, 1
cmovne r14d, ecx
mov ecx, r14d
or ecx, 2
test al, 2
cmovne r14d, ecx
mov ecx, r14d
or ecx, 1
test al, 4
cmovne r14d, ecx
or r12d, 7
cmp r13, rbp
jne 0x42de50
jmp case.0x42de86.38
lea r13, [rdx + 1]
and r14w, 0xbfff
or r12w, 0x4000
cmp r13, rbp
jne 0x42de50
jmp case.0x42de86.38
lea r13, [rdx + 1]
and r14b, 0x7f
or r12b, 0x80
cmp r13, rbp
jne 0x42de50
jmp case.0x42de86.38
lea r13, [rdx + 1]
and r14w, 0x7fff
or r12w, 0x8000
cmp r13, rbp
jne 0x42de50
jmp case.0x42de86.38
lea r13, [rdx + 1]
and r14d, 0xfffffff7
or r12d, 8
cmp r13, rbp
jne 0x42de50
jmp case.0x42de86.38
lea r13, [rdx + 1]
or r14w, 0x4000
cmp r13, rbp
jne 0x42de50
jmp case.0x42de86.38
lea r13, [rdx + 1]
or r14b, 0x80
cmp r13, rbp
jne 0x42de50
jmp case.0x42de86.38
lea r13, [rdx + 1]
or r14w, 0x8000
cmp r13, rbp
jne 0x42de50
jmp case.0x42de86.38
lea r13, [rdx + 1]
or r14d, 8
cmp r13, rbp
jne 0x42de50
jmp case.0x42de86.38
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], rbp
mov r13d, eax
mov ebx, 1
jne 0x42dc53
jmp 0x42df00
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x42dc53
movzx ebx, word [rsp + 0x46]
xor r12d, r12d
movsx edx, word [rsp + 0x40]
mov eax, edx
cmp edx, r12d
cmovge eax, r12d
jmp 0x42e161
mov ebx, 1
jmp 0x42dd80
mov r12d, 1
jmp 0x42dbf4
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x42dc53
movzx ebx, word [rsp + 0x46]
movsx edx, word [rsp + 0x44]
movsx r12d, word [rsp + 0x40]
mov eax, edx
sub r12d, edx
jmp 0x42e02d
mov r12d, 1
jmp 0x42dcab
mov ebx, 1
jmp 0x42e1a7
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x42dc53
movsx edx, word [rsp + 0x44]
movsx r8d, word [rsp + 0x40]
movsx r9d, word [rsp + 0x46]
mov eax, edx
sub r8d, edx
movsx edx, word [rsp + 0x50]
mov ecx, r9d
sub edx, r9d
jmp 0x42e0db
mov ebx, 1
jmp 0x42ddf1
mov ebx, 1
jmp 0x42e12c
mov ebx, 1
mov r13d, 1
jmp 0x42df00
movsx r12d, word [rsp + 0x40]
xor eax, eax
jmp 0x42e02d
jmp 0x42dafb
movsx r8d, word [rsp + 0x4c]
movsx edx, word [rsp + 0x50]
movzx eax, word [rsp + 0x4a]
sub edx, r8d
mov ecx, r8d
xor r8d, r8d
add edx, 1
jmp 0x42e0db
movsx eax, word [rsp + 0x4c]
movsx r8d, word [rsp + 0x44]
movsx edx, word [rsp + 0x46]
mov ecx, eax
add r8d, 1
sub edx, eax
xor eax, eax
jmp 0x42e0db