Function at 0x6ec780
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 0x6ec885
cmp eax, 3
mov esi, 3
cmovge esi, eax
movsxd rax, esi
lea rcx, [rax + rax*8 + 4]
call fcn.006c2830
mov rbx, rax
test rax, rax
je 0x6ecda0
mov dword [rax], esi
lea edi, [rsi - 1]
xor eax, eax
mov r8, 0xffffffffffffffff
jmp 0x6ec7f3
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 0x6ec7f0
xor esi, esi
mov edx, esi
cmp dword [r13 + 0x2c], esi
jg 0x6ec838
cmp rsi, 2
jbe 0x6ecae2
lea rax, [rsi + 1]
cmp rdi, rsi
je 0x6ecde8
mov rsi, rax
mov edx, esi
cmp dword [r13 + 0x2c], esi
jle 0x6ec816
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 0x6ec940
test eax, eax
je 0x6ec816
cmp eax, 2
je 0x6ec8d0
cmp eax, 4
je 0x6ec8a0
mov r8d, 0x1b7
lea rdx, str.src_win_process_stdio.c
lea rcx, [0x00d145f1]
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 0x6ecc70
cmp eax, 7
je 0x6ecd80
mov r15d, 0x32
mov rcx, rbx
call fcn.006ec730
jmp 0x6ec885
cmp r12d, 0xffffffff
je 0x6ec925
mov ecx, r12d
call qword [sym.imp.msvcrt.dll__get_osfhandle]
lea rdx, [rax - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x6ecd60
cmp rax, 0xfffffffffffffffe
je 0x6ecd60
lea rdx, [rsp + 0x80]
mov rcx, rax
call fcn.006ec650
mov r8d, eax
test eax, eax
je 0x6ecbd0
cmp eax, 6
jne 0x6ecde0
cmp r12d, 2
jg 0x6ecde0
mov byte [rbx + rsi + 4], 0
mov edx, dword [rbx]
lea rax, [rbx + rsi*8]
mov qword [rdx + rax + 4], 0xffffffffffffffff
jmp 0x6ec820
cmp dword [r12 + 0x10], 7
je 0x6ec962
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 0x6ecce0
test eax, 0x2000000
jne 0x6ecd0a
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 0x6ec9b6
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.006d5aa0
mov r8d, eax
test eax, eax
jne 0x6ecc20
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 0x6ecdba
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 0x6ecb20
mov edx, dword [rsp + 0x5c]
test edx, edx
jne 0x6ecbb0
xor edx, edx
mov rcx, qword [r12 + 0x118]
call qword [sym.imp.KERNEL32.DLL_ConnectNamedPipe]
test eax, eax
je 0x6ecb50
test r15d, r15d
je 0x6ecabc
or dword [r12 + 0x58], 0x8000
mov eax, dword [rsp + 0x4c]
test eax, eax
je 0x6ecacd
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 0x6ec820
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.006ec6c0
mov r8d, eax
test eax, eax
jne 0x6ecde0
mov byte [rbx + rsi + 4], 0x41
jmp 0x6ec820
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 0x6eca96
jmp 0x6ecbb0
mov rdx, qword [sym.imp.KERNEL32.DLL_GetLastError]
mov qword [rsp + 0x40], rdx
call rdx
mov rdx, qword [rsp + 0x40]
cmp eax, 0x217
je 0x6ecaae
call rdx
cmp qword [r12 + 0x118], 0xffffffffffffffff
mov r8d, eax
je 0x6ecb92
mov rdx, r12
mov rcx, r14
mov dword [rsp + 0x40], eax
call fcn.006d6b40
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 0x6ecc44
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 0x6eca96
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.DLL_GetFileType]
cmp eax, 2
je 0x6ecdb0
ja 0x6eccd1
test eax, eax
je 0x6ece00
cmp eax, 1
jne 0x6ecd37
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 0x6ec820
cmp qword [r12 + 0x118], 0xffffffffffffffff
je 0x6ecde0
mov rdx, r12
mov rcx, r14
mov dword [rsp + 0x40], r8d
call fcn.006d6b40
mov r8d, dword [rsp + 0x40]
test r8d, r8d
jne 0x6ecde0
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 0x6ec820
mov rcx, qword [r12 + 0x110]
mov ebp, 0x41
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x6ec8b7
cmp rcx, 0xfffffffffffffffe
jne 0x6ecc9c
mov r15d, 6
jmp 0x6ec8bd
lea rdx, [rsp + 0x80]
call fcn.006ec650
mov r8d, eax
test eax, eax
jne 0x6ecde0
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 0x6ec820
cmp eax, 3
jne 0x6ecd30
mov byte [rbx + rsi + 4], 9
jmp 0x6ecc03
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 0x6ec97a
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 0x6ec97a
cmp eax, 0x8000
je 0x6ecdb0
mov r8d, 0x189
lea rdx, str.src_win_process_stdio.c
lea rcx, [0x00d145f1]
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x6ec87f
mov qword [rsp + 0x80], 0xffffffffffffffff
cmp r12d, 2
jle 0x6ec925
jmp 0x6ecc91
test byte [r12 + 0x58], 0x80
je 0x6ec8b7
mov rcx, qword [r12 + 0x118]
mov ebp, 9
jmp 0x6ecc7d
mov r15d, 0xe
jmp 0x6ec885
mov byte [rbx + rsi + 4], 0x41
jmp 0x6ecc03
call qword [sym.imp.KERNEL32.DLL_GetLastError]
cmp qword [r12 + 0x118], 0xffffffffffffffff
mov r8d, eax
je 0x6ecc44
jmp 0x6ecc2f
mov r15d, r8d
jmp 0x6ec8bd
mov rax, qword [rsp + 0x120]
xor r15d, r15d
mov qword [rax], rbx
jmp 0x6ec885
mov rbp, qword [sym.imp.KERNEL32.DLL_GetLastError]
call rbp
test eax, eax
je 0x6ecdb0
call rbp
mov rcx, qword [rsp + 0x80]
mov r15d, eax
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x6ec8bd