Function at 0x4e0b30
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 r14, rcx
mov rsi, rdx
mov r8d, 0x32
cmp eax, 0xff
ja 0x4e0dd3
cmp eax, 3
mov ebx, 3
cmovge ebx, eax
movsxd rax, ebx
lea rcx, [rax + rax*8 + 4]
call fcn.004b75d0
mov r12, rax
test rax, rax
je 0x4e1158
mov dword [rax], ebx
lea edi, [rbx - 1]
xor eax, eax
mov byte [r12 + rax + 4], 0
mov ecx, dword [r12]
lea rdx, [r12 + rax*8]
mov qword [rcx + rdx + 4], 0xffffffffffffffff
mov rdx, rax
add rax, 1
cmp rdi, rdx
jne 0x4e0b90
xor ebx, ebx
mov edx, ebx
cmp dword [rsi + 0x2c], ebx
jg 0x4e0be7
cmp rbx, 2
jbe 0x4e0f10
nop word cs:[rax + rax]
lea rax, [rbx + 1]
cmp rdi, rbx
je 0x4e1180
mov rbx, rax
mov edx, ebx
cmp dword [rsi + 0x2c], ebx
jle 0x4e0bbc
mov rax, rbx
shl rax, 4
add rax, qword [rsi + 0x30]
mov ebp, dword [rax]
mov r13, qword [rax + 8]
mov eax, ebp
and eax, 7
cmp eax, 2
je 0x4e0e18
ja 0x4e0da0
test eax, eax
je 0x4e0bbc
cmp eax, 1
jne 0x4e0df0
cmp dword [r13 + 0x10], 7
jne 0x4e0ea0
mov eax, dword [r13 + 0x58]
test al, 0x80
jne 0x4e0ec6
test eax, 0x2000000
jne 0x4e0eef
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
jne 0x4e0e90
mov qword [rsp + 0x20], 0x40
lea r11, [rsp + 0x80]
mov rdx, r13
mov rcx, r14
mov r9, r11
mov dword [rsp + 0x48], r10d
mov qword [rsp + 0x40], r11
call fcn.004c9ae0
mov r8d, eax
test eax, eax
jne 0x4e10b0
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 0x4e1163
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 0x4e0f80
mov edx, dword [rsp + 0x5c]
test edx, edx
jne 0x4e1030
xor edx, edx
mov rcx, qword [r13 + 0x118]
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x4e0fd0
test r15d, r15d
je 0x4e0d73
or dword [r13 + 0x58], 0x8000
mov eax, dword [rsp + 0x4c]
test eax, eax
je 0x4e0d83
or dword [r13 + 0x58], 0x4000
mov edx, dword [r12]
lea rax, [r12 + rbx*8]
mov qword [rdx + rax + 4], rbp
mov byte [r12 + rbx + 4], 9
jmp 0x4e0bd0
cmp eax, 4
jne 0x4e0df0
mov eax, dword [r13 + 0x10]
cmp eax, 0xe
je 0x4e0f50
cmp eax, 7
je 0x4e0fb0
mov r8d, 0x32
mov rcx, r12
mov dword [rsp + 0x40], r8d
call fcn.004e0ad0
mov r8d, dword [rsp + 0x40]
mov eax, r8d
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8d, 0x1b7
lea rdx, str.src_win_process_stdio.c
lea rcx, [0x0071eae1]
call qword [sym.imp.msvcrt.dll__assert]
mov r8d, 0xffffffff
jmp 0x4e0dd3
cmp r13d, 0xffffffff
je 0x4e0e6d
mov ecx, r13d
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov rcx, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
ja 0x4e1050
cmp rcx, 0xfffffffffffffffe
je 0x4e1050
lea rdx, [rsp + 0x80]
call fcn.004e09f0
mov r8d, eax
test eax, eax
je 0x4e10f0
cmp eax, 6
jne 0x4e0dc1
cmp r13d, 2
jg 0x4e0dc1
mov byte [r12 + rbx + 4], 0
mov edx, dword [r12]
lea rax, [r12 + rbx*8]
mov qword [rdx + rax + 4], 0xffffffffffffffff
jmp 0x4e0bd0
or r8d, 1
or r10d, 0x40000080
jmp 0x4e0c70
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 0x4e0c30
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 0x4e0c3b
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 0x4e0c3b
cmp edx, 1
mov eax, dword [r12]
sbb edx, edx
lea rcx, [rax + rbx*8 + 4]
and edx, 0xfffffef3
add edx, 0x120196
add rcx, r12
call fcn.004e0a60
mov r8d, eax
test eax, eax
jne 0x4e0dc1
mov byte [r12 + rbx + 4], 0x41
jmp 0x4e0bd0
mov rcx, qword [r13 + 0x110]
mov ebp, 0x41
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x4e0dbb
cmp rcx, 0xfffffffffffffffe
jne 0x4e1070
mov r8d, 6
jmp 0x4e0dc1
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 0x4e0d4f
jmp 0x4e1030
test byte [r13 + 0x58], 0x80
je 0x4e0dbb
mov rcx, qword [r13 + 0x118]
mov ebp, 9
jmp 0x4e0f5c
mov rdx, qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x40], rdx
call rdx
mov rdx, qword [rsp + 0x40]
cmp eax, 0x217
je 0x4e0d66
call rdx
cmp qword [r13 + 0x118], 0xffffffffffffffff
mov r8d, eax
je 0x4e1011
mov rdx, r13
mov rcx, r14
mov dword [rsp + 0x40], eax
call fcn.004cac00
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 0x4e10d3
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 0x4e0d4f
mov qword [rsp + 0x80], 0xffffffffffffffff
cmp r13d, 2
jle 0x4e0e6d
jmp 0x4e0f74
lea rdx, [rsp + 0x80]
call fcn.004e09f0
mov r8d, eax
test eax, eax
jne 0x4e0dc1
mov edx, dword [r12]
mov rcx, qword [rsp + 0x80]
lea rax, [r12 + rbx*8]
mov qword [rdx + rax + 4], rcx
mov byte [r12 + rbx + 4], bpl
jmp 0x4e0bd0
cmp qword [r13 + 0x118], 0xffffffffffffffff
je 0x4e0dc1
mov rdx, r13
mov rcx, r14
mov dword [rsp + 0x40], r8d
call fcn.004cac00
mov r8d, dword [rsp + 0x40]
test r8d, r8d
jne 0x4e0dc1
mov rbp, 0xffffffffffffffff
jmp 0x4e0d83
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x4e114b
ja 0x4e1130
test eax, eax
je 0x4e1198
mov byte [r12 + rbx + 4], 1
mov edx, dword [r12]
mov rcx, qword [rsp + 0x80]
lea rax, [r12 + rbx*8]
mov qword [rdx + rax + 4], rcx
jmp 0x4e0bd0
cmp eax, 3
jne 0x4e1140
mov byte [r12 + rbx + 4], 9
jmp 0x4e1113
cmp eax, 0x8000
jne 0x4e11c8
mov byte [r12 + rbx + 4], 0x41
jmp 0x4e1113
mov r8d, 0xe
jmp 0x4e0dd3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp qword [r13 + 0x118], 0xffffffffffffffff
mov r8d, eax
je 0x4e10d3
jmp 0x4e10be
mov rax, qword [rsp + 0x120]
xor r8d, r8d
mov qword [rax], r12
jmp 0x4e0dd3
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4e114b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0x80]
mov dword [rsp + 0x40], eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rsp + 0x40]
jmp 0x4e0dc1
mov r8d, 0x189
lea rdx, str.src_win_process_stdio.c
lea rcx, [0x0071eae1]
call qword [sym.imp.msvcrt.dll__assert]
jmp 0x4e0e0a