Function at 0x4110d0
Capabilities:
Manipulate console buffer

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
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 0x41125b
mov rcx, rbx
call fcn.004694c0
lea rdx, [rsp + 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x411240
movzx edx, byte [rbp]
test edx, edx
je 0x411240
nop dword [rax + 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
cmp r8d, 0x1f
movzx edx, al
mov r12d, edx
jbe 0x4112f8
cmp ecx, 0x1b
sete cl
test al, al
je 0x411240
sub eax, 0x40
cmp al, 0x1f
ja 0x411140
test cl, cl
je 0x411140
lea rbx, [r9 + 2]
mov edx, 2
movzx eax, byte [rbx]
test al, al
je 0x411256
mov rdi, rbx
jmp 0x4111a3
movzx eax, byte [rdi]
test al, al
je 0x411256
sub eax, 0x40
mov r13, rdi
add rdi, 1
cmp eax, 0x3e
ja 0x411198
movsxd rax, edx
mov r8, rbx
mov rdx, rbp
sub r8, rax
mov rcx, rsi
sub r8, rbp
call fcn.00410ed0
movzx eax, byte [r13]
shl eax, 8
or eax, r12d
cmp ax, 0x465b
je 0x41175b
jg 0x411270
cmp ax, 0x435b
je 0x4116e8
jg 0x411310
cmp ax, 0x415b
je 0x411538
cmp ax, 0x425b
jne 0x411230
cmp r13, rbx
je 0x41184d
lea r15, [rsp + 0x38]
mov rcx, rbx
mov r8d, 0xa
mov rdx, r15
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], r13
mov ebx, eax
je 0x411852
mov rbp, rdi
movzx edx, byte [rbp]
test edx, edx
jne 0x411138
nop
mov rcx, rbp
call sub.msvcrt.dll_strlen
mov rdx, rbp
mov rcx, rsi
mov r8, rax
call fcn.00410ed0
mov eax, 1
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp ax, 0x4b5b
je 0x411680
jg 0x411398
cmp ax, 0x485b
je 0x4115aa
cmp ax, 0x4a5b
je 0x4114c9
cmp ax, 0x475b
jne 0x411230
cmp r13, rbx
je 0x411925
lea r15, [rsp + 0x38]
mov r8d, 0xa
mov rcx, rbx
mov rdx, r15
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], r13
mov ebp, eax
jne 0x411230
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x411230
mov eax, ebp
mov ebx, dword [rsp + 0x44]
sub eax, 1
jns 0x411941
xor edx, edx
jmp 0x41194d
lea r12d, [rcx - 0x40]
mov edx, 1
jmp 0x411183
cmp ax, 0x445b
je 0x41145d
cmp ax, 0x455b
jne 0x411230
cmp r13, rbx
je 0x411911
lea r15, [rsp + 0x38]
mov r8d, 0xa
mov rcx, rbx
mov rdx, r15
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], r13
mov ebp, eax
jne 0x411230
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x411230
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
mov rbp, rdi
shl ebx, 0x10
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x411233
cmp ax, 0x665b
je 0x4115aa
cmp ax, 0x6d5b
jne 0x411230
cmp r13, rbx
je 0x411a3f
lea r15, [rsp + 0x38]
xor r14d, r14d
xor ebp, ebp
lea r12, [0x00485504]
nop word cs:[rax + rax]
mov rcx, rbx
mov r8d, 0xa
mov rdx, r15
call sub.msvcrt.dll_strtol
mov rbx, qword [rsp + 0x38]
cmp byte [rbx], 0x3b
je 0x4113f0
cmp rbx, r13
jne case.0x4113fe.38
cmp eax, 0x31
ja case.0x4113fe.2
mov edx, eax
movsxd rdx, dword [r12 + rdx*4]
add rdx, r12
jmp rdx
or ebp, 7
mov r14d, 0xffffffff
nop dword [rax]
add rbx, 1
cmp rbx, r13
jne 0x4113d0
cmp r14w, 0xffff
jne 0x41180a
test bp, 0x4000
movzx edx, bp
je 0x41144c
mov edx, ebp
mov eax, ebp
shl ebp, 4
shr dx, 4
xor al, al
and edx, 0xf
or edx, eax
movzx eax, bpl
or edx, eax
and edx, 0xbfff
mov rcx, rsi
mov rbp, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
jmp 0x411233
cmp r13, rbx
je 0x41191b
lea r15, [rsp + 0x38]
mov r8d, 0xa
mov rcx, rbx
mov rdx, r15
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], r13
mov ebp, eax
jne 0x411230
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x411230
movsx edx, word [rsp + 0x44]
mov rcx, rsi
mov ebx, dword [rsp + 0x44]
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 0x411230
cmp r13, rbx
je 0x4119d2
lea r15, [rsp + 0x38]
mov rcx, rbx
mov r8d, 0xa
mov rdx, r15
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], r13
mov ebx, eax
jne 0x411230
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x411230
cmp ebx, 1
je 0x411a72
cmp ebx, 2
je 0x411a58
test ebx, ebx
je 0x4119e8
movsx eax, word [rsp + 0x42]
xor ecx, ecx
xor ebx, ebx
xor edx, edx
jmp 0x411a07
cmp r13, rbx
je 0x411a26
lea r15, [rsp + 0x38]
mov rcx, rbx
mov r8d, 0xa
mov rdx, r15
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], r13
mov ebx, eax
jne 0x411230
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x411230
movsx edx, word [rsp + 0x46]
mov eax, edx
sub eax, ebx
cmp edx, ebx
mov edx, 0
cmovle eax, edx
movzx ebx, word [rsp + 0x44]
shl eax, 0x10
mov rcx, rsi
mov rbp, rdi
or ebx, eax
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x411233
cmp r13, rbx
je 0x411a30
mov r8, r13
mov edx, 0x3b
mov rcx, rbx
lea r15, [rsp + 0x38]
sub r8, rbx
call sub.msvcrt.dll_memchr
mov r8d, 0xa
mov rdx, r15
mov rcx, rbx
test rax, rax
mov rbp, rax
je 0x411831
call sub.msvcrt.dll_strtol
cmp rbp, qword [rsp + 0x38]
mov ebx, eax
jne 0x411230
lea rcx, [rbp + 1]
mov r8d, 0xa
mov rdx, r15
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], r13
mov ebp, eax
jne 0x411230
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x411230
movsx eax, word [rsp + 0x4c]
movsx edx, word [rsp + 0x4a]
lea eax, [rbx + rax - 1]
lea ecx, [rbp + rdx - 1]
xor edx, edx
test eax, eax
js 0x411651
movsx r8d, word [rsp + 0x42]
mov edx, r8d
cmp eax, r8d
cmovle edx, eax
xor eax, eax
test ecx, ecx
js 0x411666
movsx r8d, word [rsp + 0x40]
mov eax, r8d
cmp ecx, r8d
cmovle eax, ecx
shl edx, 0x10
movzx eax, ax
mov ebx, edx
mov rcx, rsi
or ebx, eax
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x411230
cmp r13, rbx
je 0x411960
lea r15, [rsp + 0x38]
mov rcx, rbx
mov r8d, 0xa
mov rdx, r15
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], r13
mov ebx, eax
jne 0x411230
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x411230
test ebx, ebx
movzx edx, word [rsp + 0x46]
je 0x41197b
cmp ebx, 1
je 0x411a49
movsx ebp, word [rsp + 0x40]
xor eax, eax
jmp 0x411989
cmp r13, rbx
je 0x411907
lea r15, [rsp + 0x38]
mov r8d, 0xa
mov rcx, rbx
mov rdx, r15
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], r13
mov ebp, eax
jne 0x411230
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x411230
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 0x411230
cmp r13, rbx
je 0x4118fd
lea r15, [rsp + 0x38]
mov rcx, rbx
mov r8d, 0xa
mov rdx, r15
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], r13
mov ebx, eax
jne 0x411230
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x411230
movsx edx, word [rsp + 0x46]
mov eax, edx
sub eax, ebx
cmp edx, ebx
mov ebx, 0
jmp 0x41137a
mov edx, eax
and ebp, 0xffffff8f
and edx, 1
shl edx, 6
or ebp, edx
mov edx, ebp
or edx, 0x20
test al, 2
cmovne ebp, edx
mov edx, ebp
or edx, 0x10
test al, 4
cmovne ebp, edx
or r14d, 0x70
jmp case.0x4113fe.2
lea ecx, [rax - 0x1e]
mov edx, eax
and ebp, 0xfffffff8
and edx, 1
shl edx, 2
or ebp, edx
mov edx, ebp
or edx, 2
test al, 2
cmove ebp, edx
mov eax, ebp
or eax, 1
and ecx, 4
cmovne ebp, eax
or r14d, 7
jmp case.0x4113fe.2
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x411424
mov eax, r14d
not eax
and ax, word [rsp + 0x48]
or ebp, eax
jmp 0x411424
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], r13
mov ebp, 1
mov ebx, eax
jne 0x411230
jmp 0x411614
mov ebx, 1
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x411230
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
jmp 0x41158d
and bp, 0xbfff
or r14w, 0x4000
jmp case.0x4113fe.2
and bpl, 0x7f
or r14b, 0x80
jmp case.0x4113fe.2
or ebp, 7
or r14d, 7
jmp case.0x4113fe.2
and ebp, 0xffffff8f
or r14d, 0x70
jmp case.0x4113fe.2
and bp, 0x7fff
or r14w, 0x8000
jmp case.0x4113fe.2
and ebp, 0xfffffff7
or r14d, 8
jmp case.0x4113fe.2
or bp, 0x4000
jmp case.0x4113fe.2
or bpl, 0x80
jmp case.0x4113fe.2
or bp, 0x8000
jmp case.0x4113fe.2
or ebp, 8
jmp case.0x4113fe.2
mov ebx, 1
jmp 0x411787
mov ebp, 1
jmp 0x411714
mov ebp, 1
jmp 0x411350
mov ebp, 1
jmp 0x411489
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x411230
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 0x411230
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x411230
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
mov ebx, edx
or ebx, eax
mov r8d, ebp
mov edx, 0x20
lea r12, [rsp + 0x34]
mov r9d, ebx
mov rcx, rsi
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
mov r8d, ebp
movzx edx, word [rsp + 0x48]
mov r9d, ebx
mov qword [rsp + 0x20], r12
mov rcx, rsi
mov rbp, rdi
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
jmp 0x411233
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x411230
movsx eax, word [rsp + 0x44]
movsx edx, word [rsp + 0x40]
movsx r8d, word [rsp + 0x46]
mov ebx, eax
sub edx, eax
movsx eax, word [rsp + 0x50]
mov ecx, r8d
sub eax, r8d
test eax, eax
js 0x411230
movsx ebp, word [rsp + 0x40]
movzx ebx, bx
imul ebp, eax
mov eax, ecx
shl eax, 0x10
add ebp, edx
jmp 0x411991
mov ebx, 1
jmp 0x411564
mov ebp, 1
mov ebx, 1
jmp 0x411614
mov edx, 7
jmp 0x41144c
movsx ebp, word [rsp + 0x44]
xor eax, eax
add ebp, 1
jmp 0x411989
movsx edx, word [rsp + 0x4c]
movsx eax, word [rsp + 0x50]
movzx ebx, word [rsp + 0x4a]
mov ecx, edx
sub eax, edx
xor edx, edx
add eax, 1
jmp 0x411a07
movsx r8d, word [rsp + 0x4c]
xor ebx, ebx
movsx edx, word [rsp + 0x44]
movsx eax, word [rsp + 0x46]
mov ecx, r8d
add edx, 1
sub eax, r8d
jmp 0x411a07