Function at 0x6e4680
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 0x6e4785
cmp eax, 3
mov esi, 3
cmovge esi, eax
movsxd rax, esi
lea rcx, [rax + rax*8 + 4]
call fcn.006ba730
mov rbx, rax
test rax, rax
je 0x6e4ca0
mov dword [rax], esi
lea edi, [rsi - 1]
xor eax, eax
mov r8, 0xffffffffffffffff
jmp 0x6e46f3
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 0x6e46f0
xor esi, esi
mov edx, esi
cmp dword [r13 + 0x2c], esi
jg 0x6e4738
cmp rsi, 2
jbe 0x6e49e2
lea rax, [rsi + 1]
cmp rdi, rsi
je 0x6e4ce8
mov rsi, rax
mov edx, esi
cmp dword [r13 + 0x2c], esi
jle 0x6e4716
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 0x6e4840
test eax, eax
je 0x6e4716
cmp eax, 2
je 0x6e47d0
cmp eax, 4
je 0x6e47a0
mov r8d, 0x1b7
lea rdx, str.src_win_process_stdio.c
lea rcx, [0x00af54d1]
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 0x6e4b70
cmp eax, 7
je 0x6e4c80
mov r15d, 0x32
mov rcx, rbx
call fcn.006e4630
jmp 0x6e4785
cmp r12d, 0xffffffff
je 0x6e4825
mov ecx, r12d
call qword [sym.imp.msvcrt.dll__get_osfhandle]
lea rdx, [rax - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x6e4c60
cmp rax, 0xfffffffffffffffe
je 0x6e4c60
lea rdx, [rsp + 0x80]
mov rcx, rax
call fcn.006e4550
mov r8d, eax
test eax, eax
je 0x6e4ad0
cmp eax, 6
jne 0x6e4ce0
cmp r12d, 2
jg 0x6e4ce0
mov byte [rbx + rsi + 4], 0
mov edx, dword [rbx]
lea rax, [rbx + rsi*8]
mov qword [rdx + rax + 4], 0xffffffffffffffff
jmp 0x6e4720
cmp dword [r12 + 0x10], 7
je 0x6e4862
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 0x6e4be0
test eax, 0x2000000
jne 0x6e4c0a
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 0x6e48b6
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.006cd9a0
mov r8d, eax
test eax, eax
jne 0x6e4b20
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 0x6e4cba
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 0x6e4a20
mov edx, dword [rsp + 0x5c]
test edx, edx
jne 0x6e4ab0
xor edx, edx
mov rcx, qword [r12 + 0x118]
call qword [sym.imp.KERNEL32.DLL_ConnectNamedPipe]
test eax, eax
je 0x6e4a50
test r15d, r15d
je 0x6e49bc
or dword [r12 + 0x58], 0x8000
mov eax, dword [rsp + 0x4c]
test eax, eax
je 0x6e49cd
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 0x6e4720
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.006e45c0
mov r8d, eax
test eax, eax
jne 0x6e4ce0
mov byte [rbx + rsi + 4], 0x41
jmp 0x6e4720
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 0x6e4996
jmp 0x6e4ab0
mov rdx, qword [sym.imp.KERNEL32.DLL_GetLastError]
mov qword [rsp + 0x40], rdx
call rdx
mov rdx, qword [rsp + 0x40]
cmp eax, 0x217
je 0x6e49ae
call rdx
cmp qword [r12 + 0x118], 0xffffffffffffffff
mov r8d, eax
je 0x6e4a92
mov rdx, r12
mov rcx, r14
mov dword [rsp + 0x40], eax
call fcn.006cea40
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 0x6e4b44
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 0x6e4996
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.DLL_GetFileType]
cmp eax, 2
je 0x6e4cb0
ja 0x6e4bd1
test eax, eax
je 0x6e4d00
cmp eax, 1
jne 0x6e4c37
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 0x6e4720
cmp qword [r12 + 0x118], 0xffffffffffffffff
je 0x6e4ce0
mov rdx, r12
mov rcx, r14
mov dword [rsp + 0x40], r8d
call fcn.006cea40
mov r8d, dword [rsp + 0x40]
test r8d, r8d
jne 0x6e4ce0
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 0x6e4720
mov rcx, qword [r12 + 0x110]
mov ebp, 0x41
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x6e47b7
cmp rcx, 0xfffffffffffffffe
jne 0x6e4b9c
mov r15d, 6
jmp 0x6e47bd
lea rdx, [rsp + 0x80]
call fcn.006e4550
mov r8d, eax
test eax, eax
jne 0x6e4ce0
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 0x6e4720
cmp eax, 3
jne 0x6e4c30
mov byte [rbx + rsi + 4], 9
jmp 0x6e4b03
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 0x6e487a
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 0x6e487a
cmp eax, 0x8000
je 0x6e4cb0
mov r8d, 0x189
lea rdx, str.src_win_process_stdio.c
lea rcx, [0x00af54d1]
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x6e477f
mov qword [rsp + 0x80], 0xffffffffffffffff
cmp r12d, 2
jle 0x6e4825
jmp 0x6e4b91
test byte [r12 + 0x58], 0x80
je 0x6e47b7
mov rcx, qword [r12 + 0x118]
mov ebp, 9
jmp 0x6e4b7d
mov r15d, 0xe
jmp 0x6e4785
mov byte [rbx + rsi + 4], 0x41
jmp 0x6e4b03
call qword [sym.imp.KERNEL32.DLL_GetLastError]
cmp qword [r12 + 0x118], 0xffffffffffffffff
mov r8d, eax
je 0x6e4b44
jmp 0x6e4b2f
mov r15d, r8d
jmp 0x6e47bd
mov rax, qword [rsp + 0x120]
xor r15d, r15d
mov qword [rax], rbx
jmp 0x6e4785
mov rbp, qword [sym.imp.KERNEL32.DLL_GetLastError]
call rbp
test eax, eax
je 0x6e4cb0
call rbp
mov rcx, qword [rsp + 0x80]
mov r15d, eax
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
jmp 0x6e47bd