Function at 0x2100cab80
Capabilities:
Connect pipe
Read pipe
Write pipe

Disassembly:
push r14
push r13
push r12
push rsi
push rbx
sub rsp, 0x1f0
mov rbx, rcx
mov rcx, qword [0x2102ff7e0]
test rcx, rcx
je 0x2100cabc8
xor edx, edx
call sym.WaitForSingleObject
cmp eax, 0x102
jne 0x2100cabe8
cmp byte [0x2102ff7e8], 0
mov rcx, qword [rbx + 0x1d8]
je 0x2100cac9d
call method.tty.wait_pcon_fwd__
nop dword [rax]
cmp byte [0x2102ff7e8], 0
je 0x2100cac96
add rsp, 0x1f0
pop rbx
pop rsi
pop r12
pop r13
pop r14
ret
mov rcx, qword [0x2102ff7e0]
call sym.CloseHandle
cmp byte [0x2102ff7e8], 0
mov qword [0x2102ff7e0], 0
mov dword [0x21024fa70], 0xffffffff
je 0x2100cac96
mov rax, qword [rbx + 0x1d8]
mov rdx, qword [0x21024fce8]
mov esi, dword [rax + 8]
cmp dword [rdx + 0xfc20], esi
je 0x2100caf90
cmp byte [rax + 0x120], 0
movzx esi, byte [rax + 0xc8]
je 0x2100cafdf
test sil, sil
jne 0x2100cabd5
mov rcx, qword [rbx + 0x1f0]
mov edx, 0xffffffff
call sym.WaitForSingleObject
mov rcx, qword [rbx + 0x1d8]
xor edx, edx
call method.fhandler_pty_slave.close_pseudoconsole_tty__unsigned_int_
mov rcx, qword [rbx + 0x1f0]
call sym.ReleaseMutex
mov rax, qword [0x21024fce8]
mov byte [0x2102ff7e8], 0
and dword [rax + 4], 0xfffeffff
mov dword [rax + 0xfd70], 0
mov rcx, qword [rbx + 0x1d8]
cmp byte [rcx + 0xc9], 0
jne 0x2100cabd5
mov rcx, qword [rbx + 0x1f0]
mov edx, dword [0x21024fa70]
call sym.WaitForSingleObject
cmp eax, 0x102
je 0x2100cabd5
mov rax, qword [rbx + 0x1d8]
mov r8d, dword [rax + 0xd4]
mov rax, qword [0x21024fce8]
mov edx, dword [rax + 0xfd70]
test edx, edx
je 0x2100cae78
test r8d, r8d
je 0x2100cae90
cmp r8d, edx
je 0x2100cae90
xor edx, edx
mov ecx, 0x1000
call sym.OpenProcess
mov r12, rax
test rax, rax
je 0x2100cae90
lea r13, [rsp + 0xe0]
mov rcx, rax
mov rdx, r13
call sym.GetExitCodeProcess
mov rcx, r12
mov esi, eax
call sym.CloseHandle
test esi, esi
je 0x2100cae90
cmp dword [rsp + 0xe0], 0x103
jne 0x2100cae90
mov rcx, rbx
call method.fhandler_pty_common.to_be_read_from_pcon__
test al, al
jne 0x2100caf05
mov rcx, qword [rbx + 0x1d8]
cmp dword [rcx + 0x124], 1
jne 0x2100caf05
cmp byte [rcx + 0xc8], 0
je 0x2100cb3e1
mov r8d, dword [rcx + 0xd4]
xor edx, edx
mov ecx, 0x40
call sym.OpenProcess
mov r12, rax
test rax, rax
je 0x2100caf05
mov ecx, dword [0x21024fa70]
call sym.acquire_attach_mutex_unsigned_int_
xor r9d, r9d
xor r8d, r8d
mov rcx, r13
mov rax, qword [0x21024fce8]
mov edx, dword [rax + 8]
mov qword [rsp + 0xe0], 0
mov qword [rsp + 0xe8], 0
mov qword [rsp + 0xf0], 0
mov qword [rsp + 0xf8], 0
mov qword [rsp + 0x100], 0
mov qword [rsp + 0x108], 0
mov qword [rsp + 0x110], 0
mov qword [rsp + 0x118], 0
call method.pinfo.init_int__unsigned_int__void_
mov rax, qword [rsp + 0x108]
test rax, rax
je 0x2100cb53d
mov r14d, dword [rax + 0x14]
test r14d, r14d
jne 0x2100cb480
call sym.release_attach_mutex__
mov rcx, r12
call sym.CloseHandle
cmp byte [rsp + 0xf8], 0
je 0x2100caf05
cmp qword [rsp + 0x108], 0
je 0x2100caf05
mov rcx, r13
call method.pinfo.release__
jmp 0x2100caf05
cmp dword [rax + 0x14], r8d
je 0x2100cae90
test r8d, r8d
jne 0x2100cacfc
nop word [rax + rax]
mov rcx, qword [rbx + 0x1e8]
mov edx, dword [0x21024fa70]
call sym.WaitForSingleObject
mov r8, qword [rbx + 0x1d8]
cmp byte [r8 + 0xd0], 0
je 0x2100caed0
cmp byte [r8 + 0xc8], 0
jne 0x2100caed0
cmp dword [r8 + 0x124], 1
je 0x2100caf20
nop word [rax + rax]
mov rcx, qword [rbx + 0x1e8]
call sym.ReleaseMutex
mov rax, qword [rbx + 0x1d8]
mov dword [rax + 0x124], 0
mov dword [rax + 0xd4], 0
mov byte [rax + 0xd0], 0
mov byte [rax + 0xc8], 0
mov rcx, qword [rbx + 0x1f0]
add rsp, 0x1f0
pop rbx
pop rsi
pop r12
pop r13
pop r14
jmp sym.ReleaseMutex
mov rcx, qword [0x2102ff780]
test rcx, rcx
je 0x2100caf3e
mov edx, dword [0x21024fa70]
call sym.WaitForSingleObject
mov r8, qword [rbx + 0x1d8]
mov rax, qword [rbx]
lea rdx, [method.fhandler_pty_slave.get_handle_nat__]
mov r9, qword [rbx + 0x1f8]
mov rax, qword [rax + 0x288]
cmp rax, rdx
jne 0x2100cb399
lea rax, [rbx + 0x210]
mov rdx, qword [rax]
xor ecx, ecx
call method.fhandler_pty_slave.transfer_input_tty::xfer_dir__void__tty__void_
mov rcx, qword [0x2102ff780]
test rcx, rcx
je 0x2100caed0
call sym.ReleaseMutex
jmp 0x2100caed0
mov ecx, 0xfffffff6
call sym.GetStdHandle
lea rdx, [method.fhandler_base.get_handle__]
mov rsi, rax
mov rax, qword [rbx]
mov rax, qword [rax + 0x280]
cmp rax, rdx
jne 0x2100cb38f
lea rax, [rbx + 0x18]
mov rdx, qword [rbx + 0x1d8]
cmp rsi, qword [rax]
je 0x2100cb1e4
cmp byte [rdx + 0x120], 0
movzx esi, byte [rdx + 0xc8]
jne 0x2100cac47
mov rcx, qword [rbx + 0x1f0]
mov edx, 0xffffffff
call sym.WaitForSingleObject
mov rcx, qword [rbx + 0x1d8]
xor edx, edx
call method.fhandler_pty_slave.close_pseudoconsole_tty__unsigned_int_
mov rcx, qword [rbx + 0x1f0]
call sym.ReleaseMutex
test sil, sil
je 0x2100cac77
mov rax, qword [rbx + 0x1d8]
lea r13, [rsp + 0xa0]
xor r9d, r9d
xor r8d, r8d
mov rcx, r13
mov edx, dword [rax + 0x90]
mov qword [rsp + 0xa0], 0
mov qword [rsp + 0xa8], 0
mov qword [rsp + 0xb0], 0
mov qword [rsp + 0xb8], 0
mov qword [rsp + 0xc0], 0
mov qword [rsp + 0xc8], 0
mov qword [rsp + 0xd0], 0
mov qword [rsp + 0xd8], 0
call method.pinfo.init_int__unsigned_int__void_
mov rax, qword [rsp + 0xc8]
xor edx, edx
mov ecx, 0x40
mov r8d, dword [rax + 0x14]
call sym.OpenProcess
mov r12, rax
test rax, rax
je 0x2100cb282
mov rax, qword [rbx]
lea rsi, [method.fhandler_pty_slave.get_handle_nat__]
mov rax, qword [rax + 0x288]
cmp rax, rsi
jne 0x2100cb361
lea rax, [rbx + 0x210]
mov rcx, qword [rax]
call sym.CloseHandle
mov rax, qword [rbx]
mov rax, qword [rax + 0x288]
cmp rax, rsi
jne 0x2100cb375
lea rsi, [rbx + 0x210]
call sym.GetCurrentProcess
mov r9, rsi
mov rcx, r12
lea rsi, [method.fhandler_pty_slave.get_output_handle_nat__]
mov r8, rax
mov rax, qword [rbx + 0x1d8]
mov rdx, qword [rax + 0x98]
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
call sym.DuplicateHandle
mov rax, qword [rbx]
mov rax, qword [rax + 0x298]
cmp rax, rsi
jne 0x2100cb36b
lea rax, [rbx + 0x208]
mov rcx, qword [rax]
call sym.CloseHandle
mov rax, qword [rbx]
mov rax, qword [rax + 0x298]
cmp rax, rsi
jne 0x2100cb382
lea rsi, [rbx + 0x208]
call sym.GetCurrentProcess
mov rcx, r12
mov r9, rsi
mov r8, rax
mov rax, qword [rbx + 0x1d8]
mov rdx, qword [rax + 0xa8]
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
call sym.DuplicateHandle
mov rcx, r12
call sym.CloseHandle
cmp byte [rsp + 0xb8], 0
je 0x2100cac77
cmp qword [rsp + 0xc8], 0
je 0x2100cac77
mov rcx, r13
call method.pinfo.release__
jmp 0x2100cac77
cmp dword [rdx + 0x124], 1
jne 0x2100cafcb
mov rcx, qword [rbx + 0x1e8]
mov edx, dword [0x21024fa70]
call sym.WaitForSingleObject
mov rcx, qword [0x2102ff780]
test rcx, rcx
je 0x2100cb21a
mov edx, dword [0x21024fa70]
call sym.WaitForSingleObject
mov rax, qword [rbx]
lea rdx, [method.fhandler_pty_slave.get_handle_nat__]
mov r12, qword [rbx + 0x1f8]
mov rsi, qword [rbx + 0x1d8]
mov rax, qword [rax + 0x288]
cmp rax, rdx
jne 0x2100cb476
lea rax, [rbx + 0x210]
mov rdx, qword [rax]
xor ecx, ecx
mov r9, r12
mov r8, rsi
call method.fhandler_pty_slave.transfer_input_tty::xfer_dir__void__tty__void_
mov rcx, qword [0x2102ff780]
test rcx, rcx
je 0x2100cb26a
call sym.ReleaseMutex
mov rcx, qword [rbx + 0x1e8]
call sym.ReleaseMutex
mov rdx, qword [rbx + 0x1d8]
jmp 0x2100cafcb
mov rax, qword [0x21023d810]
movzx r9d, word [rbx + 0x1b0]
lea r12, [rsp + 0xe0]
lea rdx, str..pipemsys__S_pty_d_master_ctl
mov rcx, r12
lea r8, [rax + 0x4210]
call sym.__small_sprintf
call sym.GetCurrentProcessId
mov dword [rsp + 0x30], 0x1f4
lea rdx, [rsp + 0x58]
mov rcx, r12
mov dword [rsp + 0x58], eax
lea rax, [rsp + 0x5c]
lea r9, [rsp + 0x60]
mov r8d, 4
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x38
call sym.CallNamedPipeA
test eax, eax
je 0x2100cb3b7
mov rax, qword [rbx]
lea rdx, [method.fhandler_pty_slave.get_handle_nat__]
mov rax, qword [rax + 0x288]
cmp rax, rdx
jne 0x2100cb462
lea rax, [rbx + 0x210]
mov rcx, qword [rax]
call sym.CloseHandle
mov rax, qword [rsp + 0x60]
lea rdx, [method.fhandler_pty_slave.get_output_handle_nat__]
mov qword [rbx + 0x210], rax
mov rax, qword [rbx]
mov rax, qword [rax + 0x298]
cmp rax, rdx
jne 0x2100cb46c
lea rax, [rbx + 0x208]
mov rcx, qword [rax]
call sym.CloseHandle
mov rax, qword [rsp + 0x70]
mov qword [rbx + 0x208], rax
jmp 0x2100cb1ba
mov rcx, rbx
call rax
jmp 0x2100cb0db
mov rcx, rbx
call rax
jmp 0x2100cb157
mov rcx, rbx
call rax
mov rsi, rax
jmp 0x2100cb0fd
mov rcx, rbx
call rax
mov rsi, rax
jmp 0x2100cb179
mov rcx, rbx
call rax
jmp 0x2100cafbb
mov qword [rsp + 0x48], r8
mov rcx, rbx
mov qword [rsp + 0x40], r9
call rax
mov r8, qword [rsp + 0x48]
mov r9, qword [rsp + 0x40]
jmp 0x2100caf66
cmp byte [rsp + 0xb8], 0
je 0x2100cabd5
cmp qword [rsp + 0xc8], 0
je 0x2100cabd5
mov rcx, r13
call method.pinfo.release__
jmp 0x2100cabd5
mov edx, dword [rcx + 8]
call method.tty.pcon_fg_int_
test al, al
jne 0x2100caf05
mov rax, qword [rbx + 0x1d8]
cmp byte [rax + 0xd0], 0
je 0x2100caf05
mov edx, dword [0x21024fa70]
mov rcx, qword [rbx + 0x1e8]
call sym.WaitForSingleObject
mov ecx, dword [0x21024fa70]
call sym.acquire_attach_mutex_unsigned_int_
mov rax, qword [rbx]
mov r12, qword [rbx + 0x1f8]
mov rcx, rbx
mov rsi, qword [rbx + 0x1d8]
call qword [rax + 0x288]
xor ecx, ecx
mov r9, r12
mov rdx, qword [rax]
mov r8, rsi
call method.fhandler_pty_slave.transfer_input_tty::xfer_dir__void__tty__void_
call sym.release_attach_mutex__
mov rcx, qword [rbx + 0x1e8]
call sym.ReleaseMutex
jmp 0x2100caf05
mov rcx, rbx
call rax
jmp 0x2100cb313
mov rcx, rbx
call rax
jmp 0x2100cb348
mov rcx, rbx
call rax
jmp 0x2100cb249
call sym.GetCurrentProcess
lea r9, [rsp + 0xa0]
mov rcx, r12
mov r8, rax
mov rax, qword [rbx + 0x1d8]
mov rdx, qword [rax + 0x100]
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
call sym.DuplicateHandle
call sym.FreeConsole
mov rax, qword [rbx + 0x1d8]
mov ecx, dword [rax + 0xd4]
call sym.AttachConsole
xor ecx, ecx
call sym.init_console_handler_bool_
mov rcx, qword [rbx + 0x1e8]
mov edx, dword [0x21024fa70]
call sym.WaitForSingleObject
mov r9, qword [rbx + 0x1f8]
mov r8, qword [rbx + 0x1d8]
xor ecx, ecx
mov rdx, qword [rsp + 0xa0]
call method.fhandler_pty_slave.transfer_input_tty::xfer_dir__void__tty__void_
mov rcx, qword [rbx + 0x1e8]
call sym.ReleaseMutex
call sym.FreeConsole
mov ecx, r14d
call sym.AttachConsole
xor ecx, ecx
call sym.init_console_handler_bool_
mov rcx, qword [rsp + 0xa0]
call sym.CloseHandle
jmp 0x2100cae3b
mov rax, qword [0x21024fce8]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov ecx, dword [rax + 0x14]
call method.fhandler_pty_common.get_console_process_id_unsigned_int__bool__bool__bool_
mov r14d, eax
jmp 0x2100cae32