Function at 0x140071940
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 0x140071a11
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.140082db0
mov r12, rax
test rax, rax
je 0x140071f10
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 0x1400719b0
mov qword [rsp + 0x120], r13
xor esi, esi
xor ebx, ebx
cmp dword [r14 + 0x2c], ebx
jg 0x140071a30
cmp rbx, 2
jbe 0x140071d08
nop dword [rax]
mov rax, qword [rsp + 0x48]
add rsi, 8
add rbx, 1
cmp rsi, rax
jne 0x1400719dc
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 0x140071c10
ja 0x140071b90
test eax, eax
je 0x1400719e2
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.14006b5e0
test eax, eax
jne 0x140071ee0
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 0x140071d98
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 0x140071f98
xor edx, edx
mov rcx, qword [rdi + 0x118]
call qword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x140071dd0
test r13d, r13d
je 0x140071b64
or dword [rdi + 0x58], 0x8000
mov eax, dword [rsp + 0x5c]
test eax, eax
je 0x140071b73
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 0x1400719f0
cmp eax, 4
jne 0x140071c00
mov eax, dword [rdi + 0x10]
cmp eax, 0xe
je 0x140071e68
cmp eax, 7
je 0x140071db0
mov r15d, 0x32
mov eax, dword [r12]
test eax, eax
jle 0x140071bee
lea edi, [rax - 1]
mov rsi, qword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
shl rdi, 3
jmp 0x140071bd8
mov eax, dword [r12]
add rbx, 8
lea rdx, [r12 + rbx]
mov rcx, qword [rax + rdx + 4]
cmp rcx, 0xffffffffffffffff
je 0x140071be9
call rsi
cmp rbx, rdi
jne 0x140071bd0
mov rcx, r12
call fcn.140082dd0
jmp 0x140071a11
mov r15d, 0xffffffff
jmp 0x140071a11
mov ecx, edi
cmp edi, 0xffffffff
je 0x140071ce9
call qword [sym.imp.msvcrt.dll__get_osfhandle]
mov rbp, rax
lea rax, [rax - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140071e40
cmp rbp, 0xfffffffffffffffe
je 0x140071e40
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 0x140071cbe
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x140071f30
ja 0x140071f20
test eax, eax
je 0x140071f6f
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 0x1400719f0
mov qword [rsp + 0x80], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
test eax, eax
je 0x140071c75
cmp edi, 2
jg 0x140071f5d
cmp eax, 6
jne 0x140071f5d
mov byte [r12 + rbx + 4], 0
mov edx, dword [r12]
lea rax, [r12 + rsi]
mov qword [rdx + rax + 4], 0xffffffffffffffff
jmp 0x1400719f0
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 0x140071fc2
mov qword [rdi], rax
mov byte [r12 + rbx + 4], 0x41
jmp 0x1400719f0
shl ebp, 0x18
mov eax, ebp
and eax, 0x40000000
jmp 0x140071b0b
test byte [rdi + 0x58], 0x80
je 0x140071baa
mov rbp, qword [rdi + 0x118]
mov edi, 9
jmp 0x140071e74
mov r15, qword [sym.imp.KERNEL32.dll_GetLastError]
call r15
cmp eax, 0x217
je 0x140071b58
call r15
cmp qword [rdi + 0x118], 0xffffffffffffffff
mov r8d, eax
je 0x140071e0e
mov rcx, qword [rsp + 0x110]
mov rdx, rdi
mov dword [rsp + 0x50], eax
call fcn.14006c2d0
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 0x140071f5d
mov rbp, 0xffffffffffffffff
jmp 0x140071b73
mov qword [rsp + 0x80], 0xffffffffffffffff
cmp edi, 2
jle 0x140071ce9
nop dword [rax]
mov r15d, 6
jmp 0x140071bb0
mov rbp, qword [rdi + 0x110]
mov edi, 0x41
lea rax, [rbp - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140071baa
cmp rbp, 0xfffffffffffffffe
je 0x140071e58
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 0x140071f40
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 0x1400719f0
cmp qword [rdi + 0x118], 0xffffffffffffffff
mov r15d, eax
je 0x140071bb0
mov rcx, qword [rsp + 0x110]
mov rdx, rdi
call fcn.14006c2d0
jmp 0x140071bb0
mov r15d, 0xe
jmp 0x140071a11
cmp eax, 3
je 0x140071f65
cmp eax, 0x8000
jne 0x140071c00
mov eax, 0x41
jmp 0x140071c9f
mov qword [rsp + 0x80], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
test eax, eax
je 0x140071ec1
mov r15d, r8d
jmp 0x140071bb0
mov eax, 9
jmp 0x140071c9f
mov rdi, qword [sym.imp.KERNEL32.dll_GetLastError]
call rdi
test eax, eax
je 0x140071f30
call rdi
mov rcx, qword [rsp + 0x80]
mov r15d, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140071bb0
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp qword [rdi + 0x118], 0xffffffffffffffff
mov ebp, eax
je 0x140071fba
mov rcx, qword [rsp + 0x110]
mov rdx, rdi
call fcn.14006c2d0
mov r8d, ebp
jmp 0x140071e21
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
test eax, eax
je 0x140071d89
jmp 0x140071f5d