Function at 0x14004cdd0
Capabilities:
Manipulate console buffer

Disassembly:
push rbp
push r15
lea rbp, [rsp - 0xfe8]
mov eax, 0x10e8
call fcn.14007bbc0
sub rsp, rax
mov rax, qword [0x1400ad368]
xor rax, rsp
mov qword [rbp + 0xfb0], rax
cmp qword [rcx + 0x4060], 0
mov r15, rcx
mov qword [rbp - 0x78], rdx
je 0x14004d58b
mov qword [rsp + 0x1110], rbx
xor al, al
mov qword [rsp + 0x10d0], r12
mov r12d, 0x2a
mov qword [rsp + 0x10c8], r13
mov byte [rsp + 0x30], al
mov dword [rsp + 0x3c], 0xc002a
lea r13d, [r12 - 0x1e]
call fcn.14004e310
mov rcx, qword [r15 + 8]
lea rdx, [r15 + 0x402c]
mov ebx, dword [r15 + 0x4030]
xor eax, eax
mov dword [rsp + 0x34], eax
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
mov eax, dword [r15 + 0x4030]
movzx r9d, word [r15 + 0x4036]
movzx r10d, word [r15 + 0x4038]
movzx ecx, word [r15 + 0x403c]
mov dword [r15 + 0x404c], eax
sub cx, r10w
movzx eax, word [r15 + 0x403a]
inc cx
sub ax, r9w
mov dword [r15 + 0x4030], ebx
inc ax
cmp cx, 2
jl 0x14004d573
cmp ax, 2
jl 0x14004d573
mov qword [rsp + 0x10e0], rsi
movzx edx, r13w
mov qword [rsp + 0x10d8], rdi
mov qword [rsp + 0x10c0], r14
cmp r13w, cx
jle 0x14004cee8
movzx r13d, cx
mov word [rsp + 0x3e], cx
movzx edx, cx
movzx r8d, r12w
cmp r12w, ax
jle 0x14004ceff
movzx r12d, ax
mov word [rsp + 0x3c], ax
movzx r8d, ax
mov ebx, dword [rsp + 0x34]
mov edi, dword [rsp + 0x3c]
cwde
movsx ecx, cx
movzx r14d, dx
sub ecx, r14d
movzx esi, r8w
sub eax, esi
sar ecx, 1
sar eax, 1
add cx, r10w
add ax, r9w
mov word [rsp + 0x4a], cx
mov word [rsp + 0x48], ax
dec cx
add dx, cx
dec ax
mov rcx, qword [r15 + 8]
add ax, r8w
mov word [rsp + 0x4c], ax
mov r9d, ebx
lea rax, [rsp + 0x48]
mov word [rsp + 0x4e], dx
mov r8d, edi
mov qword [rsp + 0x20], rax
lea rdx, [rbp + 0x770]
call qword [sym.imp.KERNEL32.dll_ReadConsoleOutputW]
imul r14d, esi
mov r8d, r14d
shl r8, 2
test r8, r8
je 0x14004cf8e
lea rdx, [rbp + 0x770]
lea rcx, [rbp - 0x70]
call fcn.140053490
xor eax, eax
movzx r9d, ax
jmp 0x14004cf93
xor eax, eax
mov r9d, eax
movzx edx, ax
test r12w, r12w
jle 0x14004cfd1
movsx r8d, r9w
movsx eax, r12w
imul r8d, eax
nop dword [rax + rax]
movsx eax, dx
inc dx
add eax, r8d
movsxd rcx, eax
movzx eax, word [r15 + 0x4088]
mov word [rbp + rcx*4 - 0x6e], ax
cmp dx, r12w
jl 0x14004cfb0
xor eax, eax
inc r9w
cmp r9w, r13w
jl 0x14004cf93
mov ecx, 0x2510
movsx r14d, r12w
mov eax, 0x250c
mov dword [rsp + 0x50], r14d
mov word [rbp - 0x70], ax
mov edx, 0x2514
movsx rax, r12w
mov r11d, 1
lea r10d, [rdx - 0x14]
mov word [rbp + rax*4 - 0x74], cx
movsx ecx, r13w
mov dword [rsp + 0x40], ecx
lea esi, [rcx - 1]
mov r8d, esi
imul r8d, r14d
movsxd rax, r8d
mov word [rbp + rax*4 - 0x70], dx
mov eax, ecx
imul eax, r14d
movsxd rcx, eax
mov eax, 0x2518
mov word [rbp + rcx*4 - 0x74], ax
movzx ecx, r11w
cmp r12w, 2
jle 0x14004d064
lea edx, [r14 - 1]
nop word [rax + rax]
movsx rax, cx
inc cx
mov word [rbp + rax*4 - 0x70], r10w
movsx eax, cx
cmp edx, eax
jg 0x14004d050
movzx edx, r11w
cmp r12w, 2
jle 0x14004d097
mov eax, r11d
lea r9d, [r14 - 1]
nop word [rax + rax]
add eax, r8d
inc dx
movsxd rcx, eax
movsx eax, dx
mov word [rbp + rcx*4 - 0x70], r10w
cmp r9d, eax
jg 0x14004d080
movzx ecx, r11w
mov r8d, 0x2502
cmp r13w, 2
jle 0x14004d0c6
mov eax, r11d
nop dword [rax + rax]
imul eax, r14d
inc cx
cdqe
mov word [rbp + rax*4 - 0x70], r8w
movsx eax, cx
cmp esi, eax
jg 0x14004d0b0
movzx edx, r11w
cmp r13w, 2
jle 0x14004d0f9
mov eax, r11d
nop dword [rax]
nop dword [rax + rax]
inc eax
inc dx
imul eax, r14d
movsxd rcx, eax
movsx eax, dx
mov word [rbp + rcx*4 - 0x74], r8w
cmp esi, eax
jg 0x14004d0e0
mov r8d, 0x20
cmp r13w, 2
jle 0x14004d148
lea r10d, [r14 - 1]
mov ebx, r11d
mov r9d, r11d
movzx edx, bx
cmp r10d, ebx
jle 0x14004d137
imul r9d, r14d
mov eax, ebx
nop
add eax, r9d
inc dx
movsxd rcx, eax
movsx eax, dx
mov word [rbp + rcx*4 - 0x70], r8w
cmp r10d, eax
jg 0x14004d120
inc r11w
movsx r9d, r11w
cmp esi, r9d
jg 0x14004d110
mov ebx, dword [rsp + 0x34]
mov rcx, qword [r15 + 8]
lea rax, [rsp + 0x48]
mov r9d, ebx
mov qword [rsp + 0x20], rax
mov r8d, edi
lea rdx, [rbp - 0x70]
call qword [sym.imp.KERNEL32.dll_WriteConsoleOutputW]
movsxd rcx, dword [r15 + 0x4078]
movzx eax, word [rsp + 0x48]
mov rdx, qword [r15 + 0x4060]
inc ax
mov esi, dword [rsp + 0x40]
cmp rdx, rcx
lea r13d, [rcx - 1]
mov word [rsp + 0x34], ax
cmovne r13d, ecx
sub edx, esi
mov ecx, r13d
sub ecx, esi
add ecx, 3
lea eax, [rdx + 2]
cmp eax, r13d
cmovle ecx, eax
xor r12d, r12d
test ecx, ecx
mov edi, r12d
movzx ebx, r12w
cmovg edi, ecx
movabs rcx, 0x5000000000001
mov dword [rsp + 0x38], edi
lea r14d, [r12 + 0xd]
lea eax, [rbx - 0x1b]
cmp ax, 0x32
ja 0x14004d1db
movzx eax, ax
bt rcx, rax
jb 0x14004d49d
movsx eax, word [rsp + 0x4a]
mov r14d, edi
lea edx, [rax + 1]
lea ecx, [rax - 1]
mov word [rsp + 0x36], dx
add ecx, esi
movsx eax, dx
cmp ecx, eax
jle 0x14004d362
movsxd rax, edi
lea r12, [rax*8]
nop word [rax + rax]
movsxd rax, r14d
cmp qword [r15 + 0x4060], rax
jle 0x14004d35b
movsxd rsi, dword [rsp + 0x50]
lea rax, [rsp + 0x54]
mov ebx, dword [rsp + 0x34]
mov edx, 0x20
mov rcx, qword [r15 + 8]
mov r9d, ebx
mov qword [rsp + 0x20], rax
lea r8d, [rsi - 2]
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
cmp r14d, r13d
jne 0x14004d263
mov eax, dword [r15 + 0x4088]
mov ecx, eax
shr ecx, 4
shl ax, 4
or cx, ax
jmp 0x14004d26b
movzx ecx, word [r15 + 0x4088]
lea rax, [rsp + 0x54]
movzx edx, cx
mov rcx, qword [r15 + 8]
lea r8d, [rsi - 2]
mov r9d, ebx
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
dec rsi
lea r8, str._d:
mov rdx, rsi
lea rcx, [rbp + 0xf50]
mov r9d, r14d
call fcn.140048080
mov rax, qword [r15 + 0x4058]
mov rbx, 0xffffffffffffffff
mov r8, qword [r12 + rax]
lea rax, [rbp + 0xf50]
nop
inc rbx
cmp word [rax + rbx*2], 0
jne 0x14004d2c0
lea rax, [rbx + 1]
cmp rax, rsi
jae 0x14004d301
lfence
sub rsi, rbx
lea rcx, [rbp + 0xf50]
lea rcx, [rcx + rbx*2]
mov rdx, rsi
lea rdi, [rsi - 1]
mov r9, rdi
call fcn.14005a91c
lea rax, [rbx + rdi]
xor ecx, ecx
mov word [rbp + rax*2 + 0xf50], cx
lea rax, [rbp + 0xf50]
mov r8, 0xffffffffffffffff
nop
inc r8
cmp word [rax + r8*2], 0
jne 0x14004d310
lea r9, [rsp + 0x34]
mov rcx, r15
lea rdx, [rbp + 0xf50]
call fcn.14004e140
movzx edx, word [rsp + 0x36]
inc r14d
movsx ecx, word [rsp + 0x4a]
inc dx
mov esi, dword [rsp + 0x40]
dec ecx
add ecx, esi
movsx eax, dx
add r12, 8
mov word [rsp + 0x36], dx
cmp ecx, eax
jg 0x14004d210
mov edi, dword [rsp + 0x38]
xor r12d, r12d
call fcn.140069274
movzx ebx, ax
mov eax, ebx
cmp ebx, 0xd
je 0x14004d477
cmp eax, 0xe0
jne case.0x14004d3a7.74
call fcn.140069274
movzx ebx, ax
lea eax, [rbx - 0x47]
cmp eax, 0xa
ja case.0x14004d3a7.74
lea rdx, [0x140000000]
cdqe
mov ecx, dword [rdx + rax*4 + 0x4d5a8]
add rcx, rdx
jmp rcx
test r13d, r13d
je case.0x14004d3a7.74
dec r13d
cmp edi, r13d
jle case.0x14004d3a7.74
mov edi, r13d
mov dword [rsp + 0x38], r13d
jmp case.0x14004d3a7.74
sub r13d, esi
lea eax, [r13 + 2]
mov r13d, r12d
test eax, eax
cmovg r13d, eax
sub edi, esi
lea eax, [rdi + 2]
mov edi, r12d
test eax, eax
cmovg edi, eax
mov dword [rsp + 0x38], edi
jmp case.0x14004d3a7.74
mov r13d, r12d
mov dword [rsp + 0x38], r12d
mov edi, r12d
jmp case.0x14004d3a7.74
lea ecx, [r13 + 1]
movsxd rax, ecx
cmp qword [r15 + 0x4060], rax
jle case.0x14004d3a7.74
lea eax, [rdi - 2]
mov r13d, ecx
add eax, esi
cmp eax, ecx
jg case.0x14004d3a7.74
mov edi, ecx
sub edi, esi
add edi, 3
mov dword [rsp + 0x38], edi
jmp case.0x14004d3a7.74
mov ecx, dword [r15 + 0x4060]
lea eax, [r13 - 2]
add eax, esi
lea r13d, [rcx - 1]
cmp eax, r13d
cmovl r13d, eax
lea eax, [rdi - 2]
sub ecx, esi
add eax, esi
lea edi, [rcx + 2]
cmp eax, edi
cmovl edi, eax
mov dword [rsp + 0x38], edi
jmp case.0x14004d3a7.74
mov r13d, dword [r15 + 0x4060]
mov edi, r12d
dec r13d
mov eax, r13d
sub eax, esi
add eax, 3
test eax, eax
cmovg edi, eax
mov dword [rsp + 0x38], edi
jmp case.0x14004d3a7.74
mov byte [rsp + 0x30], 1
mov dword [r15 + 0x4078], r13d
mov r14d, 0xd
movabs rcx, 0x5000000000001
cmp r14w, bx
jne 0x14004d1c5
mov r8d, dword [rsp + 0x3c]
lea rax, [rsp + 0x48]
mov rcx, qword [r15 + 8]
lea rdx, [rbp + 0x770]
mov dword [rsp + 0x40], 0
mov r9d, dword [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WriteConsoleOutputW]
mov edx, dword [r15 + 0x404c]
mov rcx, qword [r15 + 8]
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
mov rdi, qword [rsp + 0x10d8]
mov rsi, qword [rsp + 0x10e0]
cmp r14w, bx
je 0x14004d505
mov eax, 0x4b
cmp ax, bx
je 0x14004d505
mov eax, 0x4d
cmp ax, bx
jne 0x14004d55b
mov rcx, r15
call fcn.14004e720
cmp r14w, bx
jne 0x14004d55b
movsxd rax, dword [r15 + 0x18]
mov ecx, 1
mov word [r15 + rax*2 + 0x24], r14w
inc dword [r15 + 0x18]
call fcn.140068a60
mov rdx, rax
mov ecx, r14d
call fcn.140069e08
movsxd rax, dword [r15 + 0x18]
mov ebx, 0xa
mov word [r15 + rax*2 + 0x24], bx
lea ecx, [rbx - 9]
inc dword [r15 + 0x18]
call fcn.140068a60
mov rdx, rax
mov ecx, ebx
call fcn.140069e08
mov rcx, qword [rbp - 0x78]
mov r14, qword [rsp + 0x10c0]
test rcx, rcx
je 0x14004d573
movzx eax, byte [rsp + 0x30]
mov byte [rcx], al
mov r12, qword [rsp + 0x10d0]
mov rbx, qword [rsp + 0x1110]
mov r13, qword [rsp + 0x10c8]
mov rcx, qword [rbp + 0xfb0]
xor rcx, rsp
call fcn.140050ca0
add rsp, 0x10e8
pop r15
pop rbp
ret