Function at 0x1401d6d10
Capabilities:
Manipulate console buffer

Disassembly:
push rdi
push r13
push r15
sub rsp, 0x50
mov eax, dword [0x14045b550]
mov r15d, edx
mov qword [rsp + 0x70], rbx
test eax, eax
mov ebx, dword [0x140461fd8]
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x40], rsi
mov esi, dword [0x1404212a4]
mov qword [rsp + 0x38], r12
mov r12, rcx
mov ecx, 0xfde9
mov qword [rsp + 0x30], r14
cmovne esi, ecx
xor edi, edi
cmp edx, 1
jne 0x1401d6e7e
cmp byte [r12], 0x20
jne 0x1401d6e7e
test eax, eax
je 0x1401d6e7e
lea rax, [0x140462118]
cmp qword [0x140454dd0], rax
je 0x1401d6f35
cmp qword [0x140462118], rdi
jne 0x1401d6e60
mov r14d, edi
lea r13, [0x1403b0824]
mov ebp, edi
movsxd rsi, ebp
add rsi, r13
cmp byte [rsi], dil
je 0x1401d6dc7
mov rcx, rsi
call qword [0x140421fd8]
mov rcx, rsi
add r14d, eax
call qword [0x140420bf8]
add ebp, eax
cmp ebp, 1
jl 0x1401d6da0
mov dword [rsp + 0x28], edi
mov r9d, 1
mov r8, r13
mov qword [rsp + 0x20], rdi
xor edx, edx
mov dword [0x14046218c], r14d
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rcx, eax
xor edx, edx
add rcx, rcx
mov dword [0x140461f68], eax
call fcn.140032b90
mov qword [0x140462118], rax
test rax, rax
je 0x1401d6f35
mov edx, dword [0x140461f68]
mov r9d, 1
mov dword [rsp + 0x28], edx
mov r8, r13
xor edx, edx
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea rax, [0x140462118]
mov qword [0x140454dd0], rax
mov eax, dword [0x140461f68]
mov dword [0x140462120], eax
mov eax, dword [0x14046218c]
mov dword [0x140462220], eax
jmp 0x1401d6f35
mov qword [0x140454dd0], rax
mov eax, dword [0x140462120]
mov dword [0x140461f68], eax
mov eax, dword [0x140462220]
jmp 0x1401d6f2f
mov rcx, qword [0x14045bb18]
lea rax, [0x14045bb18]
mov qword [0x140454dd0], rax
mov eax, dword [0x140461fd4]
nop dword [rax]
mov dword [rsp + 0x28], eax
mov r9d, r15d
mov qword [rsp + 0x20], rcx
mov r8, r12
mov ecx, esi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [0x140461f68], eax
test eax, eax
je 0x1401d6ecb
cmp eax, dword [0x140461fd4]
jle 0x1401d6f24
mov rcx, qword [0x14045bb18]
test rcx, rcx
je 0x1401d6eea
cmp dword [0x14045b3f8], edi
jne 0x1401d6eea
call fcn.140005660
mov eax, dword [0x140461f68]
test eax, eax
je 0x1401d6f06
movsxd rcx, eax
xor edx, edx
add rcx, rcx
call fcn.140032b90
mov rcx, rax
mov eax, dword [0x140461f68]
jmp 0x1401d6f09
mov rcx, rdi
cmp dword [0x140461fd4], edi
mov qword [0x14045bb18], rcx
cmovne eax, edi
mov dword [0x140461fd4], eax
jmp 0x1401d6ea0
mov edx, r15d
mov rcx, r12
call fcn.14016b8b0
mov dword [0x14046218c], eax
cmp dword [0x140461ff8], edi
lea r13, str.win32
je 0x1401d6fc0
mov rdx, qword [0x140468780]
test rdx, rdx
je 0x1401d6fc0
mov rcx, rdi
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [rcx + r13 - 1]
jne 0x1401d6fc0
cmp rcx, 6
jne 0x1401d6f60
cmp dword [0x14046996c], edi
jne 0x1401d6f88
cmp dword [0x14045b71c], 0x100
jl 0x1401d6fc0
mov rdx, qword [0x140454dd0]
lea r9, [rsp + 0x78]
mov r8d, dword [0x140461f68]
mov rcx, qword [0x140454e60]
mov qword [rsp + 0x20], rdi
mov rdx, qword [rdx]
call qword [sym.imp.KERNEL32.dll_WriteConsoleW]
test eax, eax
je 0x1401d702a
mov r9d, dword [rsp + 0x78]
test r9d, r9d
je 0x1401d702a
jmp 0x1401d7035
mov r8d, dword [0x14046218c]
lea rax, [rsp + 0x80]
movzx edx, word [0x14045e118]
mov r9d, ebx
mov rcx, qword [0x140454e60]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
mov rdx, qword [0x140454dd0]
lea rax, [rsp + 0x78]
mov r8d, dword [0x140461f68]
mov r9d, ebx
mov rcx, qword [0x140454e60]
mov qword [rsp + 0x20], rax
mov rdx, qword [rdx]
call qword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterW]
test eax, eax
je 0x1401d702a
mov r9d, dword [rsp + 0x78]
lea eax, [r9 + 1]
test eax, 0xfffffffe
jne 0x1401d7035
mov r9d, 1
mov dword [rsp + 0x78], r9d
cmp r9d, dword [0x140461f68]
jne 0x1401d7059
movzx eax, word [0x140461fd8]
add ax, word [0x14046218c]
mov dword [rsp + 0x80], r15d
jmp 0x1401d7120
mov rbx, r12
mov ebp, edi
mov esi, r12d
test r9d, r9d
je 0x1401d70d0
lea r14, [0x1403b1e30]
nop dword [rax]
cmp dword [0x14045b550], edi
je 0x1401d70af
movzx eax, byte [rbx]
test al, al
jne 0x1401d7084
mov r8d, edi
jmp 0x1401d70c0
movsx r8, byte [rax + r14]
mov ecx, 1
cmp rcx, r8
jge 0x1401d70c0
movzx eax, byte [rcx + rbx]
and al, 0xc0
cmp al, 0x80
jne 0x1401d70a7
inc rcx
cmp rcx, r8
jl 0x1401d7093
jmp 0x1401d70c0
mov r8d, 1
jmp 0x1401d70c0
mov rcx, rbx
call qword [0x140420bf8]
mov r9d, dword [rsp + 0x78]
mov r8d, eax
movsxd rax, r8d
inc ebp
add rbx, rax
mov rsi, rbx
cmp ebp, r9d
jb 0x1401d7070
sub esi, r12d
mov r14d, edi
mov dword [rsp + 0x80], esi
mov ebx, edi
nop
test esi, esi
js 0x1401d70e8
cmp ebx, esi
jge 0x1401d710d
movsxd rbp, ebx
add rbp, r12
cmp byte [rbp], dil
je 0x1401d710d
mov rcx, rbp
call qword [0x140421fd8]
mov rcx, rbp
add r14d, eax
call qword [0x140420bf8]
add ebx, eax
jmp 0x1401d70e0
movzx eax, word [0x140461fd8]
mov r15d, dword [rsp + 0x80]
add ax, r14w
movzx ecx, word [0x140461fbc]
mov r14, qword [rsp + 0x30]
mov r12, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x70]
movzx edx, word [0x140461fda]
mov word [0x140461fd8], ax
cmp ax, cx
jle 0x1401d7183
movzx r8d, word [0x140420870]
movzx r9d, word [0x140461fbe]
sub ax, r8w
cmp dx, r9w
jge 0x1401d7170
inc dx
cmp ax, cx
jg 0x1401d7163
mov word [0x140461fd8], ax
mov word [0x140461fda], dx
cmp dword [0x140461ff8], edi
je 0x1401d71d7
mov r8, qword [0x140468780]
test r8, r8
je 0x1401d71d7
nop word [rax + rax]
movzx ecx, byte [r8 + rdi]
inc rdi
cmp cl, byte [rdi + r13 - 1]
jne 0x1401d71d7
cmp rdi, 6
jne 0x1401d71a0
cmp dword [0x14046996c], 0
jne 0x1401d71ca
cmp dword [0x14045b71c], 0x100
jl 0x1401d71d7
mov eax, r15d
add rsp, 0x50
pop r15
pop r13
pop rdi
ret
movsx edx, dx
movsx ecx, ax
inc edx
inc ecx
call fcn.1401d7540
mov eax, dword [rsp + 0x80]
add rsp, 0x50
pop r15
pop r13
pop rdi
ret