Function at 0x6c5360
Capabilities:
Connect pipe

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
mov r15d, 0x32
mov eax, dword [rdx + 0x2c]
mov r14, rcx
mov r13, rdx
mov qword [rsp + 0x120], r8
cmp eax, 0xff
ja 0x6c5465
cmp eax, 3
mov esi, 3
cmovge esi, eax
movsxd rax, esi
lea rcx, [rax + rax*8 + 4]
call fcn.0069b410
mov rbx, rax
test rax, rax
je 0x6c5980
mov dword [rax], esi
lea edi, [rsi - 1]
xor eax, eax
mov r8, 0xffffffffffffffff
jmp 0x6c53d3
mov rax, rdx
mov byte [rbx + rax + 4], 0
mov ecx, dword [rbx]
lea rdx, [rbx + rax*8]
mov qword [rcx + rdx + 4], r8
lea rdx, [rax + 1]
cmp rdi, rax
jne 0x6c53d0
xor esi, esi
mov edx, esi
cmp dword [r13 + 0x2c], esi
jg 0x6c5418
cmp rsi, 2
jbe 0x6c56c2
lea rax, [rsi + 1]
cmp rdi, rsi
je 0x6c59c8
mov rsi, rax
mov edx, esi
cmp dword [r13 + 0x2c], esi
jle 0x6c53f6
mov rax, rsi
shl rax, 4
add rax, qword [r13 + 0x30]
mov ebp, dword [rax]
mov r12, qword [rax + 8]
mov eax, ebp
and eax, 7
cmp eax, 1
je 0x6c5520
test eax, eax
je 0x6c53f6
cmp eax, 2
je 0x6c54b0
cmp eax, 4
je 0x6c5480
mov r8d, 0x1b7
lea rdx, str.src_win_process_stdio.c
lea rcx, [0x009101f1]
call qword [sym.imp.msvcrt.dll__assert]
mov r15d, 0xffffffff
mov eax, r15d
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, dword [r12 + 0x10]
cmp eax, 0xe
je 0x6c5850
cmp eax, 7
je 0x6c5960
mov r15d, 0x32
mov rcx, rbx
call fcn.006c5310
jmp 0x6c5465
cmp r12d, 0xffffffff
je 0x6c5505
mov ecx, r12d
call qword [sym.imp.msvcrt.dll__get_osfhandle]
lea rdx, [rax - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x6c5940
cmp rax, 0xfffffffffffffffe
je 0x6c5940
lea rdx, [rsp + 0x80]
mov rcx, rax
call fcn.006c5230
mov r8d, eax
test eax, eax
je 0x6c57b0
cmp eax, 6
jne 0x6c59c0
cmp r12d, 2
jg 0x6c59c0
mov byte [rbx + rsi + 4], 0
mov edx, dword [rbx]
lea rax, [rbx + rsi*8]
mov qword [rdx + rax + 4], 0xffffffffffffffff
jmp 0x6c5400
cmp dword [r12 + 0x10], 7
je 0x6c5542
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 [r12 + 0x58]
test al, 0x80
jne 0x6c58c0
test eax, 0x2000000
jne 0x6c58ea
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 0x6c5596
or r8d, 1
or r10d, 0x40000080
mov qword [rsp + 0x20], 0x40
lea r11, [rsp + 0x80]
mov rdx, r12
mov rcx, r14
mov r9, r11
mov dword [rsp + 0x48], r10d
mov qword [rsp + 0x40], r11
call fcn.006ae680
mov r8d, eax
test eax, eax
jne 0x6c5800
mov eax, 0x40000000
and ebp, 0x40
or ebp, dword [r12 + 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 0x6c599a
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 0x6c5700
mov edx, dword [rsp + 0x5c]
test edx, edx
jne 0x6c5790
xor edx, edx
mov rcx, qword [r12 + 0x118]
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x6c5730
test r15d, r15d
je 0x6c569c
or dword [r12 + 0x58], 0x8000
mov eax, dword [rsp + 0x4c]
test eax, eax
je 0x6c56ad
or dword [r12 + 0x58], 0x4000
mov edx, dword [rbx]
lea rax, [rbx + rsi*8]
mov qword [rdx + rax + 4], rbp
mov byte [rbx + rsi + 4], 9
jmp 0x6c5400
cmp edx, 1
mov eax, dword [rbx]
sbb edx, edx
lea rcx, [rax + rsi*8 + 4]
and edx, 0xfffffef3
add edx, 0x120196
add rcx, rbx
call fcn.006c52a0
mov r8d, eax
test eax, eax
jne 0x6c59c0
mov byte [rbx + rsi + 4], 0x41
jmp 0x6c5400
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 0x6c5676
jmp 0x6c5790
mov rdx, qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x40], rdx
call rdx
mov rdx, qword [rsp + 0x40]
cmp eax, 0x217
je 0x6c568e
call rdx
cmp qword [r12 + 0x118], 0xffffffffffffffff
mov r8d, eax
je 0x6c5772
mov rdx, r12
mov rcx, r14
mov dword [rsp + 0x40], eax
call fcn.006af720
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 0x6c5824
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 0x6c5676
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x6c5990
ja 0x6c58b1
test eax, eax
je 0x6c59e0
cmp eax, 1
jne 0x6c5917
mov byte [rbx + rsi + 4], 1
mov edx, dword [rbx]
mov rcx, qword [rsp + 0x80]
lea rax, [rbx + rsi*8]
mov qword [rdx + rax + 4], rcx
jmp 0x6c5400
cmp qword [r12 + 0x118], 0xffffffffffffffff
je 0x6c59c0
mov rdx, r12
mov rcx, r14
mov dword [rsp + 0x40], r8d
call fcn.006af720
mov r8d, dword [rsp + 0x40]
test r8d, r8d
jne 0x6c59c0
mov edx, dword [rbx]
mov rbp, 0xffffffffffffffff
lea rax, [rbx + rsi*8]
mov qword [rdx + rax + 4], rbp
mov byte [rbx + rsi + 4], 9
jmp 0x6c5400
mov rcx, qword [r12 + 0x110]
mov ebp, 0x41
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x6c5497
cmp rcx, 0xfffffffffffffffe
jne 0x6c587c
mov r15d, 6
jmp 0x6c549d
lea rdx, [rsp + 0x80]
call fcn.006c5230
mov r8d, eax
test eax, eax
jne 0x6c59c0
mov edx, dword [rbx]
mov rcx, qword [rsp + 0x80]
lea rax, [rbx + rsi*8]
mov qword [rdx + rax + 4], rcx
mov byte [rbx + rsi + 4], bpl
jmp 0x6c5400
cmp eax, 3
jne 0x6c5910
mov byte [rbx + rsi + 4], 9
jmp 0x6c57e3
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 [r12 + 0x58]
test eax, 0x2000000
je 0x6c555a
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 0x6c555a
cmp eax, 0x8000
je 0x6c5990
mov r8d, 0x189
lea rdx, str.src_win_process_stdio.c
lea rcx, [0x009101f1]
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x6c545f
mov qword [rsp + 0x80], 0xffffffffffffffff
cmp r12d, 2
jle 0x6c5505
jmp 0x6c5871
test byte [r12 + 0x58], 0x80
je 0x6c5497
mov rcx, qword [r12 + 0x118]
mov ebp, 9
jmp 0x6c585d
mov r15d, 0xe
jmp 0x6c5465
mov byte [rbx + rsi + 4], 0x41
jmp 0x6c57e3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp qword [r12 + 0x118], 0xffffffffffffffff
mov r8d, eax
je 0x6c5824
jmp 0x6c580f
mov r15d, r8d
jmp 0x6c549d
mov rax, qword [rsp + 0x120]
xor r15d, r15d
mov qword [rax], rbx
jmp 0x6c5465
mov rbp, qword [sym.imp.KERNEL32.dll_GetLastError]
call rbp
test eax, eax
je 0x6c5990
call rbp
mov rcx, qword [rsp + 0x80]
mov r15d, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x6c549d