Function at 0x18009dbe0
Capabilities:
Connect pipe
Create pipe

Disassembly:
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x40
cmp dword [rcx + 0x134], 1
mov rdi, rdx
mov rsi, rcx
je 0x18009dc19
test rdx, rdx
je 0x18009dc0c
mov edx, 0xffffffff
lea rcx, str.Cannot_call_Listen_on_a_client_connection
call rdi
xor al, al
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
cmp byte [rcx + 0x130], 0
je 0x18009dc2f
mov al, 1
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret
mov qword [rsp + 0x50], rbx
mov edx, 0x40080003
mov qword [rsp + 0x58], rbp
mov eax, 0x40000003
mov qword [rsp + 0x60], r14
mov r9d, 0xff
lea r14, [rcx + 0x128]
mov r8d, 8
mov rbx, qword [r14]
cmp rbx, 0xffffffffffffffff
cmovne edx, eax
xor ebp, ebp
mov qword [rsp + 0x38], rbp
mov dword [rsp + 0x30], ebp
mov dword [rsp + 0x28], 0x4000
mov dword [rsp + 0x20], 0x4000
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov qword [rsi + 0x120], rax
cmp rax, 0xffffffffffffffff
jne 0x18009dcb2
test rdi, rdi
je 0x18009dd9d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_create_an_instance_of_a_named_pipe.
call rdi
jmp 0x18009dd9d
cmp rbx, 0xffffffffffffffff
jne 0x18009dd17
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdx, qword [rsi + 0x120]
mov r9, r14
mov dword [rsp + 0x30], 2
mov rcx, rax
mov dword [rsp + 0x28], ebp
mov r8, rbx
mov dword [rsp + 0x20], ebp
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x18009dd10
test rdi, rdi
je 0x18009dd9d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_ownership_sentinel.
call rdi
jmp 0x18009dd9d
lea r14, [rsi + 0x128]
xor r9d, r9d
xor r8d, r8d
mov edx, 1
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rsi + 0x118], rax
test rax, rax
jne 0x18009dd4e
test rdi, rdi
je 0x18009dd9d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_create_overlap_event
call rdi
jmp 0x18009dd9d
mov rcx, qword [rsi + 0x120]
lea rdx, [rsi + 0x100]
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x18009de8c
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x217
je 0x18009de8c
cmp eax, 0x3e5
je 0x18009de8c
test rdi, rdi
je 0x18009dd9d
mov edx, eax
lea rcx, str.A_client_process_failed_to_connect.
call rdi
lea r14, [rsi + 0x128]
mov rcx, qword [r14]
cmp rcx, 0xffffffffffffffff
je 0x18009ddd0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 1
jne 0x18009ddba
mov qword [r14], 0xffffffffffffffff
jmp 0x18009ddd0
test rdi, rdi
je 0x18009ddd0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_IPC_ownership_sentinel_handle
call rdi
mov rcx, qword [rsi + 0x120]
cmp rcx, 0xffffffffffffffff
je 0x18009de3a
cmp dword [rsi + 0x134], 1
jne 0x18009de07
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
cmp eax, 1
je 0x18009de07
test rdi, rdi
je 0x18009de07
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_disconnect_NamedPipe
call rdi
mov rcx, qword [rsi + 0x120]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 1
je 0x18009de2f
test rdi, rdi
je 0x18009de2f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_close_pipe_handle
call rdi
mov qword [rsi + 0x120], 0xffffffffffffffff
mov rcx, qword [rsi + 0x118]
cmp rcx, 0xffffffffffffffff
je 0x18009de88
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 1
je 0x18009de68
test rdi, rdi
je 0x18009de68
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_close_overlap_event_handle
call rdi
mov qword [rsi + 0x100], rbp
mov qword [rsi + 0x108], rbp
mov qword [rsi + 0x110], rbp
mov qword [rsi + 0x118], 0xffffffffffffffff
xor al, al
jmp 0x18009de95
mov byte [rsi + 0x130], 1
mov al, 1
mov r14, qword [rsp + 0x60]
mov rbp, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rdi
ret