Function at 0x140071890
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 qword [rsp + 0x110], rcx
mov r14, rdx
mov r13, r8
cmp eax, 0xff
ja 0x140071961
mov ecx, 3
cmp eax, ecx
mov esi, ecx
cmovge esi, eax
movsxd rbx, esi
lea rax, [rbx*8]
lea rcx, [rbx + rax + 4]
mov qword [rsp + 0x48], rax
call fcn.140082d00
mov r12, rax
test rax, rax
je 0x140071e60
mov dword [rax], esi
xor eax, eax
nop dword [rax + rax]
mov byte [r12 + rax + 4], 0
mov ecx, dword [r12]
lea rdx, [r12 + rax*8]
add rax, 1
mov qword [rcx + rdx + 4], 0xffffffffffffffff
cmp rbx, rax
jne 0x140071900
mov qword [rsp + 0x120], r13
xor esi, esi
xor ebx, ebx
cmp dword [r14 + 0x2c], ebx
jg 0x140071980
cmp rbx, 2
jbe 0x140071c58
nop dword [rax]
mov rax, qword [rsp + 0x48]
add rsi, 8
add rbx, 1
cmp rsi, rax
jne 0x14007192c
mov r13, qword [rsp + 0x120]
xor r15d, r15d
mov qword [r13], r12
mov eax, r15d
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [r14 + 0x30]
lea rax, [rax + rsi*2]
mov ebp, dword [rax]
mov rdi, qword [rax + 8]
mov eax, ebp
and eax, 7
cmp eax, 2
je 0x140071b60
ja 0x140071ae0
test eax, eax
je 0x140071932
mov r13d, ebp
mov ecx, ebp
mov qword [rsp + 0x20], 0x40
lea r11, [rsp + 0x80]
and r13d, 0x10
mov r9, r11
mov qword [rsp + 0x50], r11
mov eax, r13d
neg eax
mov eax, r13d
sbb edx, edx
and edx, 0x80000100
neg eax
sbb eax, eax
and eax, 3
cmp r13d, 1
sbb r15d, r15d
and r15d, 0x7fffff00
sub r15d, 0x3ffffe80
cmp r13d, 1
sbb r8d, r8d
and r8d, 0xfffffffe
add r8d, 3
and ecx, 0x20
mov dword [rsp + 0x5c], ecx
cmove r8d, eax
mov rcx, qword [rsp + 0x110]
cmove r15d, edx
mov rdx, rdi
call fcn.14006b530
test eax, eax
jne 0x140071e30
mov edx, dword [rdi + 0x110]
mov dword [rsp + 0x60], 0x18
mov eax, 0x40000000
mov qword [rsp + 0x68], 0
mov r11, qword [rsp + 0x50]
test edx, edx
mov dword [rsp + 0x70], 1
je 0x140071ce8
mov dword [rsp + 0x28], eax
lea r9, [rsp + 0x60]
xor r8d, r8d
mov edx, r15d
mov qword [rsp + 0x30], 0
mov rcx, r11
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x140071ee8
xor edx, edx
mov rcx, qword [rdi + 0x118]
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x140071d20
test r13d, r13d
je 0x140071ab4
or dword [rdi + 0x58], 0x8000
mov eax, dword [rsp + 0x5c]
test eax, eax
je 0x140071ac3
or dword [rdi + 0x58], 0x4000
mov edx, dword [r12]
lea rax, [r12 + rsi]
mov qword [rdx + rax + 4], rbp
mov byte [r12 + rbx + 4], 9
jmp 0x140071940
cmp eax, 4
jne 0x140071b50
mov eax, dword [rdi + 0x10]
cmp eax, 0xe
je 0x140071db8
cmp eax, 7
je 0x140071d00
mov r15d, 0x32
mov eax, dword [r12]
test eax, eax
jle 0x140071b3e
lea edi, [rax - 1]
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
shl rdi, 3
jmp 0x140071b28
mov eax, dword [r12]
add rbx, 8
lea rdx, [r12 + rbx]
mov rcx, qword [rax + rdx + 4]
cmp rcx, 0xffffffffffffffff
je 0x140071b39
call rsi
cmp rbx, rdi
jne 0x140071b20
mov rcx, r12
call fcn.140082d20
jmp 0x140071961
mov r15d, 0xffffffff
jmp 0x140071961
mov ecx, edi
cmp edi, 0xffffffff
je 0x140071c39
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov rbp, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140071d90
cmp rbp, 0xfffffffffffffffe
je 0x140071d90
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x30], 2
mov rdx, rbp
lea r9, [rsp + 0x80]
mov dword [rsp + 0x28], 1
mov rcx, rax
mov r8, rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x140071c0e
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x140071e80
ja 0x140071e70
test eax, eax
je 0x140071ebf
mov eax, 1
mov byte [r12 + rbx + 4], al
mov edx, dword [r12]
lea rax, [r12 + rsi]
mov rcx, qword [rsp + 0x80]
mov qword [rdx + rax + 4], rcx
jmp 0x140071940
mov qword [rsp + 0x80], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
test eax, eax
je 0x140071bc5
cmp edi, 2
jg 0x140071ead
cmp eax, 6
jne 0x140071ead
mov byte [r12 + rbx + 4], 0
mov edx, dword [r12]
lea rax, [r12 + rsi]
mov qword [rdx + rax + 4], 0xffffffffffffffff
jmp 0x140071940
mov eax, dword [r12]
cmp rbx, 1
mov dword [rsp + 0x80], 0x18
lea r9, [rsp + 0x80]
sbb edx, edx
mov r8d, 3
mov qword [rsp + 0x88], 0
lea rcx, [0x1402272a0]
and edx, 0xfffffef3
lea rdi, [rsi + rax + 4]
mov dword [rsp + 0x90], 1
add edx, 0x120196
add rdi, r12
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
je 0x140071f12
mov qword [rdi], rax
mov byte [r12 + rbx + 4], 0x41
jmp 0x140071940
shl ebp, 0x18
mov eax, ebp
and eax, 0x40000000
jmp 0x140071a5b
test byte [rdi + 0x58], 0x80
je 0x140071afa
mov rbp, qword [rdi + 0x118]
mov edi, 9
jmp 0x140071dc4
mov r15, qword [sym.imp.KERNEL32.dll_GetLastError]
call r15
cmp eax, 0x217
je 0x140071aa8
call r15
cmp qword [rdi + 0x118], 0xffffffffffffffff
mov r8d, eax
je 0x140071d5e
mov rcx, qword [rsp + 0x110]
mov rdx, rdi
mov dword [rsp + 0x50], eax
call fcn.14006c220
mov r8d, dword [rsp + 0x50]
mov dword [rsp + 0x50], r8d
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, dword [rsp + 0x50]
test r8d, r8d
jne 0x140071ead
mov rbp, 0xffffffffffffffff
jmp 0x140071ac3
mov qword [rsp + 0x80], 0xffffffffffffffff
cmp edi, 2
jle 0x140071c39
nop dword [rax]
mov r15d, 6
jmp 0x140071b00
mov rbp, qword [rdi + 0x110]
mov edi, 0x41
lea rax, [rbp - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140071afa
cmp rbp, 0xfffffffffffffffe
je 0x140071da8
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x30], 2
mov rdx, rbp
lea r9, [rsp + 0x80]
mov dword [rsp + 0x28], 1
mov rcx, rax
mov r8, rax
mov dword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x140071e90
mov edx, dword [r12]
mov rcx, qword [rsp + 0x80]
lea rax, [r12 + rsi]
mov qword [rdx + rax + 4], rcx
mov byte [r12 + rbx + 4], dil
jmp 0x140071940
cmp qword [rdi + 0x118], 0xffffffffffffffff
mov r15d, eax
je 0x140071b00
mov rcx, qword [rsp + 0x110]
mov rdx, rdi
call fcn.14006c220
jmp 0x140071b00
mov r15d, 0xe
jmp 0x140071961
cmp eax, 3
je 0x140071eb5
cmp eax, 0x8000
jne 0x140071b50
mov eax, 0x41
jmp 0x140071bef
mov qword [rsp + 0x80], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
test eax, eax
je 0x140071e11
mov r15d, r8d
jmp 0x140071b00
mov eax, 9
jmp 0x140071bef
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rdi
test eax, eax
je 0x140071e80
call rdi
mov rcx, qword [rsp + 0x80]
mov r15d, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140071b00
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp qword [rdi + 0x118], 0xffffffffffffffff
mov ebp, eax
je 0x140071f0a
mov rcx, qword [rsp + 0x110]
mov rdx, rdi
call fcn.14006c220
mov r8d, ebp
jmp 0x140071d71
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
test eax, eax
je 0x140071cd9
jmp 0x140071ead