Function at 0x14016a280
Capabilities:
Connect pipe

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
mov eax, dword [rdx + 0x2c]
mov qword [rsp + 0x120], r8
mov rdi, rdx
mov r8d, 0x32
mov qword [rsp + 0x110], rcx
cmp eax, 0xff
ja 0x14016a331
cmp eax, 3
mov ebx, 3
cmovge ebx, eax
movsxd rsi, ebx
lea rcx, [rsi + rsi*8 + 4]
call fcn.1401419c0
mov r12, rax
test rax, rax
je 0x14016a9e0
mov dword [rax], ebx
xor eax, eax
nop
mov byte [r12 + rax + 4], 0
mov ecx, dword [r12]
lea rdx, [r12 + rax*8]
add rax, 1
mov qword [rcx + rdx + 4], 0xffffffffffffffff
cmp rsi, rax
jne 0x14016a2e0
xor r14d, r14d
xor ebx, ebx
mov edx, ebx
cmp dword [rdi + 0x2c], ebx
jg 0x14016a350
cmp rbx, 2
jbe 0x14016a758
add rbx, 1
add r14, 8
cmp rsi, rbx
jne 0x14016a305
mov rax, qword [rsp + 0x120]
xor r8d, r8d
mov qword [rax], r12
mov eax, r8d
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, rbx
shl rax, 4
add rax, qword [rdi + 0x30]
mov ebp, dword [rax]
mov r13, qword [rax + 8]
mov eax, ebp
and eax, 7
cmp eax, 2
je 0x14016a620
ja 0x14016a528
test eax, eax
je 0x14016a30c
cmp eax, 1
jne 0x14016a6e8
cmp dword [r13 + 0x10], 7
jne 0x14016a5b0
mov eax, dword [r13 + 0x58]
test al, 0x80
jne 0x14016a5d6
test eax, 0x2000000
jne 0x14016a5ff
mov r15d, ebp
mov eax, ebp
and r15d, 0x10
cmp r15d, 1
sbb r10d, r10d
not r10d
and r10d, 0x80000100
cmp r15d, 1
sbb r8d, r8d
not r8d
and r8d, 3
and eax, 0x20
mov dword [rsp + 0x4c], eax
je 0x14016a3e0
or r8d, 1
or r10d, 0x40000080
lea r11, [rsp + 0x80]
mov rcx, qword [rsp + 0x110]
mov rdx, r13
mov dword [rsp + 0x48], r10d
mov qword [rsp + 0x20], 0x40
mov r9, r11
mov qword [rsp + 0x40], r11
call fcn.140152ed0
mov r8d, eax
test eax, eax
jne 0x14016a9a0
mov eax, 0x40000000
and ebp, 0x40
or ebp, dword [r13 + 0x110]
mov r10d, dword [rsp + 0x48]
cmovne ebp, eax
mov r11, qword [rsp + 0x40]
mov dword [rsp + 0x60], 0x18
lea r9, [rsp + 0x60]
mov qword [rsp + 0x68], 0
mov edx, r10d
mov dword [rsp + 0x28], ebp
mov rcx, r11
mov dword [rsp + 0x70], 1
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x14016aa18
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x5c]
mov rcx, rax
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_GetNamedPipeHandleStateA]
cmp eax, 1
jne 0x14016a830
mov edx, dword [rsp + 0x5c]
test edx, edx
jne 0x14016a8e0
xor edx, edx
mov rcx, qword [r13 + 0x118]
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x14016a880
test r15d, r15d
je 0x14016a4e8
or dword [r13 + 0x58], 0x8000
mov eax, dword [rsp + 0x4c]
test eax, eax
je 0x14016a4f8
or dword [r13 + 0x58], 0x4000
mov edx, dword [r12]
lea rax, [r12 + r14]
add r14, 8
mov qword [rdx + rax + 4], rbp
mov byte [r12 + rbx + 4], 9
add rbx, 1
cmp rsi, rbx
jne 0x14016a305
jmp 0x14016a323
cmp eax, 4
jne 0x14016a6e8
mov eax, dword [r13 + 0x10]
cmp eax, 0xe
je 0x14016a7f8
cmp eax, 7
je 0x14016a860
mov r8d, 0x32
mov eax, dword [r12]
test eax, eax
jle 0x14016a591
lea esi, [rax - 1]
mov rdi, qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov ebp, r8d
shl rsi, 3
jmp 0x14016a578
mov eax, dword [r12]
add rbx, 8
lea rdx, [r12 + rbx]
mov rcx, qword [rax + rdx + 4]
cmp rcx, 0xffffffffffffffff
je 0x14016a589
call rdi
cmp rsi, rbx
jne 0x14016a570
mov r8d, ebp
mov rcx, r12
mov dword [rsp + 0x40], r8d
call fcn.1401419e0
mov r8d, dword [rsp + 0x40]
jmp 0x14016a331
mov r8d, 0x14f
lea rdx, str.src_win_process_stdio.c
lea rcx, str.fdopt.data.stream__type__UV_NAMED_PIPE
call qword [sym.imp.msvcrt.dll__assert]
mov eax, dword [r13 + 0x58]
test al, 0x80
je 0x14016a399
mov r8d, 0x150
lea rdx, str.src_win_process_stdio.c
lea rcx, str.__fdopt.data.stream__flags__UV_HANDLE_CONNECTION_
call qword [sym.imp.msvcrt.dll__assert]
mov eax, dword [r13 + 0x58]
test eax, 0x2000000
je 0x14016a3a4
mov r8d, 0x151
lea rdx, str.src_win_process_stdio.c
lea rcx, str.__fdopt.data.stream__flags__UV_HANDLE_PIPESERVER_
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x14016a3a4
cmp r13d, 0xffffffff
je 0x14016a726
mov ecx, r13d
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov r15, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14016a710
cmp r15, 0xfffffffffffffffe
je 0x14016a710
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x30], 2
mov rdx, r15
lea r9, [rsp + 0x80]
mov dword [rsp + 0x28], 1
mov rcx, rax
mov r8, rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x14016aa30
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x14016a98b
ja 0x14016a970
test eax, eax
je 0x14016aa90
mov byte [r12 + rbx + 4], 1
mov edx, dword [r12]
mov rcx, qword [rsp + 0x80]
lea rax, [r12 + r14]
add rbx, 1
add r14, 8
mov qword [rdx + rax + 4], rcx
cmp rsi, rbx
jne 0x14016a305
jmp 0x14016a323
mov r8d, 0x1b7
lea rdx, str.src_win_process_stdio.c
lea rcx, [0x140474881]
call qword [sym.imp.msvcrt.dll__assert]
mov r8d, 0xffffffff
jmp 0x14016a331
mov qword [rsp + 0x80], 0xffffffffffffffff
cmp r13d, 2
jg 0x14016a81c
mov byte [r12 + rbx + 4], 0
mov edx, dword [r12]
lea rax, [r12 + r14]
add rbx, 1
add r14, 8
mov qword [rdx + rax + 4], 0xffffffffffffffff
cmp rsi, rbx
jne 0x14016a305
jmp 0x14016a323
mov eax, dword [r12]
cmp edx, 1
mov dword [rsp + 0x80], 0x18
lea r9, [rsp + 0x80]
sbb edx, edx
mov r8d, 3
mov qword [rsp + 0x88], 0
lea rcx, [0x140474790]
and edx, 0xfffffef3
lea rbp, [r14 + rax + 4]
mov dword [rsp + 0x90], 1
add edx, 0x120196
add rbp, r12
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x14016aac0
mov qword [rbp], rax
mov byte [r12 + rbx + 4], 0x41
add rbx, 1
add r14, 8
cmp rsi, rbx
jne 0x14016a305
jmp 0x14016a323
mov r13, qword [r13 + 0x110]
mov ebp, 0x41
lea rax, [r13 - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14016a547
cmp r13, 0xfffffffffffffffe
jne 0x14016a8ff
mov r8d, 6
jmp 0x14016a54d
lea rdx, str.src_win_process_stdio.c
mov r8d, 0x9e
lea rcx, str.r__TRUE
call qword [sym.imp.msvcrt.dll__assert]
mov edx, dword [rsp + 0x5c]
test edx, edx
je 0x14016a4c4
jmp 0x14016a8e0
test byte [r13 + 0x58], 0x80
je 0x14016a547
mov r13, qword [r13 + 0x118]
mov ebp, 9
jmp 0x14016a804
mov rdx, qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x40], rdx
call rdx
mov rdx, qword [rsp + 0x40]
cmp eax, 0x217
je 0x14016a4db
call rdx
cmp qword [r13 + 0x118], 0xffffffffffffffff
mov r8d, eax
je 0x14016a8c6
mov rcx, qword [rsp + 0x110]
mov rdx, r13
mov dword [rsp + 0x40], eax
call fcn.140153ff0
mov r8d, dword [rsp + 0x40]
mov dword [rsp + 0x40], r8d
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rsp + 0x40]
jmp 0x14016a9c8
mov r8d, 0x9f
lea rdx, str.src_win_process_stdio.c
lea rcx, str.mode___PIPE_READMODE_BYTE__PIPE_WAIT_
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x14016a4c4
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x30], 2
mov rdx, r13
lea r9, [rsp + 0x80]
mov dword [rsp + 0x28], 1
mov rcx, rax
mov r8, rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x14016a9f0
mov edx, dword [r12]
mov rcx, qword [rsp + 0x80]
lea rax, [r12 + r14]
add r14, 8
mov qword [rdx + rax + 4], rcx
mov byte [r12 + rbx + 4], bpl
add rbx, 1
cmp rsi, rbx
jne 0x14016a305
jmp 0x14016a323
cmp eax, 3
jne 0x14016a980
mov byte [r12 + rbx + 4], 9
jmp 0x14016a6b6
cmp eax, 0x8000
jne 0x14016aa68
mov byte [r12 + rbx + 4], 0x41
jmp 0x14016a6b6
cmp qword [r13 + 0x118], 0xffffffffffffffff
je 0x14016a54d
mov rcx, qword [rsp + 0x110]
mov rdx, r13
mov dword [rsp + 0x40], r8d
call fcn.140153ff0
mov r8d, dword [rsp + 0x40]
test r8d, r8d
jne 0x14016a54d
mov rbp, 0xffffffffffffffff
jmp 0x14016a4f8
mov r8d, 0xe
jmp 0x14016a331
mov qword [rsp + 0x80], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
test eax, eax
je 0x14016a93c
jmp 0x14016a54d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp qword [r13 + 0x118], 0xffffffffffffffff
mov r8d, eax
je 0x14016a9c8
jmp 0x14016a9ae
mov qword [rsp + 0x80], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
test eax, eax
je 0x14016a68b
cmp eax, 6
jne 0x14016a54d
cmp r13d, 2
jle 0x14016a726
jmp 0x14016a54d
mov r8d, 0x189
lea rdx, str.src_win_process_stdio.c
lea rcx, [0x140474881]
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x14016a702
mov rbp, qword [sym.imp.KERNEL32.dll_GetLastError]
call rbp
test eax, eax
je 0x14016a98b
call rbp
mov rcx, qword [rsp + 0x80]
mov dword [rsp + 0x40], eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rsp + 0x40]
jmp 0x14016a54d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
test eax, eax
je 0x14016a7d9
jmp 0x14016a54d