Function at 0x46eed0
Capabilities:
Connect pipe

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xd8
mov edi, dword [rdx + 0x2c]
mov r15, r8
mov r13, rcx
mov r12, rdx
mov r8d, 0x32
cmp edi, 0xff
ja 0x46ef6b
cmp edi, 3
mov eax, 3
cmovl edi, eax
movsxd rax, edi
lea rcx, [rax + rax*8 + 4]
call fcn.00449730
test rax, rax
mov rbx, rax
je 0x46f3e0
mov dword [rax], edi
mov r8, 0xffffffffffffffff
xor eax, eax
nop dword [rax]
mov byte [rbx + rax + 4], 0
mov ecx, dword [rbx]
lea rdx, [rbx + rax*8]
add rax, 1
cmp edi, eax
mov qword [rcx + rdx + 4], r8
jg 0x46ef30
xor esi, esi
cmp dword [r12 + 0x2c], esi
mov edx, esi
jg 0x46ef82
cmp rsi, 2
jbe 0x46f504
add rsi, 1
cmp edi, esi
jg 0x46ef4a
mov qword [r15], rbx
xor r8d, r8d
mov eax, r8d
add rsp, 0xd8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, rsi
shl rax, 4
add rax, qword [r12 + 0x30]
mov r9d, dword [rax]
mov rbp, qword [rax + 8]
mov eax, r9d
and eax, 7
cmp eax, 1
je 0x46f080
jb 0x46ef53
cmp eax, 2
je 0x46f004
cmp eax, 4
jne 0x46efe0
mov eax, dword [rbp + 0x10]
cmp eax, 0xe
je 0x46f340
cmp eax, 7
je 0x46f294
mov r8d, 0x32
mov rcx, rbx
mov dword [rsp + 0x48], r8d
call fcn.0046ee70
mov r8d, dword [rsp + 0x48]
jmp 0x46ef6b
lea rdx, str.src_win_process_stdio.c
lea rcx, [0x004cc431]
mov r8d, 0x1b6
call fcn.0048c6c0
mov r8d, 0xffffffff
jmp 0x46ef6b
cmp ebp, 0xffffffff
je 0x46f052
mov ecx, ebp
call qword [sym.imp.msvcrt.dll__get_osfhandle]
lea rdx, [rax - 1]
cmp rdx, 0xfffffffffffffffd
ja 0x46f300
cmp rax, 0xfffffffffffffffe
je 0x46f300
lea rdx, [rsp + 0x90]
mov rcx, rax
call fcn.0046ed90
test eax, eax
mov r8d, eax
je 0x46f3b0
cmp eax, 6
jne 0x46efcb
cmp ebp, 2
jg 0x46efcb
mov byte [rbx + rsi + 4], 0
mov edx, dword [rbx]
lea rax, [rbx + rsi*8]
add rsi, 1
cmp edi, esi
mov qword [rdx + rax + 4], 0xffffffffffffffff
jg 0x46ef4a
jmp 0x46ef65
cmp dword [rbp + 0x10], 7
je 0x46f0a9
lea rdx, str.src_win_process_stdio.c
lea rcx, str.fdopt.data.stream__type__UV_NAMED_PIPE
mov r8d, 0x14e
mov dword [rsp + 0x48], r9d
call fcn.0048c6c0
mov r9d, dword [rsp + 0x48]
mov eax, dword [rbp + 0x58]
test ah, 0x10
jne 0x46f351
test eax, 0x2000000
jne 0x46f382
mov r14d, r9d
and r14d, 0x10
cmp r14d, 1
sbb r10d, r10d
not r10d
and r10d, 0x80000100
cmp r14d, 1
sbb r8d, r8d
not r8d
and r8d, 3
and r9d, 0x20
mov dword [rsp + 0x5c], r9d
je 0x46f0fc
or r8d, 1
or r10d, 0x40000080
lea r11, [rsp + 0x90]
mov qword [rsp + 0x20], 0x40
mov rdx, rbp
mov rcx, r13
mov dword [rsp + 0x50], r10d
mov r9, r11
mov qword [rsp + 0x48], r11
call fcn.004588d0
test eax, eax
mov r8d, eax
jne 0x46f240
mov ecx, dword [rbp + 0x110]
xor eax, eax
mov r10d, dword [rsp + 0x50]
mov r11, qword [rsp + 0x48]
mov dword [rsp + 0x70], 0x18
lea r9, [rsp + 0x70]
mov qword [rsp + 0x78], 0
mov dword [rsp + 0x80], 1
test ecx, ecx
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x20], 3
setne al
mov edx, r10d
mov rcx, r11
shl eax, 0x1e
mov dword [rsp + 0x28], eax
call qword [sym.imp.KERNEL32.dll_CreateFileA]
cmp rax, 0xffffffffffffffff
je 0x46f320
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x6c]
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov rcx, rax
mov qword [rsp + 0x20], 0
mov qword [rsp + 0x48], rax
call qword [sym.imp.KERNEL32.dll_GetNamedPipeHandleStateA]
cmp eax, 1
mov r10, qword [rsp + 0x48]
je 0x46f1f1
lea rdx, str.src_win_process_stdio.c
lea rcx, str.r__TRUE
mov r8d, 0x9d
call fcn.0048c6c0
mov r10, qword [rsp + 0x48]
mov edx, dword [rsp + 0x6c]
test edx, edx
jne 0x46f4a3
mov qword [rsp + 0x48], r10
xor edx, edx
mov rcx, qword [rbp + 0x118]
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
mov r10, qword [rsp + 0x48]
je 0x46f450
test r14d, r14d
je 0x46f22a
or dword [rbp + 0x58], 0x10000
mov eax, dword [rsp + 0x5c]
test eax, eax
je 0x46f273
or dword [rbp + 0x58], 0x8000
jmp 0x46f273
cmp qword [rbp + 0x118], 0xffffffffffffffff
je 0x46efcb
mov rdx, rbp
mov rcx, r13
mov dword [rsp + 0x48], r8d
call fcn.00459750
mov r8d, dword [rsp + 0x48]
test r8d, r8d
jne 0x46efcb
mov r10, 0xffffffffffffffff
mov edx, dword [rbx]
lea rax, [rbx + rsi*8]
mov qword [rdx + rax + 4], r10
mov byte [rbx + rsi + 4], 9
add rsi, 1
cmp edi, esi
jg 0x46ef4a
jmp 0x46ef65
test byte [rbp + 0x59], 0x10
je 0x46efc5
mov rcx, qword [rbp + 0x118]
mov ebp, 9
lea rax, [rcx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x46efc5
cmp rcx, 0xfffffffffffffffe
je 0x46f315
lea rdx, [rsp + 0x90]
call fcn.0046ed90
test eax, eax
mov r8d, eax
jne 0x46efcb
mov edx, dword [rbx]
mov rcx, qword [rsp + 0x90]
lea rax, [rbx + rsi*8]
mov qword [rdx + rax + 4], rcx
mov byte [rbx + rsi + 4], bpl
add rsi, 1
cmp edi, esi
jg 0x46ef4a
jmp 0x46ef65
cmp ebp, 2
mov qword [rsp + 0x90], 0xffffffffffffffff
jle 0x46f052
mov r8d, 6
jmp 0x46efcb
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp qword [rbp + 0x118], 0xffffffffffffffff
mov r8d, eax
je 0x46f263
jmp 0x46f24e
mov rcx, qword [rbp + 0x110]
mov ebp, 0x41
jmp 0x46f2aa
lea rdx, str.src_win_process_stdio.c
lea rcx, str.__fdopt.data.stream__flags__UV_HANDLE_CONNECTION_
mov r8d, 0x14f
mov dword [rsp + 0x48], r9d
call fcn.0048c6c0
mov eax, dword [rbp + 0x58]
mov r9d, dword [rsp + 0x48]
test eax, 0x2000000
je 0x46f0c0
lea rdx, str.src_win_process_stdio.c
lea rcx, str.__fdopt.data.stream__flags__UV_HANDLE_PIPESERVER_
mov r8d, 0x150
mov dword [rsp + 0x48], r9d
call fcn.0048c6c0
mov r9d, dword [rsp + 0x48]
jmp 0x46f0c0
mov rcx, qword [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x46f420
ja 0x46f3f0
test eax, eax
je 0x46f4d5
cmp eax, 1
jne 0x46f400
mov byte [rbx + rsi + 4], 1
jmp 0x46f425
mov r8d, 0xe
jmp 0x46ef6b
cmp eax, 3
je 0x46f4cb
cmp eax, 0x8000
je 0x46f420
lea rdx, str.src_win_process_stdio.c
lea rcx, [0x004cc431]
mov r8d, 0x188
call fcn.0048c6c0
jmp 0x46eff9
mov byte [rbx + rsi + 4], 0x41
mov edx, dword [rbx]
mov rcx, qword [rsp + 0x90]
lea rax, [rbx + rsi*8]
add rsi, 1
cmp edi, esi
mov qword [rdx + rax + 4], rcx
jg 0x46ef4a
jmp 0x46ef65
mov rdx, qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x50], rdx
call rdx
cmp eax, 0x217
mov r10, qword [rsp + 0x48]
je 0x46f21e
mov rdx, qword [rsp + 0x50]
call rdx
cmp qword [rbp + 0x118], 0xffffffffffffffff
mov r8d, eax
mov r10, qword [rsp + 0x48]
jne 0x46f539
mov dword [rsp + 0x48], r8d
mov rcx, r10
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rsp + 0x48]
jmp 0x46f263
lea rdx, str.src_win_process_stdio.c
lea rcx, str.mode___PIPE_READMODE_BYTE__PIPE_WAIT_
mov r8d, 0x9e
mov qword [rsp + 0x48], r10
call fcn.0048c6c0
mov r10, qword [rsp + 0x48]
jmp 0x46f1fd
mov byte [rbx + rsi + 4], 9
jmp 0x46f425
mov rbp, qword [sym.imp.KERNEL32.dll_GetLastError]
call rbp
test eax, eax
je 0x46f420
call rbp
mov rcx, qword [rsp + 0x90]
mov dword [rsp + 0x48], eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rsp + 0x48]
jmp 0x46efcb
mov eax, dword [rbx]
cmp edx, 1
sbb edx, edx
and edx, 0xfffffef3
add edx, 0x120196
lea rcx, [rax + rsi*8 + 4]
add rcx, rbx
call fcn.0046ee00
test eax, eax
mov r8d, eax
jne 0x46efcb
mov byte [rbx + rsi + 4], 0x41
jmp 0x46ef5d
mov rdx, rbp
mov rcx, r13
mov qword [rsp + 0x48], r10
mov dword [rsp + 0x50], eax
call fcn.00459750
mov r8d, dword [rsp + 0x50]
mov r10, qword [rsp + 0x48]
jmp 0x46f48b