Function at 0x140201750
Capabilities:
Manipulate console buffer

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x50]
sub rsp, 0x150
mov rax, qword [0x14055f260]
xor rax, rsp
mov qword [rbp + 0x48], rax
mov rsi, rcx
xor r13d, r13d
mov dword [rsp + 0x40], r13d
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov rbx, rax
lea rdx, [rax - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x1402021d7
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x68], 7
mov word [rsp + 0x50], r13w
lea r8d, [r13 + 0xc]
lea rdx, str.kernel32.dll
lea rcx, [rsp + 0x50]
call fcn.14001d300
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x78], r13
lea r8d, [r13 + 2]
lea rdx, [rsp + 0x50]
lea rcx, [rsi + 8]
call fcn.14014c3b0
test al, al
sete r14b
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x140201849
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140201844
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140201844
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14036c454
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x68], 7
mov word [rsp + 0x50], r13w
test r14b, r14b
jne 0x1402021d7
mov ecx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_AttachConsole]
test eax, eax
je 0x1402021d7
mov qword [rsi + 0x10], rbx
lea rdx, str.GetConsoleCommandHistory
lea rcx, [rbp]
call fcn.1400104b0
nop
mov rbx, qword [rsi + 8]
mov r8d, 0x57
lea rdx, [rbp]
lea rcx, [rsp + 0x50]
call fcn.140108860
nop
lea rdx, [rsp + 0x50]
mov rcx, rbx
call fcn.14014c820
mov rbx, rax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rcx, [rsp + 0x50]
call fcn.14000e160
mov qword [rsi + 0x38], rbx
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rcx, [rbp]
call fcn.14000e160
cmp qword [rsi + 0x38], 0
je 0x1402021d7
lea rdx, str.GetConsoleCommandHistoryLength
lea rcx, [rsp + 0x50]
call fcn.1400104b0
nop
mov rbx, qword [rsi + 8]
mov r8d, 0x57
lea rdx, [rsp + 0x50]
lea rcx, [rbp]
call fcn.140108860
mov edi, Ordinal_27
lea rdx, [rbp]
mov rcx, rbx
call fcn.14014c820
mov rbx, rax
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rcx, [rbp]
call fcn.14000e160
mov qword [rsi + 0x40], rbx
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rcx, [rsp + 0x50]
call fcn.14000e160
cmp qword [rsi + 0x40], 0
je 0x1402021d7
lea rdx, [rsi + 0x18]
mov rcx, rsi
call fcn.140202580
mov dword [rsi + 0x20], eax
mov rax, qword [rsi + 0x18]
cmp qword [rax], 0
je 0x1402021d7
lea rdx, [rbp + 0x30]
mov rcx, qword [rsi + 0x10]
call qword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x140201bc1
lea rsi, [0x1403c8f48]
lea r15, str.C:ProjectwxWidgets_3.2.2.1_srcmsw_app.cpp
lea r12, str._anonymous_namespace::wxConsoleStderr::DoInit
lea r14, [0x140415e00]
test al, al
jne 0x140201a05
mov rdx, rsi
lea rcx, [rbp]
call fcn.14010a1d0
mov rbx, rax
or edi, 1
mov dword [rsp + 0x40], edi
cmp dword [0x140575068], 0
je 0x1402019e9
call sub.KERNEL32.dll_GetCurrentThreadId
cmp eax, dword [0x140575068]
je 0x1402019e9
call fcn.140136fe0
jmp 0x1402019f0
movzx eax, byte [reloc.WS2_32.dll_accept]
test al, al
je 0x140201a05
mov rcx, rbx
call fcn.140136b60
cmp eax, 6
jb 0x140201a05
mov bl, 1
jmp 0x140201a07
xor bl, bl
test dil, 1
je 0x140201a23
and edi, 0xfffffffe
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rcx, [rbp]
call fcn.14000e160
test bl, bl
je 0x1402021d7
lea rax, [rbp]
mov qword [rsp + 0x40], rax
call fcn.14010aa30
mov qword [rsp + 0x50], rax
call fcn.14010aa30
mov qword [rsp + 0x58], rax
mov r8, 0xffffffffffffffff
lea rdx, str._s__d_:__s_failed_with_error_0x_08lx___s_.
lea rcx, [rsp + 0x60]
call fcn.14010f8e0
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x68], xmm0
call sub.KERNEL32.dll_GetLastError
mov edx, eax
lea rcx, [rbp]
call fcn.140138150
mov rbx, rax
mov dword [rbp - 0x80], 6
mov qword [rbp - 0x78], r15
mov qword [rbp - 0x68], r12
mov dword [rbp - 0x70], 0x1c8
mov qword [rbp - 0x60], rsi
mov qword [rbp - 0x58], r13
mov qword [rbp - 0x50], r13
call sub.KERNEL32.dll_GetCurrentThreadId
mov dword [rbp - 0x48], eax
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x40], xmm0
mov qword [rbp - 0x28], r13
mov qword [rbp - 0x20], 7
mov word [rbp - 0x38], r13w
mov qword [rbp - 0x18], r13
mov qword [rbp - 0x10], r13
call sub.KERNEL32.dll_GetLastError
nop
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r14
mov r9d, 0x1c8
mov r8, r15
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x80]
call fcn.14010ce50
nop
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdx, qword [rbp - 0x20]
cmp rdx, 8
jb 0x140201b3d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140201b38
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140201bba
call fcn.14036c454
mov qword [rbp - 0x28], r13
mov qword [rbp - 0x20], 7
mov word [rbp - 0x38], r13w
mov rbx, qword [rbp - 0x40]
test rbx, rbx
je 0x140201ba9
lea r8, [0x1400110e0]
mov rdx, qword [rbx + 0x20]
mov rcx, qword [rbx + 0x28]
call fcn.14011b9f0
mov qword [rbx + 0x30], r13
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
lea r8, [0x140011220]
mov rdx, qword [rbx]
mov rcx, qword [rbx + 8]
call fcn.14011b9f0
mov qword [rbx + 0x10], r13
mov rcx, qword [rbx]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov edx, 0x40
mov rcx, rbx
call fcn.14036c454
nop
lea rcx, [rsp + 0x50]
call fcn.140010cb0
mov al, 1
jmp 0x1402019b2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov word [rsp + 0x40], r13w
movzx r14d, word [rbp + 0x36]
inc r14w
dec r14w
mov word [rsp + 0x42], r14w
lea rax, [rsp + 0x4c]
mov qword [rsp + 0x20], rax
mov ebx, dword [rsp + 0x40]
mov r9d, ebx
mov r8d, 4
lea rdx, [rsp + 0x48]
mov rcx, qword [rsi + 0x10]
call qword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterA]
test eax, eax
je 0x140201faa
mov r8d, 4
lea rdx, [rsp + 0x48]
lea rcx, [0x140415e70]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
test eax, eax
jne 0x140201bd0
movsx eax, r14w
movsx ecx, word [rbp + 0x36]
sub ecx, eax
mov dword [rsi + 0x34], ecx
movsx edx, word [rbp + 0x42]
imul edx, ecx
movsx eax, word [rbp + 0x34]
add edx, eax
mov dword [rsi + 0x30], edx
test edx, edx
jle 0x140201fa3
movsxd r15, edx
mov rax, qword [rsi + 0x28]
cmp byte [rax + 0x12], 0
jne 0x140201c9c
cmp qword [0x14055a4b8], 0
je 0x140201c9c
lea rax, str.cannot_extend_non_owned_buffer
mov qword [rsp + 0x20], rax
lea r9, str.this__m_data__m_owned
lea r8, str.wxCharTypeBuffer_char_::extend
mov edx, 0x140
lea rcx, str.C:ProjectwxWidgets_3.2.2.1includewx_buffer.h
call fcn.140118ee0
cmp byte [0x1405750a8], 0
je 0x140201c9c
mov byte [0x1405750a8], 0
int3
mov rax, qword [rsi + 0x28]
cmp word [rax + 0x10], 1
je 0x140201ced
cmp qword [0x14055a4b8], 0
je 0x140201ced
lea rax, str.cant_extend_shared_buffer
mov qword [rsp + 0x20], rax
lea r9, str.this__m_data__m_ref__1
lea r8, str.wxCharTypeBuffer_char_::extend
mov edx, 0x141
lea rcx, str.C:ProjectwxWidgets_3.2.2.1includewx_buffer.h
call fcn.140118ee0
cmp byte [0x1405750a8], 0
je 0x140201ced
mov byte [0x1405750a8], 0
int3
mov rax, qword [rsi + 0x28]
lea rdx, [r15 + 1]
mov rcx, qword [rax]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov r14, rax
test rax, rax
je 0x140201d4e
mov byte [rax + r15], 0
call fcn.14010aa30
mov rcx, qword [rsi + 0x28]
cmp rcx, rax
jne 0x140201d3f
mov rcx, rdi
call fcn.14036c0f8
mov qword [rsp + 0x40], rax
mov qword [rax], r14
mov qword [rax + 8], r15
mov ecx, 1
mov word [rax + 0x10], cx
mov byte [rax + 0x12], cl
mov qword [rsi + 0x28], rax
jmp 0x140201d4e
mov qword [rcx], r14
mov qword [rcx + 8], r15
mov rax, qword [rsi + 0x28]
mov byte [rax + 0x12], 1
mov rax, qword [rsi + 0x28]
lea rcx, [rsp + 0x4c]
mov qword [rsp + 0x20], rcx
mov r9d, ebx
mov r8d, dword [rsi + 0x30]
mov rdx, qword [rax]
mov rcx, qword [rsi + 0x10]
call qword [sym.imp.KERNEL32.dll_ReadConsoleOutputCharacterA]
test eax, eax
jne 0x140201fa3
lea rsi, [0x1403c8f48]
lea r15, str.C:ProjectwxWidgets_3.2.2.1_srcmsw_app.cpp
lea r12, str._anonymous_namespace::wxConsoleStderr::DoInit
lea r14, [0x140415e38]
test al, al
jne 0x140201de7
mov rdx, rsi
lea rcx, [rbp]
call fcn.14010a1d0
mov rbx, rax
or edi, 4
mov dword [rsp + 0x40], edi
cmp dword [0x140575068], 0
je 0x140201dcb
call sub.KERNEL32.dll_GetCurrentThreadId
cmp eax, dword [0x140575068]
je 0x140201dcb
call fcn.140136fe0
jmp 0x140201dd2
movzx eax, byte [reloc.WS2_32.dll_accept]
test al, al
je 0x140201de7
mov rcx, rbx
call fcn.140136b60
cmp eax, 6
jb 0x140201de7
mov bl, 1
jmp 0x140201de9
xor bl, bl
test dil, 4
je 0x140201e05
and edi, 0xfffffffb
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rcx, [rbp]
call fcn.14000e160
test bl, bl
je 0x1402021d7
lea rax, [rbp]
mov qword [rsp + 0x40], rax
call fcn.14010aa30
mov qword [rsp + 0x50], rax
call fcn.14010aa30
mov qword [rsp + 0x58], rax
mov r8, 0xffffffffffffffff
lea rdx, str._s__d_:__s_failed_with_error_0x_08lx___s_.
lea rcx, [rsp + 0x60]
call fcn.14010f8e0
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x68], xmm0
call sub.KERNEL32.dll_GetLastError
mov edx, eax
lea rcx, [rbp]
call fcn.140138150
mov rbx, rax
mov dword [rbp - 0x80], 6
mov qword [rbp - 0x78], r15
mov qword [rbp - 0x68], r12
mov dword [rbp - 0x70], 0x1e8
mov qword [rbp - 0x60], rsi
mov qword [rbp - 0x58], r13
mov qword [rbp - 0x50], r13
call sub.KERNEL32.dll_GetCurrentThreadId
mov dword [rbp - 0x48], eax
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x40], xmm0
mov qword [rbp - 0x28], r13
mov qword [rbp - 0x20], 7
mov word [rbp - 0x38], r13w
mov qword [rbp - 0x18], r13
mov qword [rbp - 0x10], r13
call sub.KERNEL32.dll_GetLastError
nop
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r14
mov r9d, 0x1e8
mov r8, r15
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x80]
call fcn.14010ce50
nop
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdx, qword [rbp - 0x20]
cmp rdx, 8
jb 0x140201f1f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140201f1a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140201f9c
call fcn.14036c454
mov qword [rbp - 0x28], r13
mov qword [rbp - 0x20], 7
mov word [rbp - 0x38], r13w
mov rbx, qword [rbp - 0x40]
test rbx, rbx
je 0x140201f8b
lea r8, [0x1400110e0]
mov rdx, qword [rbx + 0x20]
mov rcx, qword [rbx + 0x28]
call fcn.14011b9f0
mov qword [rbx + 0x30], r13
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
lea r8, [0x140011220]
mov rdx, qword [rbx]
mov rcx, qword [rbx + 8]
call fcn.14011b9f0
mov qword [rbx + 0x10], r13
mov rcx, qword [rbx]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov edx, 0x40
mov rcx, rbx
call fcn.14036c454
nop
lea rcx, [rsp + 0x50]
call fcn.140010cb0
mov al, 1
jmp 0x140201d94
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov al, 1
jmp 0x1402021d9
xor al, al
lea rsi, [0x1403c8f48]
lea r15, str.C:ProjectwxWidgets_3.2.2.1_srcmsw_app.cpp
lea r12, str._anonymous_namespace::wxConsoleStderr::DoInit
lea r14, [0x140415e38]
test al, al
jne 0x14020201b
mov rdx, rsi
lea rcx, [rbp]
call fcn.14010a1d0
mov rbx, rax
or edi, 2
mov dword [rsp + 0x40], edi
cmp dword [0x140575068], 0
je 0x140201fff
call sub.KERNEL32.dll_GetCurrentThreadId
cmp eax, dword [0x140575068]
je 0x140201fff
call fcn.140136fe0
jmp 0x140202006
movzx eax, byte [reloc.WS2_32.dll_accept]
test al, al
je 0x14020201b
mov rcx, rbx
call fcn.140136b60
cmp eax, 6
jb 0x14020201b
mov bl, 1
jmp 0x14020201d
xor bl, bl
test dil, 2
je 0x140202039
and edi, 0xfffffffd
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rcx, [rbp]
call fcn.14000e160
test bl, bl
je 0x1402021d7
lea rax, [rbp]
mov qword [rsp + 0x40], rax
call fcn.14010aa30
mov qword [rsp + 0x50], rax
call fcn.14010aa30
mov qword [rsp + 0x58], rax
mov r8, 0xffffffffffffffff
lea rdx, str._s__d_:__s_failed_with_error_0x_08lx___s_.
lea rcx, [rsp + 0x60]
call fcn.14010f8e0
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x68], xmm0
call sub.KERNEL32.dll_GetLastError
mov edx, eax
lea rcx, [rbp]
call fcn.140138150
mov rbx, rax
mov dword [rbp - 0x80], 6
mov qword [rbp - 0x78], r15
mov qword [rbp - 0x68], r12
mov dword [rbp - 0x70], 0x1d9
mov qword [rbp - 0x60], rsi
mov qword [rbp - 0x58], r13
mov qword [rbp - 0x50], r13
call sub.KERNEL32.dll_GetCurrentThreadId
mov dword [rbp - 0x48], eax
xorps xmm0, xmm0
movdqa xmmword [rbp - 0x40], xmm0
mov qword [rbp - 0x28], r13
mov qword [rbp - 0x20], 7
mov word [rbp - 0x38], r13w
mov qword [rbp - 0x18], r13
mov qword [rbp - 0x10], r13
call sub.KERNEL32.dll_GetLastError
nop
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r14
mov r9d, 0x1d9
mov r8, r15
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x80]
call fcn.14010ce50
nop
mov rcx, qword [rbp - 0x18]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdx, qword [rbp - 0x20]
cmp rdx, 8
jb 0x140202153
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x38]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14020214e
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1402021d0
call fcn.14036c454
mov qword [rbp - 0x28], r13
mov qword [rbp - 0x20], 7
mov word [rbp - 0x38], r13w
mov rbx, qword [rbp - 0x40]
test rbx, rbx
je 0x1402021bf
lea r8, [0x1400110e0]
mov rdx, qword [rbx + 0x20]
mov rcx, qword [rbx + 0x28]
call fcn.14011b9f0
mov qword [rbx + 0x30], r13
mov rcx, qword [rbx + 0x20]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
lea r8, [0x140011220]
mov rdx, qword [rbx]
mov rcx, qword [rbx + 8]
call fcn.14011b9f0
mov qword [rbx + 0x10], r13
mov rcx, qword [rbx]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
nop
mov edx, 0x40
mov rcx, rbx
call fcn.14036c454
nop
lea rcx, [rsp + 0x50]
call fcn.140010cb0
mov al, 1
jmp 0x140201fc8
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
xor al, al
mov rcx, qword [rbp + 0x48]
xor rcx, rsp
call fcn.14036c0d0
lea r11, [rsp + 0x150]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret