Function at 0x14001297d
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 r12, rdx
mov r14, rcx
mov rcx, rdx
call qword [sym.imp.msvcrt.dll__fileno]
mov ecx, eax
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov r13, rax
mov eax, 0xffffffff
cmp r13, 0xffffffffffffffff
je 0x140012b2b
mov rcx, r12
call fcn.1400771e7
lea rdx, [rsp + 0x30]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x140012b10
movzx edx, byte [r14]
lea rbx, [0x14009d94c]
test edx, edx
je 0x140012b10
nop word [rax + rax]
mov r12, r14
nop dword [rax + rax]
lea eax, [rdx - 0x80]
mov r8, r12
add r12, 1
cmp eax, 0x1f
jbe 0x140012db8
movzx esi, byte [r12]
cmp edx, 0x1b
sete cl
mov eax, esi
mov edx, esi
test esi, esi
je 0x140012b10
sub eax, 0x40
cmp al, 0x1f
ja 0x1400129f5
test cl, cl
je 0x1400129f5
movzx eax, byte [r8 + 2]
lea r12, [r8 + 2]
mov edx, 2
test al, al
je 0x140012dd8
mov rdi, r12
jmp 0x140012a63
movzx eax, byte [rdi]
test al, al
je 0x140012dd8
sub eax, 0x40
mov rbp, rdi
add rdi, 1
cmp eax, 0x3e
ja 0x140012a58
mov r8, r12
mov rcx, r13
movzx esi, sil
sub r8, rdx
mov rdx, r14
sub r8, r14
call fcn.140012718
movzx eax, byte [rbp]
shl eax, 8
or esi, eax
cmp si, 0x465b
je 0x14001301e
jg 0x140012bd8
cmp si, 0x435b
je 0x140012fa8
jle 0x140012b40
cmp si, 0x445b
je 0x140012f30
cmp si, 0x455b
jne 0x140012b00
cmp rbp, r12
je 0x140013192
lea r15, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r12
mov rdx, r15
call sub.msvcrt.dll_strtol
mov esi, eax
cmp qword [rsp + 0x38], rbp
je 0x140013197
nop dword [rax + rax]
mov r14, rdi
movzx edx, byte [r14]
test edx, edx
jne 0x1400129ed
nop
mov rcx, r14
call sub.msvcrt.dll_strlen
mov rdx, r14
mov rcx, r13
mov r8, rax
call fcn.140012718
mov eax, 1
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp si, 0x415b
je 0x140013090
cmp si, 0x425b
jne 0x140012b00
cmp rbp, r12
je 0x140013334
lea r15, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r12
mov rdx, r15
call sub.msvcrt.dll_strtol
mov esi, eax
cmp qword [rsp + 0x38], rbp
jne 0x140012b00
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140012b00
movsx r8d, word [rsp + 0x46]
movsx ecx, word [rsp + 0x42]
mov edx, r8d
mov eax, ecx
sub ecx, r8d
add edx, esi
cmp ecx, esi
cmovg eax, edx
movzx r12d, word [rsp + 0x44]
shl eax, 0x10
mov rcx, r13
mov r14, rdi
or r12d, eax
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140012b03
cmp si, 0x4b5b
je 0x140012ec8
jle 0x140012cc4
cmp si, 0x665b
je 0x140012de8
cmp si, 0x6d5b
jne 0x140012b00
cmp rbp, r12
je 0x140013390
xor esi, esi
xor r14d, r14d
lea r15, [rsp + 0x38]
nop word [rax + rax]
mov rcx, r12
mov r8d, 0xa
mov rdx, r15
call sub.msvcrt.dll_strtol
mov r12, qword [rsp + 0x38]
cmp byte [r12], 0x3b
je 0x140012c42
cmp r12, rbp
jne 0x140012c71
cmp eax, 0x31
ja case.default.0x140012c54
mov edx, eax
movsxd rdx, dword [rbx + rdx*4]
add rdx, rbx
jmp rdx
add r12, 1
cmp r12, rbp
jne 0x140012c18
cmp si, 0xffff
jne 0x14001314e
movzx edx, r14w
test r14w, 0x4000
je 0x140012cac
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, r13
mov r14, rdi
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
jmp 0x140012b03
cmp si, 0x485b
je 0x140012de8
cmp si, 0x4a5b
jne 0x140012d50
cmp rbp, r12
je 0x1400132db
lea r15, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r12
mov rdx, r15
call sub.msvcrt.dll_strtol
mov esi, eax
cmp qword [rsp + 0x38], rbp
jne 0x140012b00
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140012b00
cmp esi, 1
je 0x1400133d7
cmp esi, 2
je 0x1400133b9
test esi, esi
je 0x1400132f1
movsx eax, word [rsp + 0x42]
xor ecx, ecx
xor r12d, r12d
xor edx, edx
jmp 0x140013311
cmp si, 0x475b
jne 0x140012b00
cmp rbp, r12
je 0x14001333e
lea r15, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r12
mov rdx, r15
call sub.msvcrt.dll_strtol
mov esi, eax
cmp qword [rsp + 0x38], rbp
jne 0x140012b00
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140012b00
mov eax, esi
mov r12d, dword [rsp + 0x44]
sub eax, 1
jns 0x14001335b
xor edx, edx
jmp 0x140013367
sub edx, 0x40
mov esi, edx
je 0x140012b10
movzx eax, byte [r12]
mov edx, 1
test al, al
jne 0x140012a48
nop dword [rax]
mov eax, 1
jmp 0x140012b2b
cmp rbp, r12
je 0x14001339a
mov r8, rbp
mov edx, 0x3b
lea r15, [rsp + 0x38]
mov rcx, r12
sub r8, r12
call sub.msvcrt.dll_memchr
mov r8d, 0xa
mov rdx, r15
mov rcx, r12
mov rsi, rax
test rax, rax
je 0x140013175
call sub.msvcrt.dll_strtol
mov r12d, eax
cmp rsi, qword [rsp + 0x38]
jne 0x140012b00
lea rcx, [rsi + 1]
mov r8d, 0xa
mov rdx, r15
call sub.msvcrt.dll_strtol
mov esi, eax
cmp qword [rsp + 0x38], rbp
jne 0x140012b00
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140012b00
movsx eax, word [rsp + 0x4c]
lea edx, [r12 + rax - 1]
movsx eax, word [rsp + 0x4a]
lea ecx, [rsi + rax - 1]
xor eax, eax
test edx, edx
js 0x140012e95
movsx r8d, word [rsp + 0x42]
mov eax, r8d
cmp edx, r8d
cmovle eax, edx
xor edx, edx
test ecx, ecx
js 0x140012eae
movsx r8d, word [rsp + 0x40]
mov edx, r8d
cmp ecx, r8d
cmovle edx, ecx
shl eax, 0x10
movzx edx, dx
mov rcx, r13
or edx, eax
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140012b00
cmp rbp, r12
je 0x14001325e
lea r15, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r12
mov rdx, r15
call sub.msvcrt.dll_strtol
mov esi, eax
cmp qword [rsp + 0x38], rbp
jne 0x140012b00
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140012b00
movzx edx, word [rsp + 0x46]
test esi, esi
je 0x140013279
cmp esi, 1
je 0x1400133aa
movsx esi, word [rsp + 0x40]
xor eax, eax
jmp 0x140013287
cmp rbp, r12
je 0x1400132d1
lea r15, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r12
mov rdx, r15
call sub.msvcrt.dll_strtol
mov esi, eax
cmp qword [rsp + 0x38], rbp
jne 0x140012b00
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140012b00
movsx edx, word [rsp + 0x44]
mov r12d, dword [rsp + 0x44]
mov rcx, r13
mov eax, edx
sub eax, esi
cmp edx, esi
mov edx, 0
cmovle eax, edx
mov r12w, ax
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140012b00
cmp rbp, r12
je 0x140013254
lea r15, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r12
mov rdx, r15
call sub.msvcrt.dll_strtol
mov esi, eax
cmp qword [rsp + 0x38], rbp
jne 0x140012b00
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140012b00
movsx r8d, word [rsp + 0x44]
movsx ecx, word [rsp + 0x40]
mov r12d, dword [rsp + 0x44]
mov edx, r8d
mov eax, ecx
sub ecx, r8d
add edx, esi
cmp ecx, esi
mov rcx, r13
cmovg eax, edx
mov r12w, ax
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140012b00
cmp rbp, r12
je 0x140013386
lea r15, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r12
mov rdx, r15
call sub.msvcrt.dll_strtol
mov esi, eax
cmp qword [rsp + 0x38], rbp
jne 0x140012b00
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140012b00
movsx edx, word [rsp + 0x46]
mov rcx, r13
mov eax, edx
sub eax, esi
mov r12d, eax
xor eax, eax
cmp edx, esi
cmovle r12d, eax
shl r12d, 0x10
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140012b00
cmp rbp, r12
je 0x14001337c
lea r15, [rsp + 0x38]
mov r8d, 0xa
mov rcx, r12
mov rdx, r15
call sub.msvcrt.dll_strtol
mov esi, eax
cmp qword [rsp + 0x38], rbp
jne 0x140012b00
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140012b00
movsx edx, word [rsp + 0x46]
mov eax, edx
sub eax, esi
cmp edx, esi
mov edx, 0
cmovle eax, edx
jmp 0x140012bb2
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140012c7b
mov eax, esi
not eax
and ax, word [rsp + 0x48]
or r14d, eax
jmp 0x140012c7b
call sub.msvcrt.dll_strtol
mov esi, 1
mov r12d, eax
cmp qword [rsp + 0x38], rbp
jne 0x140012b00
jmp 0x140012e53
mov esi, 1
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140012b00
movsx ecx, word [rsp + 0x46]
movsx edx, word [rsp + 0x42]
mov eax, ecx
mov r12d, edx
sub edx, ecx
mov rcx, r13
add eax, esi
cmp edx, esi
cmovg r12d, eax
shl r12d, 0x10
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140012b00
mov esi, 1
jmp 0x140012fd4
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140012b00
movzx edx, word [rsp + 0x46]
movsx ecx, word [rsp + 0x44]
movsx esi, word [rsp + 0x40]
mov eax, ecx
sub esi, ecx
shl edx, 0x10
movzx eax, ax
or eax, edx
mov r12d, eax
lea rbp, [rsp + 0x34]
mov r9d, r12d
mov r8d, esi
mov edx, 0x20
mov rcx, r13
mov qword [rsp + 0x20], rbp
mov r14, rdi
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
mov qword [rsp + 0x20], rbp
mov r9d, r12d
mov r8d, esi
movzx edx, word [rsp + 0x48]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
jmp 0x140012b03
mov esi, 1
jmp 0x140012f5c
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140012b00
movsx eax, word [rsp + 0x44]
movsx edx, word [rsp + 0x40]
movsx r8d, word [rsp + 0x46]
mov r12d, eax
sub edx, eax
movsx eax, word [rsp + 0x50]
mov ecx, r8d
sub eax, r8d
test eax, eax
js 0x140012b00
movsx esi, word [rsp + 0x40]
movzx r12d, r12w
imul esi, eax
mov eax, ecx
shl eax, 0x10
or r12d, eax
add esi, edx
jmp 0x140013292
mov esi, 1
jmp 0x140012b82
lea rdx, [rsp + 0x40]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x140012b00
mov r12d, dword [rsp + 0x44]
xor eax, eax
movsx ecx, word [rsp + 0x40]
mov edx, ecx
cmp ecx, eax
cmovge edx, eax
mov r12w, dx
mov rcx, r13
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp 0x140012b00
mov esi, 1
jmp 0x1400130bc
mov esi, 1
jmp 0x14001304a
mov edx, 7
jmp 0x140012cac
mov esi, 1
mov r12d, 1
jmp 0x140012e53
movsx esi, word [rsp + 0x44]
xor eax, eax
add esi, 1
jmp 0x140013287
movsx edx, word [rsp + 0x4c]
movsx eax, word [rsp + 0x50]
movzx r12d, word [rsp + 0x4a]
sub eax, edx
mov ecx, edx
xor edx, edx
add eax, 1
jmp 0x140013311
movsx r8d, word [rsp + 0x4c]
movsx edx, word [rsp + 0x44]
xor r12d, r12d
movsx eax, word [rsp + 0x46]
mov ecx, r8d
add edx, 1
sub eax, r8d
jmp 0x140013311
add byte [rax], al
movdqu xmm2, xmmword [rdx + 0x80]
movups xmmword [rcx + 0x470], xmm2
add al, 0
add bl, dh
movq mm3, qword [rdx + 0x90]
add byte [rax], al
add al, 0
add bl, dh
movq mm3, qword [rdx + 0x90]
add byte [rax], al
add byte [rax], al
movups xmmword [rcx + 0x480], xmm3
movdqu xmm4, xmmword [rdx + 0xa0]
movups xmmword [rcx + 0x490], xmm4
movdqu xmm5, xmmword [rdx + 0xb0]
movups xmmword [rcx + 0x4a0], xmm5
mov rax, qword [rdx + 0xc0]
mov rdx, qword [rdx + 0xc8]
mov qword [rcx + 0x4b0], rax
mov qword [rcx + 0x4b8], rdx
ret
jne 0x140024fff
jmp 0x140025173
mov rdi, r13
test rbx, rbx
je 0x140025173
mov r14, qword [rbx + 8]
mov rdx, rsi
mov r13, rbx
mov rcx, r14
call sub.msvcrt.dll_strcmp
mov rbx, qword [rbx]
mov ebx, dword [rbx]
mov ebx, dword [rbx]
test eax, eax
jne 0x140024ff3
test rdi, rdi
je 0x14002519e
mov qword [rdi], rbx
mov rdx, r14
mov rcx, r12
call fcn.14002fcb5
mov r14, rax
test rax, rax
je 0x140025158
mov rax, qword [r12 + 0x468]
test rax, rax
je 0x140025055
mov rcx, r12
call rax
test byte [r14 + 0x13], 4
je 0x140025095
mov rax, qword [r12 + 0x418]
test rax, rax
je 0x14002507e
mov edx, dword [r12 + 0x30]
mov r8, r14
mov rcx, r12
call rax
cmp byte [r12 + 0x4fb], 0
jne 0x140025245
mov rcx, r14
call fcn.1400395ec
movzx eax, byte [r13 + 0x1c]
test al, 4
jne 0x140025158
test al, 8
jne 0x140025184
mov r15, qword [r13 + 0x10]
lea rdx, [0x1400a4834]
mov rcx, r15
call sub.msvcrt.dll_strcspn
mov rdx, r15
mov rcx, r12
movsxd r14, eax
mov r8d, r14d
call fcn.14002d682
add r14, qword [r13 + 0x10]
mov edx, 0xa
or al, byte [rax]
add byte [rax], al
or al, byte [rax]
add byte [rax], al
mov rcx, r14
mov rbx, rax
call sub.msvcrt.dll_strchr
and byte [0x141bb91e5], al
add byte [rax], al
add byte [rcx + rcx*4 - 0xe], cl
and byte [0x141bb91e5], al
add byte [rax], al
add byte [rcx + rcx*4 - 0xe], cl
mov rcx, r12
sub rax, r14
mov r8, rax
call fcn.140024c30
mov rsi, rax
invalid
test rax, rax
je 0x140025258
invalid
mov rcx, r12
call fcn.14002f24a
mov byte [rsi + 0x69], 1
mov rdx, rbx
mov rcx, r12
call fcn.14003c213
div dword [rax + 1]
add byte [rax + rax*8 + 0x14c840f], al
add byte [rax], al
div dword [rax + 1]
add byte [rax + rax*8 + 0x14c840f], al
add byte [rax], al
mov rcx, r12
call fcn.140024d70
mov rcx, qword [rbx + 0x18]
sbb byte [rcx - 0x75], al
sbb byte [r9 + 0xf], r8b
mov dh, 0x55
sbb al, 0x89
or byte [r9 + 0x1e283d0], cl
sbb byte [rcx - 0x75], al
sbb byte [r9 + 0xf], r8b
mov dh, 0x55
sbb al, 0x89
or byte [r9 + 0x1e283d0], cl
shl eax, 4
shl edx, 4
add al, 0xc1
loop 0x14002514b
and eax, 0x20
or eax, edx
movzx edx, byte [rcx + 0x14]
and edx, 0xffffffcf
ror byte [rdi], 1
mov dh, 0x51
adc al, 0x83
loop 0x140025122
or eax, edx
mov byte [rcx + 0x14], al
mov rcx, qword [r13 + 0x10]
call fcn.1400771af
mov rcx, qword [r13 + 8]
call fcn.1400771af
mov rcx, r13
call fcn.1400771af
nop
lea rsp, [rbp + 8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rdx, r13
mov rcx, r12
call fcn.14002de27
jmp 0x140025158
mov qword [r12 + 0x638], rbx
jmp 0x140025028
xor r8d, r8d
mov rdx, r14
mov rcx, r12
call fcn.140038b05
jmp 0x14002508d
lea r8, str.cpp_pop_definition
mov edx, 0x9e6
lea rcx, str..._.._libcpp_directives.c
call fcn.14008dd67
lea r8, str.cpp_pop_definition
mov edx, 0x9e2
lea rcx, str..._.._libcpp_directives.c
call fcn.14008dd67
nop
nop