Function at 0x140039170
Capabilities:
Manipulate console buffer
Query environment variable
Set console window title

Disassembly:
push rbp
lea rbp, [rsp - 0x3f0]
sub rsp, 0x4f0
cmp word [0x140359d8c], 0x5b
jne 0x140039fdc
movzx eax, word [0x140359d90]
mov qword [rsp + 0x4d8], rdi
cmp ax, 0x3f
jne 0x14003921e
movzx eax, word [0x140359d94]
mov ecx, 0xfffb
sub ax, 0x68
test cx, ax
jne case.default.0x140039289
cmp dword [0x140359d98], 1
jne case.default.0x140039289
cmp dword [0x140359da0], 0x19
jne case.default.0x140039289
mov rcx, qword [0x140359d80]
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetConsoleCursorInfo]
mov rcx, qword [0x140359d80]
lea rdx, [rsp + 0x60]
xor edi, edi
cmp word [0x140359d94], 0x68
sete dil
mov dword [rsp + 0x64], edi
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorInfo]
mov rdi, qword [rsp + 0x4d8]
add rsp, 0x4f0
pop rbp
ret
test ax, ax
jne case.default.0x140039289
mov rcx, qword [0x140359d80]
lea rdx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
movzx eax, word [0x140359d94]
add eax, 0xffffffc0
cmp eax, 0x35
ja case.default.0x140039289
mov qword [rsp + 0x4e8], rbx
mov qword [rsp + 0x4e0], rsi
mov qword [rsp + 0x4c8], r14
mov qword [rsp + 0x4c0], r15
lea r15, [0x140000000]
cdqe
movzx eax, byte [r15 + rax + 0x3a074]
mov ecx, dword [r15 + rax*4 + 0x3a01c]
add rcx, r15
jmp rcx
mov ebx, dword [0x140359d98]
xor edi, edi
test ebx, ebx
jne 0x1400392a8
mov ebx, 1
mov dword [0x140359da0], edi
mov dword [0x140359d98], ebx
mov r14d, edi
test ebx, ebx
jle 0x140039438
mov qword [rsp + 0x4d0], r12
lea rsi, [0x140359da0]
movsxd rcx, dword [rsi]
lea eax, [rcx - 0x1e]
cmp eax, 7
ja 0x1400392db
sub cl, 0x1e
mov byte [0x14035a1f8], cl
jmp case.0x14003930e.9
lea eax, [rcx - 0x28]
cmp eax, 7
ja 0x1400392f1
sub cl, 0x28
mov byte [0x14035a1f9], cl
jmp case.0x14003930e.9
cmp ecx, 0x31
ja case.0x14003930e.9
movzx eax, byte [r15 + rcx + 0x3a0d4]
mov ecx, dword [r15 + rax*4 + 0x3a0ac]
add rcx, r15
jmp rcx
mov r8d, 4
mov dword [rbp + 0x400], 0x37
lea rdx, [rbp + 0x400]
lea rcx, str.ANSICON_DEF
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
xor edx, edx
lea rcx, [rbp + 0x400]
lea r8d, [rdx + 0x10]
call fcn.140206b00
mov byte [0x14035a1fe], dil
mov ecx, eax
test eax, eax
jns 0x14003935c
mov byte [0x14035a1fe], 1
neg ecx
mov r8d, dword [rsi]
movsxd rdx, ecx
cmp r8d, 0x31
je 0x14003937d
mov rax, rdx
and eax, 7
movzx eax, byte [rax + r15 + 0x258cd0]
mov byte [0x14035a1f8], al
cmp r8d, 0x27
je 0x140039399
sar rdx, 4
and edx, 7
movzx eax, byte [rdx + r15 + 0x258cd0]
mov byte [0x14035a1f9], al
mov ebx, dword [0x140359d98]
test r8d, r8d
jne case.0x14003930e.9
cmp ebx, 1
jne 0x1400393ca
movzx eax, cl
mov word [0x14035a1fc], di
and al, 8
and cl, 0x80
mov byte [0x14035a1fa], al
mov byte [0x14035a1fb], cl
jmp case.0x14003930e.9
mov word [0x14035a1fa], di
mov word [0x14035a1fc], di
jmp case.0x14003930e.9
mov byte [0x14035a1fa], 8
jmp case.0x14003930e.9
mov byte [0x14035a1fb], 0x80
jmp case.0x14003930e.9
mov byte [0x14035a1fc], 1
jmp case.0x14003930e.9
mov byte [0x14035a1fd], 1
jmp case.0x14003930e.9
mov byte [0x14035a1fa], dil
jmp case.0x14003930e.9
mov byte [0x14035a1fb], dil
jmp case.0x14003930e.9
mov byte [0x14035a1fc], dil
jmp case.0x14003930e.9
mov byte [0x14035a1fd], dil
inc r14d
add rsi, 4
cmp r14d, ebx
jl 0x1400392c2
mov r12, qword [rsp + 0x4d0]
cmp byte [0x14035a1fd], dil
je 0x1400394b4
cmp byte [0x14035a1fc], dil
je 0x14003947f
movzx ecx, byte [0x14035a1f8]
movzx eax, byte [rcx + r15 + 0x258cc8]
or al, byte [rcx + r15 + 0x258cc0]
cmp byte [0x14035a1fa], dil
movzx edx, al
je 0x14003952d
mov eax, 0x88
or dx, ax
jmp 0x14003952d
movzx ecx, byte [0x14035a1f9]
movzx eax, byte [rcx + r15 + 0x258cc8]
or al, byte [rcx + r15 + 0x258cc0]
cmp byte [0x14035a1fb], dil
movzx edx, al
je 0x14003952d
mov eax, 0x88
or dx, ax
jmp 0x14003952d
cmp byte [0x14035a1fc], dil
je 0x1400394ff
movzx eax, byte [0x14035a1f9]
movzx ecx, byte [0x14035a1f8]
movzx eax, byte [rax + r15 + 0x258cc0]
or al, byte [rcx + r15 + 0x258cc8]
cmp byte [0x14035a1fa], dil
movzx edx, al
je 0x1400394f0
mov eax, 0x80
or dx, ax
cmp byte [0x14035a1fb], dil
je 0x14003952d
or dx, 8
jmp 0x14003952d
movzx ecx, byte [0x14035a1f9]
movzx eax, byte [0x14035a1f8]
movzx ecx, byte [rcx + r15 + 0x258cc8]
or cl, byte [rax + r15 + 0x258cc0]
or cl, byte [0x14035a1fb]
or cl, byte [0x14035a1fa]
movzx edx, cl
cmp byte [0x14035a1fe], dil
je 0x14003954e
movzx ecx, dx
movzx eax, dx
and cx, 0xf
shr ax, 4
shl cx, 4
movzx edx, cx
or dx, ax
mov rcx, qword [0x140359d80]
call qword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
jmp case.0x140039289.73
mov eax, dword [0x140359d98]
xor edi, edi
test eax, eax
jne 0x140039581
mov ecx, edi
mov ebx, 1
mov dword [0x140359da0], ecx
mov dword [0x140359d98], ebx
jmp 0x140039590
cmp eax, 1
jne case.0x140039289.73
mov ecx, dword [0x140359da0]
test ecx, ecx
je 0x140039668
sub ecx, 1
je 0x140039618
cmp ecx, 1
jne case.0x140039289.73
movsx eax, word [rsp + 0x32]
mov dl, 0x20
mov rcx, qword [0x140359d80]
mov dword [rbp + 0x400], edi
movsx edi, word [rsp + 0x30]
mov ebx, dword [rbp + 0x400]
mov r9d, ebx
imul edi, eax
lea rax, [rbp + 0x408]
mov qword [rsp + 0x20], rax
mov r8d, edi
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
movzx edx, word [rsp + 0x38]
lea rax, [rbp + 0x408]
mov rcx, qword [0x140359d80]
mov r9d, ebx
mov r8d, edi
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
mov rcx, qword [0x140359d80]
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp case.0x140039289.73
movsx eax, word [rsp + 0x36]
mov dl, 0x20
mov rcx, qword [0x140359d80]
mov dword [rbp + 0x400], edi
movsx edi, word [rsp + 0x30]
mov r9d, dword [rbp + 0x400]
imul edi, eax
movsx eax, word [rsp + 0x34]
add edi, eax
lea rax, [rbp + 0x408]
mov qword [rsp + 0x20], rax
lea r8d, [rdi + 1]
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
mov r9d, dword [rbp + 0x400]
lea r8d, [rdi + 1]
jmp 0x140039825
movsx eax, word [rsp + 0x36]
mov dl, 0x20
movsx ebx, word [rsp + 0x32]
mov r9d, dword [rsp + 0x34]
sub ebx, eax
movsx eax, word [rsp + 0x30]
mov rcx, qword [0x140359d80]
imul ebx, eax
movsx eax, r9w
sub ebx, eax
lea rax, [rbp + 0x408]
mov qword [rsp + 0x20], rax
lea r8d, [rbx - 1]
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
lea r8d, [rbx - 1]
jmp 0x140039820
mov eax, dword [0x140359d98]
xor edi, edi
test eax, eax
jne 0x1400396d0
mov ecx, edi
mov ebx, 1
mov dword [0x140359da0], ecx
mov dword [0x140359d98], ebx
jmp 0x1400396df
cmp eax, 1
jne case.0x140039289.73
mov ecx, dword [0x140359da0]
test ecx, ecx
je 0x140039795
sub ecx, 1
je 0x140039742
cmp ecx, 1
jne case.0x140039289.73
movzx eax, word [rsp + 0x36]
mov dl, 0x20
movsx r8d, word [rsp + 0x30]
mov rcx, qword [0x140359d80]
mov word [rbp + 0x402], ax
lea rax, [rbp + 0x408]
mov word [rbp + 0x400], di
mov r9d, dword [rbp + 0x400]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
movsx r8d, word [rsp + 0x30]
mov r9d, dword [rbp + 0x400]
jmp 0x140039825
movzx eax, word [rsp + 0x36]
mov dl, 0x20
movsx r8d, word [rsp + 0x34]
mov rcx, qword [0x140359d80]
inc r8d
mov word [rbp + 0x402], ax
lea rax, [rbp + 0x408]
mov word [rbp + 0x400], di
mov r9d, dword [rbp + 0x400]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
movsx r8d, word [rsp + 0x34]
mov r9d, dword [rbp + 0x400]
inc r8d
jmp 0x140039825
movsx ebx, word [rsp + 0x30]
mov dl, 0x20
mov r9d, dword [rsp + 0x34]
mov rcx, qword [0x140359d80]
movsx eax, r9w
sub ebx, eax
lea rax, [rbp + 0x408]
mov qword [rsp + 0x20], rax
lea r8d, [rbx + 1]
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
lea r8d, [rbx + 1]
jmp 0x140039820
mov eax, dword [0x140359d98]
test eax, eax
jne 0x1400397e7
mov ebx, 1
mov dword [0x140359da0], ebx
mov dword [0x140359d98], ebx
jmp 0x1400397f6
cmp eax, 1
jne case.0x140039289.73
mov ebx, dword [0x140359da0]
mov r9d, dword [rsp + 0x34]
lea rax, [rbp + 0x408]
mov rcx, qword [0x140359d80]
mov r8d, ebx
mov dl, 0x20
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterA]
mov r8d, dword [0x140359da0]
mov r9d, dword [rsp + 0x34]
movzx edx, word [rsp + 0x38]
lea rax, [rbp + 0x408]
mov rcx, qword [0x140359d80]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
jmp case.0x140039289.73
mov eax, dword [0x140359d98]
test eax, eax
jne 0x140039865
mov ebx, 1
mov dword [0x140359da0], ebx
mov dword [0x140359d98], ebx
jmp 0x14003986e
cmp eax, 1
jne case.0x140039289.73
movzx ecx, word [rsp + 0x36]
xor edi, edi
movzx eax, word [rsp + 0x30]
dec ax
mov word [rbp + 0x418], di
mov word [rbp + 0x41c], ax
movzx eax, word [rsp + 0x32]
dec ax
mov word [rbp + 0x41a], cx
mov word [rbp + 0x41e], ax
movzx eax, word [0x140359da0]
add ax, cx
mov word [rbp + 0x400], di
mov word [rbp + 0x402], ax
jmp 0x140039a95
mov eax, dword [0x140359d98]
test eax, eax
jne 0x1400398d5
mov ebx, 1
mov dword [0x140359d98], ebx
jmp 0x1400398e4
cmp eax, 1
jne case.0x140039289.73
mov ebx, dword [0x140359da0]
movsx r8d, word [rsp + 0x36]
movsx edx, word [rsp + 0x32]
mov ecx, edx
mov word [rbp + 0x402], r8w
sub ecx, r8d
cmp ebx, ecx
cmovg ebx, ecx
xor edi, edi
movzx eax, bx
mov dword [0x140359da0], ebx
add ax, r8w
mov word [rbp + 0x418], di
mov word [rbp + 0x41a], ax
movzx eax, word [rsp + 0x30]
dec ax
mov word [rbp + 0x400], di
mov word [rbp + 0x41c], ax
dec dx
jmp 0x140039a8e
mov eax, dword [0x140359d98]
test eax, eax
jne 0x140039959
mov ebx, 1
mov dword [0x140359da0], ebx
mov dword [0x140359d98], ebx
jmp 0x140039968
cmp eax, 1
jne case.0x140039289.73
mov ebx, dword [0x140359da0]
movsx r8d, word [rsp + 0x30]
mov r9d, dword [rsp + 0x34]
mov edx, r8d
movsx r10d, r9w
lea eax, [r8 - 1]
lea ecx, [r10 + rbx]
cmp ecx, eax
jle 0x14003998f
sub edx, r10d
mov dword [0x140359da0], edx
movzx eax, word [0x140359da0]
dec r8w
mov rcx, qword [0x140359d80]
add ax, r9w
mov word [rbp + 0x418], ax
mov edx, 0x20
movzx eax, word [rsp + 0x36]
mov word [rbp + 0x41a], ax
mov word [rbp + 0x41e], ax
movzx eax, word [rsp + 0x38]
mov word [rbp + 0x412], ax
lea rax, [rbp + 0x410]
mov word [rbp + 0x41c], r8w
xor r8d, r8d
mov word [rbp + 0x410], dx
lea rdx, [rbp + 0x418]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ScrollConsoleScreenBufferA]
jmp case.0x140039289.73
mov eax, dword [0x140359d98]
test eax, eax
jne 0x140039a1d
mov ebx, 1
mov dword [0x140359da0], ebx
mov dword [0x140359d98], ebx
jmp 0x140039a2c
cmp eax, 1
jne case.0x140039289.73
mov ebx, dword [0x140359da0]
movsx r9d, word [rsp + 0x30]
mov eax, dword [rsp + 0x34]
mov r8d, r9d
movsx r10d, ax
lea ecx, [r9 - 1]
lea edx, [r10 + rbx]
cmp edx, ecx
jle 0x140039a53
sub r8d, r10d
mov dword [0x140359da0], r8d
movzx ecx, word [0x140359da0]
movzx edx, word [rsp + 0x36]
sub r9w, cx
dec r9w
mov word [rbp + 0x418], ax
add cx, ax
mov word [rbp + 0x41a], dx
mov word [rbp + 0x400], cx
mov word [rbp + 0x41c], r9w
mov word [rbp + 0x402], dx
mov word [rbp + 0x41e], dx
movzx eax, word [rsp + 0x38]
mov edx, 0x20
mov r9d, dword [rbp + 0x400]
xor r8d, r8d
mov rcx, qword [0x140359d80]
mov word [rbp + 0x412], ax
lea rax, [rbp + 0x410]
mov word [rbp + 0x410], dx
lea rdx, [rbp + 0x418]
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ScrollConsoleScreenBufferA]
jmp case.0x140039289.73
mov eax, dword [0x140359d98]
test eax, eax
jne 0x140039af9
mov ebx, 1
mov dword [0x140359da0], ebx
mov dword [0x140359d98], ebx
jmp 0x140039b02
cmp eax, 1
jne case.0x140039289.73
movzx eax, word [rsp + 0x36]
sub ax, word [0x140359da0]
mov word [rbp + 0x402], ax
jns 0x140039b20
xor edi, edi
mov word [rbp + 0x402], di
movzx eax, word [rsp + 0x34]
mov word [rbp + 0x400], ax
jmp 0x140039e3c
mov eax, dword [0x140359d98]
test eax, eax
jne 0x140039b4e
mov ebx, 1
mov dword [0x140359da0], ebx
mov dword [0x140359d98], ebx
jmp 0x140039b57
cmp eax, 1
jne case.0x140039289.73
movzx eax, word [0x140359da0]
add ax, word [rsp + 0x36]
movzx ecx, word [rsp + 0x32]
mov word [rbp + 0x402], ax
cmp ax, cx
jl 0x140039b7e
dec cx
mov word [rbp + 0x402], cx
movzx eax, word [rsp + 0x34]
mov word [rbp + 0x400], ax
jmp 0x140039e3c
mov eax, dword [0x140359d98]
test eax, eax
jne 0x140039bac
mov ebx, 1
mov dword [0x140359da0], ebx
mov dword [0x140359d98], ebx
jmp 0x140039bb5
cmp eax, 1
jne case.0x140039289.73
movzx eax, word [0x140359da0]
add ax, word [rsp + 0x34]
movzx ecx, word [rsp + 0x30]
mov word [rbp + 0x400], ax
cmp ax, cx
jl 0x140039d33
movzx eax, word [rsp + 0x36]
dec cx
mov word [rbp + 0x400], cx
mov word [rbp + 0x402], ax
jmp 0x140039e3c
mov eax, dword [0x140359d98]
test eax, eax
jne 0x140039c0e
mov ebx, 1
mov dword [0x140359da0], ebx
mov dword [0x140359d98], ebx
jmp 0x140039c17
cmp eax, 1
jne case.0x140039289.73
movzx eax, word [rsp + 0x34]
sub ax, word [0x140359da0]
mov word [rbp + 0x400], ax
jmp 0x140039d28
mov eax, dword [0x140359d98]
test eax, eax
jne 0x140039c4c
mov ebx, 1
mov dword [0x140359da0], ebx
mov dword [0x140359d98], ebx
jmp 0x140039c55
cmp eax, 1
jne case.0x140039289.73
movzx eax, word [0x140359da0]
add ax, word [rsp + 0x36]
movzx ecx, word [rsp + 0x32]
mov word [rbp + 0x402], ax
cmp ax, cx
jl 0x140039c7c
dec cx
mov word [rbp + 0x402], cx
xor edi, edi
mov word [rbp + 0x400], di
jmp 0x140039e3c
mov eax, dword [0x140359d98]
test eax, eax
jne 0x140039ca7
mov ebx, 1
mov dword [0x140359da0], ebx
mov dword [0x140359d98], ebx
jmp 0x140039cb0
cmp eax, 1
jne case.0x140039289.73
movzx eax, word [rsp + 0x36]
xor edi, edi
sub ax, word [0x140359da0]
mov word [rbp + 0x402], ax
jns 0x140039cce
mov word [rbp + 0x402], di
mov word [rbp + 0x400], di
jmp 0x140039e3c
mov eax, dword [0x140359d98]
test eax, eax
jne 0x140039cf7
mov ebx, 1
mov dword [0x140359da0], ebx
mov dword [0x140359d98], ebx
jmp 0x140039d00
cmp eax, 1
jne case.0x140039289.73
movzx eax, word [0x140359da0]
movzx ecx, word [rsp + 0x30]
dec ax
mov word [rbp + 0x400], ax
cmp ax, cx
jl 0x140039d25
lea eax, [rcx - 1]
mov word [rbp + 0x400], ax
test ax, ax
jns 0x140039d33
xor edi, edi
mov word [rbp + 0x400], di
movzx eax, word [rsp + 0x36]
mov word [rbp + 0x402], ax
jmp 0x140039e3c
mov eax, dword [0x140359d98]
test eax, eax
jne 0x140039d61
mov ebx, 1
mov dword [0x140359da0], ebx
mov dword [0x140359d98], ebx
jmp 0x140039d6a
cmp eax, 1
jne case.0x140039289.73
movzx edi, word [0x140359da0]
sub di, 1
mov word [rbp + 0x402], di
jns 0x140039d87
xor edi, edi
mov word [rbp + 0x402], di
movzx eax, word [rsp + 0x32]
cmp di, ax
jl 0x140039e3c
dec ax
mov word [rbp + 0x402], ax
jmp 0x140039e3c
mov eax, dword [0x140359d98]
mov ebx, 1
test eax, eax
jne 0x140039dbb
mov dword [0x140359da0], ebx
jmp 0x140039dbf
cmp eax, ebx
jne 0x140039dd1
mov dword [0x140359da4], ebx
mov dword [0x140359d98], 2
jmp 0x140039dda
cmp eax, 2
jg case.0x140039289.73
movzx eax, word [0x140359da4]
xor edi, edi
sub ax, bx
mov word [rbp + 0x400], ax
jns 0x140039df8
mov eax, edi
mov word [rbp + 0x400], ax
movzx ecx, word [rsp + 0x30]
cmp ax, cx
jl 0x140039e0c
dec cx
mov word [rbp + 0x400], cx
movzx eax, word [0x140359da0]
sub ax, bx
mov word [rbp + 0x402], ax
jns 0x140039e28
mov eax, edi
mov word [rbp + 0x402], ax
movzx ecx, word [rsp + 0x32]
cmp ax, cx
jl 0x140039e3c
dec cx
mov word [rbp + 0x402], cx
mov edx, dword [rbp + 0x400]
mov rcx, qword [0x140359d80]
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp case.0x140039289.73
cmp dword [0x140359d98], 0
jne case.0x140039289.73
mov eax, dword [rsp + 0x34]
mov dword [0x14035a200], eax
jmp case.0x140039289.73
cmp dword [0x140359d98], 0
jne case.0x140039289.73
mov edx, dword [0x14035a200]
mov rcx, qword [0x140359d80]
call qword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
jmp case.0x140039289.73
cmp dword [0x140359d98], 1
jne case.0x140039289.73
mov ecx, dword [0x140359da0]
sub ecx, 5
je 0x140039f03
cmp ecx, 1
jne case.0x140039289.73
movsx eax, word [rsp + 0x34]
lea edx, [rcx + 0x1f]
movsx r9d, word [rsp + 0x36]
lea r8, str.e__d__dR
inc eax
lea rcx, [rsp + 0x70]
inc r9d
mov dword [rsp + 0x20], eax
call fcn.140040860
lea rcx, [rsp + 0x70]
call fcn.14003a4d0
mov r14, qword [rsp + 0x4c8]
mov rbx, qword [rsp + 0x4e8]
mov rsi, qword [rsp + 0x4e0]
mov r15, qword [rsp + 0x4c0]
mov rdi, qword [rsp + 0x4d8]
add rsp, 0x4f0
pop rbp
ret
mov ecx, 0xfffffff6
lea rsi, str.e_0n
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebx, 1
xor edi, edi
mov word [rsp + 0x54], di
mov r14, rax
mov dword [rsp + 0x58], edi
mov r8d, 0x1b
mov word [rsp + 0x48], bx
mov dword [rsp + 0x4c], ebx
mov dword [rsp + 0x50], ebx
nop dword [rax + rax]
mov word [rsp + 0x56], r8w
lea r9, [rbp + 0x400]
mov r8d, ebx
lea rdx, [rsp + 0x48]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_WriteConsoleInputA]
movzx eax, word [rsi + 2]
lea rsi, [rsi + 2]
movzx r8d, ax
test ax, ax
jne 0x140039f40
jmp case.0x140039289.73
cmp dword [0x140359d98], 1
jne case.0x140039289.73
cmp dword [0x140359da0], 0x15
jne case.0x140039289.73
mov edx, 0x203
lea rcx, [rbp - 0x4a]
call qword [sym.imp.KERNEL32.dll_GetConsoleTitleW]
mov ecx, WSAGetLastError
mov dword [rbp - 0x50], 0x5d001b
mov word [rbp - 0x4c], cx
mov r8d, 0x1b
lea ecx, [rax + 3]
lea edx, [rax + 4]
mov word [rbp + rcx*2 - 0x50], r8w
add eax, 5
mov ecx, 0x5c
xor edi, edi
mov word [rbp + rdx*2 - 0x50], cx
lea rcx, [rbp - 0x50]
mov word [rbp + rax*2 - 0x50], di
jmp 0x140039ecd
cmp word [0x140359d90], 0
jne 0x140039efa
cmp dword [0x140359d98], 1
jne 0x140039efa
cmp dword [0x140359da0], 0
jne 0x140039efa
lea rcx, [0x140359de0]
call qword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
add rsp, 0x4f0
pop rbp
ret