Function at 0x2100c27c0
Capabilities:
Check if file exists
Connect pipe
Read pipe
Write pipe

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x258
lea rdx, [rcx + 0x1e8]
lea rbx, [rsp + 0x70]
mov r15, rcx
mov qword [rsp + 0x130], 0
mov qword [rsp + 0xf0], rdx
lea rdx, [rcx + 0x200]
lea rax, [rcx + 0x1f8]
mov qword [rsp + 0xf8], rdx
lea rdx, [rcx + 0x1e0]
lea rdi, [rsp + 0x78]
mov qword [rsp + 0x100], rdx
lea rdx, [rsp + 0x68]
lea rbp, [rsp + 0x80]
mov qword [rsp + 0x110], rdx
lea r12, [rsp + 0x88]
lea rdx, [rcx + 0x1f0]
mov rcx, rbx
lea rsi, [rsp + 0xe0]
mov qword [rsp + 0x128], rdx
mov qword [rsp + 0xe0], rbx
mov rdx, rsi
mov qword [rsp + 0xe8], rax
mov qword [rsp + 0x108], rbp
mov qword [rsp + 0x118], r12
mov qword [rsp + 0x120], rdi
jmp 0x2100c288f
mov rcx, rax
mov rax, qword [rdx + 8]
mov qword [rcx], 0
add rdx, 8
test rax, rax
jne 0x2100c2888
movzx eax, word [r15 + 0x1b0]
mov rdx, qword [0x21025fe48]
mov rcx, r15
imul rax, rax, 0x138
lea rax, [rdx + rax + 8]
xor edx, edx
mov qword [r15 + 0x1d8], rax
call method.fhandler_termios.tcinit_bool_
mov rax, qword [0x21025fe48]
movzx edx, word [r15 + 0x1b0]
lea rcx, [rax + 8]
call method.tty_list.attach_int_
mov rcx, qword [r15 + 0x1d8]
mov r8d, 0x2000000
lea rdx, str.cygtty.output.mutex
call method.tty.open_mutex_char_const__unsigned_int_
mov qword [r15 + 0x1e0], rax
test rax, rax
je 0x2100c2c50
mov rcx, qword [r15 + 0x1d8]
mov r8d, 0x2000000
lea rdx, str.cygtty.input.mutex
call method.tty.open_mutex_char_const__unsigned_int_
mov qword [r15 + 0x1e8], rax
test rax, rax
je 0x2100c2bc0
mov rcx, qword [r15 + 0x1d8]
mov r8d, 0x2000000
lea rdx, str.cygtty.pcon.mutex
call method.tty.open_mutex_char_const__unsigned_int_
mov qword [r15 + 0x1f0], rax
test rax, rax
je 0x2100c2cf0
movzx r8d, word [r15 + 0x1b0]
lea r14, [rsp + 0x140]
lea rdx, str.cygtty.input.avail
mov rcx, r14
call sym.shared_name_char__char_const__int_
mov r8, r14
mov edx, 1
mov ecx, 0x2000000
call sym.OpenEventA
mov qword [r15 + 0x1f8], rax
test rax, rax
je 0x2100c2d40
lea r13, [rsp + 0x90]
mov edx, 0x28
mov qword [rsp + 0x90], 0
mov rcx, r13
mov qword [rsp + 0x48], r13
mov dword [rsp + 0x98], 0
call method.security_descriptor.malloc_unsigned_long_
mov rcx, qword [rsp + 0x90]
mov edx, 1
call sym.RtlCreateSecurityDescriptor
mov rax, qword [0x21024fce8]
mov r9, r13
mov r8d, 0x2190
mov dword [rsp + 0xa0], 0x18
mov edx, dword [rax + 0xfc1c]
mov ecx, dword [rax + 0xfc18]
mov qword [rsp + 0xa8], 0
mov dword [rsp + 0xb0], 1
call sym.create_object_sd_from_attribute_unsigned_int__unsigned_int__unsigned_int__security_descriptor_
test eax, eax
jne 0x2100c2a39
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0xa8], rax
mov rax, qword [r15]
mov r8d, 0x347
mov rcx, r15
mov r9d, dword [0x21024fa70]
lea rdx, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
call qword [rax + 0x370]
lea rax, [rsp + 0xa0]
mov rcx, qword [r15 + 0x1d8]
mov rdx, rax
mov qword [rsp + 0x50], rax
call method.tty.create_inuse__SECURITY_ATTRIBUTES_
lea rdx, [method.fhandler_pty_common.__release_output_mutex_char_const__int_]
mov qword [r15 + 0x200], rax
mov rax, qword [r15 + 0x1d8]
mov byte [rax + 0x130], 1
mov rax, qword [r15]
mov rax, qword [rax + 0x378]
cmp rax, rdx
jne 0x2100c2e29
mov rcx, qword [r15 + 0x1e0]
lea r13, [0x210273880]
call sym.ReleaseMutex
test eax, eax
je 0x2100c2ac8
test byte [0x210273880], 1
jne 0x2100c3094
mov rcx, qword [rsp + 0x48]
call method.security_descriptor.free__
mov rax, qword [r15 + 0x1d8]
cmp qword [rax + 0x98], 0
je 0x2100c2d08
cmp qword [rax + 0xa0], 0
je 0x2100c2d08
cmp qword [rax + 0xa8], 0
je 0x2100c2d08
cmp qword [rax + 0xb0], 0
je 0x2100c2d08
mov edx, dword [rax + 0x90]
mov rax, qword [0x21024fce8]
cmp dword [rax], edx
jne 0x2100c2d53
test byte [0x210273880], 1
jne 0x2100c2ee2
call sym.GetCurrentProcess
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x58], 0
je 0x2100c2f3e
call sym.GetCurrentProcess
mov rcx, qword [rsp + 0x58]
mov r9, rbx
mov r8, rax
mov rax, qword [r15 + 0x1d8]
mov rdx, qword [rax + 0x98]
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
call sym.DuplicateHandle
test eax, eax
jne 0x2100c2e47
test byte [0x210273880], 1
jne 0x2100c317d
call sym.GetLastError
mov edx, 0x379
lea rcx, str._usr_src_MSYS2_packages_msys2_runtime_src_msys2_runtime_winsup_cygwin_fhandler_tty.cc
mov r8d, eax
call sym.seterrno_from_win_error_char_const__int__unsigned_int_
jmp 0x2100c2c15
lea rdi, str.open_input_mutex_failed___E
lea r13, [0x210273880]
call sym.GetLastError
cmp eax, 2
je 0x2100c2c6c
call sym.GetLastError
mov edx, 0x3ec
lea rcx, str._usr_src_MSYS2_packages_msys2_runtime_src_msys2_runtime_winsup_cygwin_fhandler_tty.cc
mov r8d, eax
call sym.seterrno_from_win_error_char_const__int__unsigned_int_
test byte [0x210273880], 1
je 0x2100c2c15
jmp 0x2100c2c9a
mov rbx, qword [rsi + 8]
add rsi, 8
test rbx, rbx
je 0x2100c2c34
mov rcx, qword [rbx]
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x2100c2c08
call sym.CloseHandle
mov rbx, qword [rsi + 8]
add rsi, 8
test rbx, rbx
jne 0x2100c2c15
xor eax, eax
add rsp, 0x258
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdi, str.open_output_mutex_failed___E
lea r13, [0x210273880]
call sym.GetLastError
cmp eax, 2
jne 0x2100c2bdc
test byte [0x210273880], 1
jne 0x2100c2cb6
mov rax, qword [sym.msys_2.0.dll__impure_ptr]
mov dword [rax], 6
call sym.msys_2.0.dll___errno
mov dword [rax], 6
test byte [0x210273880], 1
je 0x2100c2c15
mov r9, rdi
lea r8, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
mov edx, 0x100
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c2c15
mov dword [rsp + 0x30], 6
mov edx, 0x40
mov rcx, r13
lea rax, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
mov dword [rsp + 0x28], 0x3ea
lea r9, [0x210295454]
lea r8, [0x210295470]
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c2c75
lea rdi, str.open_pcon_mutex_failed___E
lea r13, [0x210273880]
jmp 0x2100c2bce
test byte [0x210273880], 1
jne 0x2100c2f02
mov rax, qword [sym.msys_2.0.dll__impure_ptr]
lea rdi, str.pty_handles_have_been_closed
mov dword [rax], 0xd
call sym.msys_2.0.dll___errno
mov dword [rax], 0xd
jmp 0x2100c2bf5
lea rdi, str.open_input_event_failed___E
lea r13, [0x210273880]
jmp 0x2100c2bce
mov rcx, qword [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
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]
test rax, rax
je 0x2100c2eb5
mov r8d, dword [rax + 0x14]
xor edx, edx
mov ecx, 0x40
call sym.OpenProcess
mov qword [rsp + 0x68], rax
test rax, rax
je 0x2100c2dfb
test byte [0x210273880], 1
jne 0x2100c3240
cmp byte [rsp + 0xb8], 0
je 0x2100c2e1a
cmp qword [rsp + 0xc8], 0
je 0x2100c2e1a
mov rcx, qword [rsp + 0x50]
call method.pinfo.release__
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x58], rax
jmp 0x2100c2b42
mov r8d, 0x34a
lea rdx, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
mov rcx, r15
call rax
lea r13, [0x210273880]
jmp 0x2100c2ac8
call sym.GetCurrentProcess
mov rcx, qword [rsp + 0x58]
mov r9, rdi
mov r8, rax
mov rax, qword [r15 + 0x1d8]
mov rdx, qword [rax + 0xa0]
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
call sym.DuplicateHandle
test eax, eax
jne 0x2100c30c8
test byte [0x210273880], 1
jne 0x2100c3203
call sym.GetLastError
mov edx, 0x384
lea rcx, str._usr_src_MSYS2_packages_msys2_runtime_src_msys2_runtime_winsup_cygwin_fhandler_tty.cc
mov r8d, eax
call sym.seterrno_from_win_error_char_const__int__unsigned_int_
jmp 0x2100c2c15
test byte [0x210273880], 1
je 0x2100c2e1a
lea r9, str._couldnt_find_pty_master
lea r8, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
mov edx, 0x100
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c2dfb
lea r9, str.dup_handles_within_myself.
lea r8, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
mov edx, 0x100
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c2b33
mov dword [rsp + 0x30], 0xd
mov edx, 0x40
mov rcx, r13
lea rax, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
mov dword [rsp + 0x28], 0x351
lea r9, [0x210295454]
lea r8, [0x210295470]
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c2d15
call sym.GetCurrentProcessId
movzx r9d, word [r15 + 0x1b0]
lea rdx, str..pipemsys__S_pty_d_master_ctl
mov rcx, r14
mov dword [rsp + 0x64], eax
mov rax, qword [0x21023d810]
lea r8, [rax + 0x4210]
call sym.__small_sprintf
test byte [0x210273880], 1
jne 0x2100c31c6
mov rax, qword [rsp + 0x48]
mov dword [rsp + 0x30], 0x1f4
lea rdx, [rsp + 0x64]
mov rcx, r14
mov dword [rsp + 0x20], 0x38
mov r9, qword [rsp + 0x50]
mov r8d, 4
mov qword [rsp + 0x28], rax
call sym.CallNamedPipeA
test eax, eax
je 0x2100c31ba
mov rdx, qword [rsp + 0xa8]
mov rax, qword [rsp + 0xa0]
mov rcx, qword [rsp + 0xb0]
mov r8, qword [rsp + 0xb8]
test rdx, rdx
mov qword [rsp + 0x78], rdx
sete dl
test rax, rax
mov qword [rsp + 0x80], rcx
sete r9b
mov qword [rsp + 0x70], rax
or edx, r9d
test rcx, rcx
mov qword [rsp + 0x88], r8
sete cl
or dl, cl
jne 0x2100c31eb
test r8, r8
je 0x2100c31eb
test byte [0x210273880], 1
jne 0x2100c3260
mov qword [r15 + 0x210], rax
mov rax, qword [rsp + 0x78]
mov qword [r15 + 0x18], rax
mov rax, qword [rsp + 0x80]
mov qword [r15 + 0x208], rax
mov rax, qword [rsp + 0x88]
mov qword [r15 + 0x1d0], rax
mov rax, qword [0x21024fce8]
cmp word [rax + 0xfc2a], 3
je 0x2100c348d
mov rax, qword [r15 + 0x1d8]
mov edx, dword [rax + 0x114]
test edx, edx
jne 0x2100c336a
mov byte [rax + 0x112], 1
movzx eax, word [r15 + 8]
mov word [r15 + 0xc], ax
mov eax, 1
jmp 0x2100c2c36
mov rax, qword [r15 + 0x1e0]
mov edx, 0x100
mov rcx, r13
mov dword [rsp + 0x20], 0x34a
lea r9, str.__d_:_pty_output_mutex__p__released
lea r8, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
mov qword [rsp + 0x28], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c2ac8
call sym.GetCurrentProcess
mov r14, qword [rsp + 0x58]
mov r9, rbp
lea rdi, str.cant_duplicate_output___E
mov r8, rax
mov rax, qword [r15 + 0x1d8]
mov rcx, r14
mov rdx, qword [rax + 0xa8]
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
call sym.DuplicateHandle
test eax, eax
je 0x2100c2bce
call sym.GetCurrentProcess
mov r9, r12
mov rcx, r14
lea rdi, str.cant_duplicate_output_for_cygwin___E
mov r8, rax
mov rax, qword [r15 + 0x1d8]
mov rdx, qword [rax + 0xb0]
mov dword [rsp + 0x30], 2
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 0
call sym.DuplicateHandle
test eax, eax
je 0x2100c2bce
call sym.GetCurrentProcess
mov rcx, r14
cmp r14, rax
je 0x2100c352c
call sym.CloseHandle
mov rax, qword [rsp + 0x70]
jmp 0x2100c3014
mov rax, qword [r15 + 0x1d8]
lea r9, str.cant_duplicate_input_from__u__p___E
lea r8, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
mov rcx, r13
mov rdx, qword [rax + 0x98]
mov qword [rsp + 0x28], rdx
mov eax, dword [rax + 0x90]
mov edx, 0x100
mov dword [rsp + 0x20], eax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c2b9e
lea rdi, str.cant_call_master___E
jmp 0x2100c2bce
mov qword [rsp + 0x20], r14
lea r9, str.dup_handles_via_master_control_pipe__s
mov edx, 0x100
mov rcx, r13
lea r8, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c2f79
mov ecx, dword [rsp + 0xd0]
lea rdi, str.error_duplicating_pipes___E
call sym.SetLastError
jmp 0x2100c2bce
mov rax, qword [r15 + 0x1d8]
lea r9, str.cant_duplicate_input_from__u__p___E
lea r8, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
mov rcx, r13
mov rdx, qword [rax + 0xa0]
mov qword [rsp + 0x28], rdx
mov eax, dword [rax + 0x90]
mov edx, 0x100
mov dword [rsp + 0x20], eax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c2e97
lea r9, str.dup_handles_directly_since_Im_the_owner
lea r8, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
mov edx, 0x100
mov rcx, r13
call method.strace.prntf_unsigned_int__char_const__char_const__..._
jmp 0x2100c2dfb
mov qword [rsp + 0x28], rax
mov rax, qword [r15 + 0x1d8]
mov edx, 0x100
mov rcx, r13
lea r9, str.duplicated_from_master_nat__p___p_from_pty_owner
lea r8, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
mov rax, qword [rax + 0x98]
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
test byte [0x210273880], 1
je 0x2100c3360
mov rax, qword [rsp + 0x78]
lea r9, str.duplicated_from_master__p___p_from_pty_owner
mov edx, 0x100
mov rcx, r13
lea r8, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
mov qword [rsp + 0x28], rax
mov rax, qword [r15 + 0x1d8]
mov rax, qword [rax + 0xa0]
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
test byte [0x210273880], 1
je 0x2100c3360
mov rax, qword [rsp + 0x80]
lea r9, str.duplicated_to_master_nat__p___p_from_pty_owner
mov edx, 0x100
mov rcx, r13
lea r8, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
mov qword [rsp + 0x28], rax
mov rax, qword [r15 + 0x1d8]
mov rax, qword [rax + 0xa8]
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
test byte [0x210273880], 1
je 0x2100c3360
mov rax, qword [rsp + 0x88]
lea r9, str.duplicated_to_master__p___p_from_pty_owner
mov edx, 0x100
mov rcx, r13
lea r8, str.virtual_int_fhandler_pty_slave::open_int__mode_t_
mov qword [rsp + 0x28], rax
mov rax, qword [r15 + 0x1d8]
mov rax, qword [rax + 0xb0]
mov qword [rsp + 0x20], rax
call method.strace.prntf_unsigned_int__char_const__char_const__..._
mov rax, qword [rsp + 0x70]
jmp 0x2100c3021
mov rdi, qword [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0xa0], 0
mov qword [rsp + 0xa8], 0
mov qword [rsp + 0xb0], 0
mov rcx, rdi
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_
cmp byte [rsp + 0xb8], 0
mov rbx, qword [rsp + 0xc8]
je 0x2100c33fc
test rbx, rbx
je 0x2100c3401
mov rcx, rdi
call method.pinfo.release__
test rbx, rbx
jne 0x2100c3455
mov rax, qword [r15 + 0x1d8]
jmp 0x2100c3079
lea rcx, str.ConEmuPID
call sym.msys_2.0.dll_getenv
cmp byte [rsp + 0xb8], 0
mov rbx, rax
je 0x2100c343b
cmp qword [rsp + 0xc8], 0
je 0x2100c343b
mov rcx, qword [rsp + 0x50]
call method.pinfo.release__
test rbx, rbx
je 0x2100c3401
mov rax, qword [0x21024fce8]
cmp word [rax + 0xfc2a], 3
jne 0x2100c3064
mov rcx, qword [0x2102ff780]
test rcx, rcx
je 0x2100c346c
mov edx, dword [0x21024fa70]
call sym.WaitForSingleObject
xor ecx, ecx
call method.fhandler_console.need_invisible_bool_
mov rcx, qword [0x2102ff780]
test rcx, rcx
je 0x2100c3080
call sym.ReleaseMutex
jmp 0x2100c3080
mov edx, dword [rax + 8]
mov rcx, qword [rsp + 0x50]
xor r9d, r9d
xor r8d, r8d
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_
cmp qword [rsp + 0xc8], 0
je 0x2100c340d
cmp byte [rsp + 0xb8], 0
je 0x2100c3401
mov rcx, qword [rsp + 0x50]
call method.pinfo.release__
jmp 0x2100c3401
mov rax, qword [rsp + 0x70]
jmp 0x2100c3014