Function at 0x140020a00
Capabilities:
Set console window title

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x390]
sub rsp, 0x490
mov rax, qword [0x1400db800]
xor rax, rsp
mov qword [rbp + 0x380], rax
movzx ebx, dl
mov rdi, rcx
xor r14d, r14d
mov esi, r14d
mov dword [rsp + 0x20], r14d
xor edx, edx
mov r8d, 0x448
lea rcx, [rsp + 0x30]
call fcn.1400b1140
mov byte [rbp + 0x372], 1
test bl, bl
je 0x140020b13
cmp byte [0x1400e2e5c], sil
jne 0x140020b13
call qword [sym.imp.KERNEL32.dll_AllocConsole]
test eax, eax
je 0x140020bc6
mov word [rbp + 0x370], 0x100
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rbp + 0x348], rax
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rbp + 0x350], rax
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [rbp + 0x358], rax
cmp qword [rbp + 0x348], rsi
je 0x140020bc6
cmp qword [rbp + 0x350], rsi
je 0x140020bc6
test rax, rax
je 0x140020bc6
lea rdx, [rsp + 0x20]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetConsoleMode]
mov edx, dword [rsp + 0x20]
or edx, 0xc0
mov dword [rsp + 0x20], edx
mov rcx, qword [rbp + 0x358]
call qword [sym.imp.KERNEL32.dll_SetConsoleMode]
lea rcx, str.MPQEditor_Console
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
mov ecx, 0x50
call fcn.140094b38
mov qword [rsp + 0x28], rax
mov edx, dword [0x1400e2e48]
mov rcx, rax
call fcn.140023aa0
nop
mov qword [rsp + 0x30], rax
test rax, rax
je 0x140020c83
test rdi, rdi
je 0x140020c0f
movzx eax, word [rdi]
test ax, ax
je 0x140020c0f
cmp r14w, ax
jae 0x140020b73
nop word [rax + rax]
cmp ax, 0x20
ja 0x140020b73
add rdi, 2
movzx eax, word [rdi]
cmp r14w, ax
jb 0x140020b60
movzx eax, word [rdi]
cmp ax, 0x2f
je 0x140020b82
cmp ax, 0x2d
jne 0x140020b8c
lea rax, [rdi + 2]
mov rdi, rax
movzx eax, word [rax]
cmp r14w, ax
jae 0x140020ba5
cmp ax, 0x20
ja 0x140020ba5
add rdi, 2
movzx eax, word [rdi]
cmp r14w, ax
jb 0x140020b92
mov r8, rdi
movzx eax, word [rdi]
test ax, ax
je 0x140020c0c
cmp ax, 0x3b
je 0x140020c0c
cmp ax, 0x20
jbe 0x140020bd0
add r8, 2
movzx eax, word [r8]
jmp 0x140020bb6
mov eax, 0x1f
jmp 0x140020cb3
test ax, ax
je 0x140020be1
mov word [r8], r14w
add r8, 2
movzx eax, word [r8]
cmp r14w, ax
jae 0x140020bfb
cmp ax, 0x20
ja 0x140020bfb
add r8, 2
movzx eax, word [r8]
cmp r14w, ax
jb 0x140020be7
mov rdx, rdi
lea rcx, [rsp + 0x30]
call fcn.140020370
mov esi, eax
jmp 0x140020c0f
mov esi, r14d
lea rcx, [rsp + 0x30]
call fcn.1400207c0
mov rcx, qword [rbp + 0x360]
test rcx, rcx
je 0x140020c2a
call fcn.14003ec20
mov qword [rbp + 0x360], r14
mov rdi, qword [rsp + 0x30]
test rdi, rdi
je 0x140020c83
lea rbx, [rdi + 0x38]
cmp qword [rbx], rbx
je 0x140020c6b
nop dword [rax]
nop dword [rax + rax]
mov rcx, qword [rbx]
mov r8, qword [rcx]
mov rax, qword [rcx + 8]
mov qword [rax], r8
mov qword [r8 + 8], rax
call fcn.140062970
cmp qword [rbx], rbx
jne 0x140020c50
lea rax, [rdi + 0x38]
mov qword [rax + 8], rax
mov qword [rax], rax
mov edx, 0x50
mov rcx, rdi
call fcn.140062970
cmp byte [rbp + 0x371], 0
jne 0x140020c95
cmp byte [rbp + 0x370], 0
je 0x140020cb1
mov rcx, qword [rbp + 0x348]
call qword [sym.imp.KERNEL32.dll_FlushConsoleInputBuffer]
cmp byte [rbp + 0x371], 0
je 0x140020cb1
call qword [sym.imp.KERNEL32.dll_FreeConsole]
mov eax, esi
mov rcx, qword [rbp + 0x380]
xor rcx, rsp
call fcn.140094850
lea r11, [rsp + 0x490]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret