Function at 0x43e330
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 0x43e4bb
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 0x43e4a0
movzx edx, byte [rbp]
test edx, edx
je 0x43e4a0
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 0x43e558
cmp ecx, 0x1b
sete cl
test al, al
je 0x43e4a0
sub eax, 0x40
cmp al, 0x1f
ja 0x43e3a0
test cl, cl
je 0x43e3a0
lea rbx, [r9 + 2]
mov edx, 2
movzx eax, byte [rbx]
test al, al
je 0x43e4b6
mov rdi, rbx
jmp 0x43e403
movzx eax, byte [rdi]
test al, al
je 0x43e4b6
sub eax, 0x40
mov r13, rdi
add rdi, 1
cmp eax, 0x3e
ja 0x43e3f8
movsxd rax, edx
mov r8, rbx
mov rdx, rbp
sub r8, rax
mov rcx, rsi
sub r8, rbp
call fcn.0043e130
movzx eax, byte [r13]
shl eax, 8
or eax, r12d
cmp ax, 0x465b
je 0x43e9bb
jg 0x43e4d0
cmp ax, 0x435b
je 0x43e948
jg 0x43e570
cmp ax, 0x415b
je 0x43e798
cmp ax, 0x425b
jne 0x43e490
cmp r13, rbx
je 0x43eaad
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 0x43eab2
mov rbp, rdi
movzx edx, byte [rbp]
test edx, edx
jne 0x43e398
nop
mov rcx, rbp
call sub.msvcrt.dll_strlen
mov rdx, rbp
mov rcx, rsi
mov r8, rax
call fcn.0043e130
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 0x43e8e0
jg 0x43e5f8
cmp ax, 0x485b
je 0x43e80a
cmp ax, 0x4a5b
je 0x43e729
cmp ax, 0x475b
jne 0x43e490
cmp r13, rbx
je 0x43eb85
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 0x43e490
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x43e490
mov eax, ebp
mov ebx, dword [rsp + 0x44]
sub eax, 1
jns 0x43eba1
xor edx, edx
jmp 0x43ebad
lea r12d, [rcx - 0x40]
mov edx, 1
jmp 0x43e3e3
cmp ax, 0x445b
je 0x43e6bd
cmp ax, 0x455b
jne 0x43e490
cmp r13, rbx
je 0x43eb71
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 0x43e490
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x43e490
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 0x43e493
cmp ax, 0x665b
je 0x43e80a
cmp ax, 0x6d5b
jne 0x43e490
cmp r13, rbx
je 0x43ec9f
lea r15, [rsp + 0x38]
xor r14d, r14d
xor ebp, ebp
lea r12, [0x005347e4]
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 0x43e650
cmp rbx, r13
jne case.0x43e65e.38
cmp eax, 0x31
ja case.0x43e65e.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 0x43e630
cmp r14w, 0xffff
jne 0x43ea6a
test bp, 0x4000
movzx edx, bp
je 0x43e6ac
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 0x43e493
cmp r13, rbx
je 0x43eb7b
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 0x43e490
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x43e490
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 0x43e490
cmp r13, rbx
je 0x43ec32
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 0x43e490
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x43e490
cmp ebx, 1
je 0x43ecd2
cmp ebx, 2
je 0x43ecb8
test ebx, ebx
je 0x43ec48
movsx eax, word [rsp + 0x42]
xor ecx, ecx
xor ebx, ebx
xor edx, edx
jmp 0x43ec67
cmp r13, rbx
je 0x43ec86
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 0x43e490
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x43e490
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 0x43e493
cmp r13, rbx
je 0x43ec90
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 0x43ea91
call sub.msvcrt.dll_strtol
cmp rbp, qword [rsp + 0x38]
mov ebx, eax
jne 0x43e490
lea rcx, [rbp + 1]
mov r8d, 0xa
mov rdx, r15
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], r13
mov ebp, eax
jne 0x43e490
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x43e490
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 0x43e8b1
movsx r8d, word [rsp + 0x42]
mov edx, r8d
cmp eax, r8d
cmovle edx, eax
xor eax, eax
test ecx, ecx
js 0x43e8c6
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 0x43e490
cmp r13, rbx
je 0x43ebc0
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 0x43e490
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x43e490
test ebx, ebx
movzx edx, word [rsp + 0x46]
je 0x43ebdb
cmp ebx, 1
je 0x43eca9
movsx ebp, word [rsp + 0x40]
xor eax, eax
jmp 0x43ebe9
cmp r13, rbx
je 0x43eb67
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 0x43e490
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x43e490
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 0x43e490
cmp r13, rbx
je 0x43eb5d
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 0x43e490
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x43e490
movsx edx, word [rsp + 0x46]
mov eax, edx
sub eax, ebx
cmp edx, ebx
mov ebx, 0
jmp 0x43e5da
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.0x43e65e.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.0x43e65e.2
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x43e684
mov eax, r14d
not eax
and ax, word [rsp + 0x48]
or ebp, eax
jmp 0x43e684
call sub.msvcrt.dll_strtol
cmp qword [rsp + 0x38], r13
mov ebp, 1
mov ebx, eax
jne 0x43e490
jmp 0x43e874
mov ebx, 1
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x43e490
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 0x43e7ed
and bp, 0xbfff
or r14w, 0x4000
jmp case.0x43e65e.2
and bpl, 0x7f
or r14b, 0x80
jmp case.0x43e65e.2
or ebp, 7
or r14d, 7
jmp case.0x43e65e.2
and ebp, 0xffffff8f
or r14d, 0x70
jmp case.0x43e65e.2
and bp, 0x7fff
or r14w, 0x8000
jmp case.0x43e65e.2
and ebp, 0xfffffff7
or r14d, 8
jmp case.0x43e65e.2
or bp, 0x4000
jmp case.0x43e65e.2
or bpl, 0x80
jmp case.0x43e65e.2
or bp, 0x8000
jmp case.0x43e65e.2
or ebp, 8
jmp case.0x43e65e.2
mov ebx, 1
jmp 0x43e9e7
mov ebp, 1
jmp 0x43e974
mov ebp, 1
jmp 0x43e5b0
mov ebp, 1
jmp 0x43e6e9
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x43e490
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 0x43e490
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x43e490
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 0x43e493
lea rdx, [rsp + 0x40]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x43e490
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 0x43e490
movsx ebp, word [rsp + 0x40]
movzx ebx, bx
imul ebp, eax
mov eax, ecx
shl eax, 0x10
add ebp, edx
jmp 0x43ebf1
mov ebx, 1
jmp 0x43e7c4
mov ebp, 1
mov ebx, 1
jmp 0x43e874
mov edx, 7
jmp 0x43e6ac
movsx ebp, word [rsp + 0x44]
xor eax, eax
add ebp, 1
jmp 0x43ebe9
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 0x43ec67
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 0x43ec67