Function at 0x140055f30
Capabilities:
Connect pipe
Create pipe

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov qword [rbp - 0x60], 0xfffffffffffffffe
mov qword [rsp + 0x160], rbx
mov rax, qword [0x1401a1e90]
xor rax, rsp
mov qword [rbp], rax
mov r13, rdx
mov r12, rcx
call fcn.1400558e0
test al, al
jne 0x140055f8a
mov edx, reloc.OLEAUT32.dll_LoadRegTypeLib
lea r8d, [rdx + 1]
lea rcx, str._d__d_n
call fcn.1400c4884
xor ebx, ebx
mov qword [rsp + 0x70], rbx
xor eax, eax
mov qword [rsp + 0x78], rax
lea rcx, [rsp + 0x70]
call qword [sym.imp.ole32.dll_CoCreateGuid]
test eax, eax
jns 0x140055fed
lea rax, str.Failure_to_set_pipe_name_0
mov qword [rsp + 0x68], rax
lea rdx, [rsp + 0x68]
lea rcx, [rsp + 0x40]
call fcn.1400c6df8
nop
lea rax, vtable.CRSimpleIPCException.0
mov qword [rsp + 0x40], rax
lea rax, vtable.CRSimpleIPCExceptionServerException.0
mov qword [rsp + 0x40], rax
lea rdx, [0x14016cc60]
lea rcx, [rsp + 0x40]
call fcn.1400cb848
int3
movaps xmm0, xmmword [rsp + 0x70]
movdqa xmmword [rbp - 0x10], xmm0
lea rdx, [rbp - 0x10]
lea rcx, [rbp - 0x38]
call fcn.140055de0
nop
lea r8, [rbp - 0x38]
lea rcx, [rbp - 0x58]
call fcn.1400580d0
nop
lea rcx, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae rcx, qword [rbp - 0x58]
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], 0x2000
mov dword [rsp + 0x20], 0x2000
mov r9d, 1
xor r8d, r8d
mov edx, 0x40000001
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov r15, rax
mov rdi, rax
mov qword [rsp + 0x68], rax
mov ecx, dword [0x1401a9d80]
lea r8d, [rcx + 1]
imul r8d, ecx
mov eax, 0x2aaaaaab
imul r8d
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
lea eax, [rdx + rdx*2]
shl eax, 3
sub r8d, eax
cmp r8d, 0x10
jne 0x14005608e
inc dword [0x1401aa778]
test r15, r15
jne 0x1400560d9
lea rax, str.Failure_to_create_pipes_0
mov qword [rsp + 0x58], rax
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x40]
call fcn.1400c6df8
nop
lea rax, vtable.CRSimpleIPCException.0
mov qword [rsp + 0x40], rax
lea rax, vtable.CRSimpleIPCExceptionServerException.0
mov qword [rsp + 0x40], rax
lea rdx, [0x14016cc60]
lea rcx, [rsp + 0x40]
call fcn.1400cb848
int3
mov qword [rbp - 0x80], rbx
xor eax, eax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
mov qword [rbp - 0x68], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [rax + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rsi, rax
mov qword [rsp + 0x70], rax
mov qword [rbp - 0x68], rax
test rax, rax
jne 0x140056153
lea rax, str.Failure_to_create_pipes_1
mov qword [rsp + 0x58], rax
lea rdx, [rsp + 0x58]
lea rcx, [rsp + 0x40]
call fcn.1400c6df8
nop
lea rax, vtable.CRSimpleIPCException.0
mov qword [rsp + 0x40], rax
lea rax, vtable.CRSimpleIPCExceptionServerException.0
mov qword [rsp + 0x40], rax
lea rdx, [0x14016cc60]
lea rcx, [rsp + 0x40]
call fcn.1400cb848
int3
lea rdx, [rbp - 0x80]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x14005633a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x14005633a
lea rcx, [rbp - 0x58]
cmp qword [rbp - 0x40], 8
cmovae rcx, qword [rbp - 0x58]
mov qword [rsp + 0x30], rbx
mov dword [rsp + 0x28], 0x40000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
mov rbx, rax
mov qword [rsp + 0x58], rax
test rax, rax
jne 0x140056203
lea rax, str.Failure_to_create_pipes_3
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x40]
call fcn.1400c6df8
nop
lea rax, vtable.CRSimpleIPCException.0
mov qword [rsp + 0x40], rax
lea rax, vtable.CRSimpleIPCExceptionServerException.0
mov qword [rsp + 0x40], rax
lea rdx, [0x14016cc60]
lea rcx, [rsp + 0x40]
call fcn.1400cb848
int3
mov edx, 0x7d0
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x14005625c
lea rax, str.Failure_to_create_pipes_4
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x40]
call fcn.1400c6df8
nop
lea rax, vtable.CRSimpleIPCException.0
mov qword [rsp + 0x40], rax
lea rax, vtable.CRSimpleIPCExceptionServerException.0
mov qword [rsp + 0x40], rax
lea rdx, [0x14016cc60]
lea rcx, [rsp + 0x40]
call fcn.1400cb848
int3
lea rax, [rsp + 0x58]
cmp r12, rax
je 0x14005628b
xor ebx, ebx
mov qword [rsp + 0x58], rbx
mov rcx, qword [r12]
cmp r14, rcx
je 0x14005628b
test rcx, rcx
je 0x140056287
cmp rcx, 0xffffffffffffffff
je 0x140056287
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r12], r14
lea rax, [rsp + 0x68]
xor r14d, r14d
cmp r13, rax
je 0x1400562be
mov edi, r14d
mov qword [rsp + 0x68], r14
mov rcx, qword [r13]
cmp r15, rcx
je 0x1400562be
test rcx, rcx
je 0x1400562ba
cmp rcx, 0xffffffffffffffff
je 0x1400562ba
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r13], r15
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1400562d2
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp rsi, 0xffffffffffffffff
je 0x1400562e2
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rax, [rdi - 1]
cmp rax, 0xfffffffffffffffd
ja 0x1400562f6
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp qword [rbp - 0x40], 8
jb 0x140056306
mov rcx, qword [rbp - 0x58]
call fcn.1400c3950
mov qword [rbp - 0x40], 7
mov qword [rbp - 0x48], r14
mov word [rbp - 0x58], r14w
cmp qword [rbp - 0x20], 8
jb 0x140056327
mov rcx, qword [rbp - 0x38]
call fcn.1400c3950
mov qword [rbp - 0x20], 7
mov qword [rbp - 0x28], r14
mov word [rbp - 0x38], r14w
jmp 0x140056380
lea rax, str.Failure_to_create_pipes_2
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x40]
call fcn.1400c6df8
nop
lea rax, vtable.CRSimpleIPCException.0
mov qword [rsp + 0x40], rax
lea rax, vtable.CRSimpleIPCExceptionServerException.0
mov qword [rsp + 0x40], rax
lea rdx, [0x14016cc60]
lea rcx, [rsp + 0x40]
call fcn.1400cb848
nop
mov rcx, qword [rbp]
xor rcx, rsp
call fcn.1400c3970
mov rbx, qword [rsp + 0x160]
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret