Function at 0x14005901f
Capabilities:
Manipulate console buffer

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0xb0
mov dword [rbp + 0x10], ecx
mov dword [rbp + 0x18], edx
mov dword [rbp + 0x20], r8d
mov dword [rbp + 0x28], r9d
mov rax, qword [0x1401c1ab0]
mov eax, dword [rax]
test eax, eax
jne 0x140059617
mov rax, qword [0x140205850]
movzx eax, byte [rax + 0x12]
test al, al
je 0x140059128
mov dword [rbp - 0x60], 0x18
mov qword [rbp - 0x58], 0
mov dword [rbp - 0x50], 1
lea rax, [rbp - 0x60]
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
mov r9, rax
mov r8d, 3
mov edx, 0xc0000000
lea rax, str.CONOUT_
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_CreateFileA]
call rax
mov qword [rbp - 0x18], rax
lea rax, [rbp - 0x40]
mov rcx, qword [rbp - 0x18]
mov rdx, rax
mov rax, qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
call rax
cmp dword [rbp + 0x18], 0
jne 0x1400590d9
movzx eax, word [rbp - 0x3c]
cwde
add eax, 1
mov dword [rbp + 0x18], eax
cmp dword [rbp + 0x10], 0
jne 0x1400590ea
movzx eax, word [rbp - 0x3a]
cwde
add eax, 1
mov dword [rbp + 0x10], eax
mov eax, dword [rbp + 0x18]
sub eax, 1
mov word [rbp - 0x64], ax
mov eax, dword [rbp + 0x10]
sub eax, 1
mov word [rbp - 0x62], ax
mov ecx, 0xfffffff5
mov rax, qword [sym.imp.KERNEL32.dll_GetStdHandle]
call rax
mov qword [rbp - 0x20], rax
mov edx, dword [rbp - 0x64]
mov rax, qword [rbp - 0x20]
mov rcx, rax
mov rax, qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
call rax
jmp 0x14005961b
mov rax, qword [0x140205850]
movzx eax, word [rax + 0x20]
test ax, ax
je 0x1400591da
mov rax, qword [0x140205850]
movzx eax, word [rax + 0x16]
movzx eax, ax
mov rcx, qword [0x1401f4e20]
mov rdx, qword [0x140205850]
mov edx, dword [rdx + 0x30]
mov edx, edx
shl rdx, 2
add rdx, rcx
mov ecx, dword [rdx]
cdq
idiv ecx
mov dword [0x14073c0ec], eax
mov rdx, qword [0x1401f4e28]
mov rax, qword [0x140205850]
mov eax, dword [rax + 0x30]
mov eax, eax
shl rax, 2
add rax, rdx
mov eax, dword [rax]
test eax, eax
je 0x1400591c4
mov rax, qword [0x140205850]
movzx eax, word [rax + 0x14]
movzx eax, ax
mov rcx, qword [0x1401f4e28]
mov rdx, qword [0x140205850]
mov edx, dword [rdx + 0x30]
mov edx, edx
shl rdx, 2
add rdx, rcx
mov ecx, dword [rdx]
cdq
idiv ecx
mov dword [0x14073c0f0], eax
jmp 0x140059202
mov rax, qword [0x140205850]
movzx eax, word [rax + 0x14]
movzx eax, ax
mov dword [0x14073c0f0], eax
jmp 0x140059202
mov rax, qword [0x140205850]
movzx eax, word [rax + 0x16]
movzx eax, ax
mov dword [0x14073c0ec], eax
mov rax, qword [0x140205850]
movzx eax, word [rax + 0x14]
movzx eax, ax
mov dword [0x14073c0f0], eax
mov eax, dword [rbp + 0x38]
and eax, 1
test eax, eax
je 0x14005934b
mov rax, qword [0x140205850]
movzx eax, word [rax + 0x34]
cwde
cmp dword [rbp + 0x10], eax
jl 0x1400595e9
mov eax, dword [0x14073c0ec]
cmp dword [rbp + 0x10], eax
je 0x14005934c
mov rax, qword [0x140205850]
movzx eax, word [rax + 0x36]
cwde
cmp dword [rbp + 0x10], eax
jle 0x14005934c
mov eax, dword [0x14017456c]
test eax, eax
je 0x1400595ec
mov dword [0x14017456c], 0
cmp dword [rbp + 0x10], 0x32
jg 0x1400595ec
mov eax, dword [rbp + 0x38]
and eax, 2
test eax, eax
je 0x14005928e
cmp dword [rbp + 0x18], 0
jle 0x1400595ef
mov eax, dword [0x14073c0f0]
cmp dword [rbp + 0x18], eax
jg 0x1400595f2
mov ecx, 0xfa0
call sub.msvcrt.dll_malloc
mov qword [rbp - 8], rax
mov rax, qword [0x140205850]
mov eax, dword [rax + 0x24]
mov dword [rbp - 0xc], eax
mov rax, qword [0x140205850]
mov eax, dword [rax + 0x28]
mov dword [rbp - 0x10], eax
mov rax, qword [rbp - 8]
mov r8d, 0xfa0
mov rdx, qword [0x1401c17e0]
add rdx, 0xb8000
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 0
mov r9d, 0
mov r8d, 0x32
mov edx, 0x50
mov ecx, 0
call fcn.14004aed9
mov rax, qword [rbp - 8]
mov r8d, 0xfa0
mov rdx, rax
mov rax, qword [0x1401c17e0]
add rax, 0xb8000
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [0x140205850]
mov edx, dword [rbp - 0xc]
mov dword [rax + 0x24], edx
mov rax, qword [0x140205850]
mov edx, dword [rbp - 0x10]
mov dword [rax + 0x28], edx
mov rax, qword [rbp - 8]
mov rcx, rax
call sub.msvcrt.dll_free
jmp 0x14005934c
nop
mov eax, dword [rbp + 0x38]
and eax, 2
test eax, eax
je 0x14005936f
cmp dword [rbp + 0x18], 0
jle 0x1400595f5
mov eax, dword [0x14073c0f0]
cmp dword [rbp + 0x18], eax
jg 0x1400595f8
mov eax, dword [rbp + 0x38]
and eax, 4
test eax, eax
je 0x14005938d
cmp dword [rbp + 0x20], 0
js 0x1400595fb
cmp dword [rbp + 0x20], 1
jg 0x1400595fe
mov eax, dword [rbp + 0x38]
and eax, 8
test eax, eax
je 0x1400593ab
cmp dword [rbp + 0x28], 0
js 0x140059601
cmp dword [rbp + 0x28], 0x1f
jg 0x140059604
mov eax, dword [rbp + 0x38]
and eax, 0x10
test eax, eax
je 0x1400593c9
cmp dword [rbp + 0x30], 0
js 0x140059607
cmp dword [rbp + 0x30], 0x1f
jg 0x14005960a
mov eax, dword [rbp + 0x38]
and eax, 1
test eax, eax
je 0x1400593ec
mov rax, qword [0x140205850]
mov edx, dword [rbp + 0x10]
mov word [rax + 0x3a], dx
mov rax, qword [0x140205850]
mov byte [rax + 0x5d], 0
mov eax, dword [rbp + 0x38]
and eax, 2
test eax, eax
je 0x14005940f
mov rax, qword [0x140205850]
mov edx, dword [rbp + 0x18]
mov word [rax + 0x38], dx
mov rax, qword [0x140205850]
mov byte [rax + 0x5d], 0
mov eax, dword [rbp + 0x38]
and eax, 3
test eax, eax
jne 0x140059433
mov rax, qword [0x140205850]
movzx eax, byte [rax + 0x5d]
test al, al
je 0x140059433
mov rax, qword [0x140205850]
mov byte [rax + 0x5d], 2
mov eax, dword [rbp + 0x38]
and eax, 4
test eax, eax
je 0x1400594d9
cmp dword [rbp + 0x20], 0
je 0x14005944e
mov dword [rbp + 0x20], 1
mov rax, qword [0x140205850]
mov edx, dword [rbp + 0x20]
mov byte [rax + 0x3c], dl
mov rax, qword [0x140205850]
mov eax, dword [rax + 0x48]
and eax, 2
test eax, eax
je 0x1400594d9
mov dword [0x14073c0f4], 0
jmp 0x1400594c9
mov rdx, qword [0x140205800]
mov eax, dword [0x14073c0f4]
cdqe
shl rax, 2
add rax, rdx
mov eax, dword [rax]
test eax, eax
je 0x1400594ba
mov rcx, qword [0x140205808]
mov eax, dword [0x14073c0f4]
movsxd rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 6
add rax, rcx
mov edx, dword [rbp + 0x20]
mov byte [rax + 0x3c], dl
mov eax, dword [0x14073c0f4]
add eax, 1
mov dword [0x14073c0f4], eax
mov edx, dword [0x14073c0f4]
mov eax, dword [0x140174584]
cmp edx, eax
jl 0x140059478
mov eax, dword [rbp + 0x38]
and eax, 8
test eax, eax
je 0x1400594f2
mov rax, qword [0x140205850]
mov edx, dword [rbp + 0x28]
mov byte [rax + 0x3d], dl
jmp 0x140059503
mov rax, qword [0x140205850]
movzx eax, byte [rax + 0x3d]
movzx eax, al
mov dword [rbp + 0x28], eax
mov eax, dword [rbp + 0x38]
and eax, 0x10
test eax, eax
je 0x14005951c
mov rax, qword [0x140205850]
mov edx, dword [rbp + 0x30]
mov byte [rax + 0x3e], dl
jmp 0x14005952d
mov rax, qword [0x140205850]
movzx eax, byte [rax + 0x3e]
movzx eax, al
mov dword [rbp + 0x30], eax
mov eax, dword [rbp + 0x38]
and eax, 0x18
test eax, eax
je 0x14005961a
mov rax, qword [0x140205850]
mov eax, dword [rax + 0x48]
and eax, 2
test eax, eax
je 0x14005961a
mov dword [0x14073c0f4], 0
jmp 0x1400595d3
mov rdx, qword [0x140205800]
mov eax, dword [0x14073c0f4]
cdqe
shl rax, 2
add rax, rdx
mov eax, dword [rax]
test eax, eax
je 0x1400595c4
mov rcx, qword [0x140205808]
mov eax, dword [0x14073c0f4]
movsxd rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 6
add rax, rcx
mov edx, dword [rbp + 0x28]
mov byte [rax + 0x3d], dl
mov rcx, qword [0x140205808]
mov eax, dword [0x14073c0f4]
movsxd rdx, eax
mov rax, rdx
add rax, rax
add rax, rdx
shl rax, 6
add rax, rcx
mov edx, dword [rbp + 0x30]
mov byte [rax + 0x3e], dl
mov eax, dword [0x14073c0f4]
add eax, 1
mov dword [0x14073c0f4], eax
mov edx, dword [0x14073c0f4]
mov eax, dword [0x140174584]
cmp edx, eax
jl 0x14005955c
jmp 0x14005961a
nop
jmp 0x14005960b
nop
jmp 0x14005960b
nop
jmp 0x14005960b
nop
jmp 0x14005960b
nop
jmp 0x14005960b
nop
jmp 0x14005960b
nop
jmp 0x14005960b
nop
jmp 0x14005960b
nop
jmp 0x14005960b
nop
jmp 0x14005960b
nop
jmp 0x14005960b
nop
mov ecx, 5
call fcn.140041d20
jmp 0x14005961b
nop
jmp 0x14005961b
nop
add rsp, 0xb0
pop rbp
ret