Function at 0x2100c1b90
Capabilities:
Connect pipe
Read pipe
Write file on windows
Write pipe

Disassembly:
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x1b8
lea r12, [0x210273880]
mov rbx, rcx
test byte [0x210273880], 1
jne 0x2100c1f30
cmp byte [0x21024fae6], 0
je 0x2100c1e48
cmp qword [rbx + 0x208], 0
je 0x2100c1e48
mov rax, qword [0x21024fce8]
mov rdx, qword [rbx + 0x1d8]
lea rsi, [rsp + 0xa0]
lea r13, str.virtual_int_fhandler_pty_master::close__
lea rdi, [method.fhandler_pty_common.__release_output_mutex_char_const__int_]
mov eax, dword [rax]
cmp dword [rdx + 0x90], eax
je 0x2100c21c0
mov rax, qword [rbx]
mov rdx, r13
mov r9d, dword [0x21024fa70]
mov rcx, rbx
mov r8d, 0x89a
call qword [rax + 0x370]
mov rax, qword [rbx]
lea rdx, [method.fhandler_termios.get_output_handle__]
mov rax, qword [rax + 0x290]
cmp rax, rdx
jne 0x2100c2040
mov qword [rsp + 0x20], 0
mov rcx, qword [rbx + 0x1d0]
mov r8, rsi
xor edx, edx
mov r9d, 0x38
call sym.NtQueryObject
mov rcx, rbx
mov esi, eax
call method.fhandler_pty_common.close__
mov rax, qword [rbx]
mov rax, qword [rax + 0x378]
cmp rax, rdi
jne 0x2100c2028
mov rcx, qword [rbx + 0x1e0]
call sym.ReleaseMutex
test eax, eax
je 0x2100c1c93
test byte [0x210273880], 1
jne 0x2100c2188
mov rcx, qword [rbx + 0x1e0]
call sym.CloseHandle
test eax, eax
jne 0x2100c1e8f
test byte [0x210273880], 1
jne 0x2100c1e68
test esi, esi
js 0x2100c1ce5
cmp dword [rsp + 0xa8], 1
jne 0x2100c1ce5
mov rax, qword [rbx + 0x1d8]
mov ecx, dword [rax]
test ecx, ecx
jle 0x2100c1cd9
mov edx, 1
call sym.kill_1
mov rcx, qword [rbx + 0x1f8]
call sym.SetEvent
mov rcx, qword [rbx + 0x218]
call sym.CloseHandle
test eax, eax
jne 0x2100c1d02
test byte [0x210273880], 1
jne 0x2100c2158
mov rcx, qword [rbx + 0x220]
call sym.CloseHandle
test eax, eax
jne 0x2100c1d1f
test byte [0x210273880], 1
jne 0x2100c2128
mov qword [rbx + 0x220], 0
mov rcx, qword [rbx + 0x228]
mov qword [rbx + 0x218], 0
call sym.CloseHandle
test eax, eax
jne 0x2100c1d52
test byte [0x210273880], 1
jne 0x2100c20f8
mov qword [rbx + 0x228], 0
mov rcx, qword [rbx + 0x250]
call sym.CloseHandle
test eax, eax
jne 0x2100c1d7a
test byte [0x210273880], 1
jne 0x2100c20c8
mov qword [rbx + 0x250], 0
mov rcx, qword [rbx + 0x238]
call sym.CloseHandle
mov rcx, qword [rbx + 0x240]
call sym.CloseHandle
mov rcx, qword [rbx + 0x230]
mov qword [rbx + 0x240], 0
mov qword [rbx + 0x238], 0
test rcx, rcx
je 0x2100c1ee0
call sym.CloseHandle
cmp qword [0x210272e70], 0
mov qword [rbx + 0x230], 0
je 0x2100c1eee
test byte [0x210273880], 1
jne 0x2100c1fe8
mov rcx, qword [rbx + 0x1f8]
call sym.CloseHandle
test eax, eax
jne 0x2100c1e0b
test byte [0x210273880], 1
jne 0x2100c2098
mov rcx, qword [rbx + 0x258]
call sym.CloseHandle
test eax, eax
jne 0x2100c1e28
test byte [0x210273880], 1
jne 0x2100c2068
mov qword [rbx + 0x258], 0
xor eax, eax
add rsp, 0x1b8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
ret
lea rsi, [rsp + 0xa0]
lea r13, str.virtual_int_fhandler_pty_master::close__
lea rdi, [method.fhandler_pty_common.__release_output_mutex_char_const__int_]
jmp 0x2100c1c03
mov rax, qword [rbx + 0x1e0]
lea r9, str.CloseHandle__output_mutex__p_____E
mov edx, 0x100
mov rcx, r12
lea r8, str.virtual_int_fhandler_pty_master::close__
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
test esi, esi
js 0x2100c1fb0
cmp dword [rsp + 0xa8], 1
jne 0x2100c1ce5
test byte [0x210273880], 1
je 0x2100c1cc2
movzx eax, word [rbx + 0x1b0]
lea r9, str.Closing_last_master_of_pty_d
mov edx, 0x100
mov rcx, r12
lea r8, str.virtual_int_fhandler_pty_master::close__
mov dword [rsp + 0x20], eax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c1cc2
cmp qword [0x210272e70], 0
jne 0x2100c1de1
mov rax, qword [rbx + 0x1d8]
mov rdx, qword [0x21024fce8]
mov eax, dword [rax + 0x90]
cmp eax, dword [rdx]
je 0x2100c1dee
test byte [0x210273880], 1
je 0x2100c1dee
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 0
jmp 0x2100c2001
mov eax, dword [rcx + 0x248]
lea r9, str.closing_from_master_nat__p__from_master__p__to_master_nat__p__to_master__p__since_we_own_them__u_
lea r8, str.virtual_int_fhandler_pty_master::close__
mov edx, 0x100
lea rsi, [rsp + 0xa0]
lea r13, str.virtual_int_fhandler_pty_master::close__
mov dword [rsp + 0x40], eax
mov rax, qword [rcx + 0x250]
lea rdi, [method.fhandler_pty_common.__release_output_mutex_char_const__int_]
mov qword [rsp + 0x38], rax
mov rax, qword [rcx + 0x220]
mov qword [rsp + 0x30], rax
mov rax, qword [rcx + 0x258]
mov qword [rsp + 0x28], rax
mov rax, qword [rcx + 0x218]
mov rcx, r12
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
cmp byte [0x21024fae6], 0
je 0x2100c1c03
jmp 0x2100c1bc3
test byte [0x210273880], 1
je 0x2100c1ce5
mov dword [rsp + 0x20], esi
lea r9, [0x21029576a]
mov edx, 0x40
mov rcx, r12
lea r8, str.virtual_int_fhandler_pty_master::close__
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c1ce5
mov rax, qword [rbx + 0x1d8]
mov eax, dword [rax + 0x90]
mov dword [rsp + 0x20], 1
mov dword [rsp + 0x28], eax
lea r9, str.not_clearing:__d__master_pid__d
lea r8, str.virtual_int_fhandler_pty_master::close__
mov edx, 0x100
mov rcx, r12
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c1dee
mov r8d, 0x89e
mov rdx, r13
mov rcx, rbx
call rax
jmp 0x2100c1c93
mov rcx, rbx
call rax
mov r9d, 0x38
mov r8, rsi
xor edx, edx
mov qword [rsp + 0x20], 0
mov rcx, qword [rax]
jmp 0x2100c1c54
mov rax, qword [rbx + 0x258]
lea r9, str.error_closing_from_master__p___E
mov edx, 0x100
mov rcx, r12
lea r8, str.virtual_int_fhandler_pty_master::close__
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c1e28
mov rax, qword [rbx + 0x1f8]
lea r9, str.CloseHandle__input_available_event__p_____E
mov edx, 0x100
mov rcx, r12
lea r8, str.virtual_int_fhandler_pty_master::close__
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c1e0b
mov rax, qword [rbx + 0x250]
lea r9, str.error_closing_to_master__p___E
mov edx, 0x100
mov rcx, r12
lea r8, str.virtual_int_fhandler_pty_master::close__
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c1d7a
mov rax, qword [rbx + 0x228]
lea r9, str.error_closing_from_slave_nat__p___E
mov edx, 0x100
mov rcx, r12
lea r8, str.virtual_int_fhandler_pty_master::close__
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c1d52
mov rax, qword [rbx + 0x220]
lea r9, str.error_closing_to_master_nat__p___E
mov edx, 0x100
mov rcx, r12
lea r8, str.virtual_int_fhandler_pty_master::close__
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c1d1f
mov rax, qword [rbx + 0x218]
lea r9, str.error_closing_from_master_nat__p___E
mov edx, 0x100
mov rcx, r12
lea r8, str.virtual_int_fhandler_pty_master::close__
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c1d02
mov rax, qword [rbx + 0x1e0]
mov edx, 0x100
mov rcx, r12
mov dword [rsp + 0x20], 0x89e
lea r9, str.__d_:_pty_output_mutex__p__released
lea r8, str.virtual_int_fhandler_pty_master::close__
mov qword [rsp + 0x28], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c1c93
mov rax, qword [0x21023d810]
movzx r9d, word [rbx + 0x1b0]
mov rcx, rsi
lea rdx, str..pipemsys__S_pty_d_master_ctl
mov dword [rsp + 0x58], 0xffffffff
lea rbp, [rsp + 0x5c]
lea r8, [rax + 0x4210]
call sym.__small_sprintf
mov rax, qword [rbx]
mov rdx, r13
mov rcx, rbx
mov r9d, dword [0x21024fa70]
mov r8d, 0x87d
call qword [rax + 0x370]
cmp qword [rbx + 0x208], 0
je 0x2100c227b
mov dword [rsp + 0x30], 0x1f4
lea rdx, [rsp + 0x58]
lea r9, [rsp + 0x60]
mov rcx, rsi
mov qword [rsp + 0x28], rbp
mov r8d, 4
mov dword [rsp + 0x20], 0x38
call sym.CallNamedPipeA
mov rcx, qword [rbx + 0x208]
call sym.CloseHandle
mov rcx, qword [rbx + 0x210]
xor edx, edx
call method.cygthread.detach_void_
mov rax, qword [rbx + 0x1d8]
mov dword [rax + 0x90], 0xffffffff
mov qword [rbx + 0x208], 0
mov rax, qword [rbx]
lea rdi, [method.fhandler_pty_common.__release_output_mutex_char_const__int_]
mov rax, qword [rax + 0x378]
cmp rax, rdi
jne 0x2100c2388
mov rcx, qword [rbx + 0x1e0]
call sym.ReleaseMutex
test eax, eax
je 0x2100c22e0
test byte [0x210273880], 1
je 0x2100c22e0
mov rax, qword [rbx + 0x1e0]
mov edx, 0x100
mov rcx, r12
mov dword [rsp + 0x20], 0x887
lea r9, str.__d_:_pty_output_mutex__p__released
lea r8, str.virtual_int_fhandler_pty_master::close__
mov qword [rsp + 0x28], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
nop dword [rax]
mov rax, qword [rbx + 0x1d8]
mov rcx, qword [rbx + 0x220]
mov r9, rbp
xor r8d, r8d
lea rdx, [0x21029512a]
mov byte [rax + 0x12a], 1
mov qword [rsp + 0x20], 0
call sym.WriteFile
mov rcx, qword [rbx + 0x260]
xor edx, edx
call method.cygthread.detach_void_
mov rcx, qword [rbx + 0x270]
test rcx, rcx
je 0x2100c1c03
call sym.SetEvent
mov rcx, qword [rbx + 0x278]
mov edx, 0xffffffff
call sym.WaitForSingleObject
mov rcx, qword [rbx + 0x278]
call sym.CloseHandle
mov rcx, qword [rbx + 0x270]
call sym.CloseHandle
mov dword [rbx + 0x280], 0
mov qword [rbx + 0x278], 0
mov qword [rbx + 0x270], 0
jmp 0x2100c1c03
mov r8d, 0x887
mov rdx, r13
mov rcx, rbx
call rax
jmp 0x2100c22e0