Function at 0x180013360
Capabilities:
Connect pipe

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x40], 0xfffffffffffffffe
mov qword [rsp + 0xc8], rbx
mov r12d, edx
mov r14, rcx
cmp byte [rcx + 0x19], 0
jne 0x1800134f3
cmp qword [rcx + 8], 0xffffffffffffffff
je 0x1800133a4
mov al, 1
jmp 0x1800135af
lea rcx, [rbp + 0x50]
call fcn.1800d13b0
mov rbx, rax
lea rcx, [rbp + 0x58]
call fcn.1800d0d60
mov r8, rbx
mov rdx, rax
lea rcx, [rbp + 0x40]
call fcn.1800d0c60
lea r15, [r14 + 0x1b]
mov qword [rbp + 0x58], r15
lea r13, [0x1802bcf68]
mov rdi, qword [rbp + 0x40]
nop dword [rax + rax]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
cmp qword [r14 + 8], 0xffffffffffffffff
jne 0x180013492
mov rbx, qword [r14]
cmp byte [rbx], 0
jne 0x180013402
mov rbx, r13
jmp 0x180013461
mov qword [rbp + 0x40], rbx
lea rcx, [rbp + 0x40]
call fcn.18001b380
or rsi, 0xffffffffffffffff
inc rsi
cmp byte [rbx + rsi], 0
jne 0x180013413
add rsi, 4
mov ecx, 0xfffffffc
and rsi, rcx
mov qword [rbp + 0x40], rbx
lea r8, [rax + 3]
add r8, rsi
lea rdx, [rbp + 0x40]
lea rcx, [rbp - 0x38]
call fcn.180012500
mov rax, qword [rax]
mov qword [r14], rax
movsxd rbx, esi
add rbx, rax
mov qword [rbp + 0x50], rbx
mov qword [rbp + 0x40], rax
lea rdx, [rbp + 0x40]
lea rcx, [rbp + 0x50]
call fcn.18001c460
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x40000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [r14 + 8], rax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp qword [r14 + 8], 0xffffffffffffffff
jne 0x18001339d
cmp byte [r14 + 0x1a], 0
jne 0x1800134ec
test r12d, r12d
js 0x1800134c0
lea rcx, [rbp - 0x30]
call fcn.1800d0d60
cmp qword [rax], rdi
jg 0x1800134ec
mov rcx, qword [0x180423540]
test rcx, rcx
jne 0x1800134dc
mov ecx, 1
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1800133e0
mov edx, 1
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x1800133e0
xor al, al
jmp 0x1800135af
cmp byte [rcx + 0x18], 0
jne 0x1800135aa
xor eax, eax
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [rax + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbp - 8], rax
lea rdx, [rbp - 0x20]
mov rcx, qword [r14 + 8]
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
jne 0x1800135a0
call qword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x217
je 0x18001359b
dec eax
je 0x18001354e
sub eax, 0x1cd
jne 0x1800135a0
cmp byte [r14 + 0x1a], 0
jne 0x180013593
mov rax, qword [rbp - 8]
mov qword [rbp - 0x30], rax
mov rax, qword [r14 + 0x10]
mov qword [rbp - 0x28], rax
or r9d, 0xffffffff
test r12d, r12d
cmovns r9d, r12d
xor r8d, r8d
lea rdx, [rbp - 0x30]
lea ecx, [r8 + 2]
call qword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x180013589
mov al, 1
jmp 0x180013595
mov rcx, qword [r14 + 8]
call qword [sym.imp.KERNEL32.dll_CancelIo]
xor al, al
mov byte [r14 + 0x18], al
jmp 0x1800135a0
mov byte [r14 + 0x18], 1
mov rcx, qword [rbp - 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movzx eax, byte [r14 + 0x18]
mov rbx, qword [rsp + 0xc8]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret