Function at 0x140004560
Capabilities:
Create pipe

Disassembly:
mov r11, rsp
push rbp
push rbx
push rsi
lea rbp, [r11 - 0x128]
sub rsp, 0x210
mov rax, qword [0x140024018]
xor rax, rsp
mov qword [rbp + 0xf0], rax
xor eax, eax
mov qword [r11 + 0x18], rdi
xor ebx, ebx
mov qword [r11 + 0x20], r13
mov qword [rsp + 0x78], rax
mov r13, rcx
mov qword [rbp - 0x80], rax
lea rcx, [rbp - 0x40]
mov qword [rbp - 0x78], rax
xor r9d, r9d
mov qword [rbp - 0x70], rax
xor r8d, r8d
mov qword [rbp - 0x68], rax
mov esi, ebx
mov qword [rbp - 0x60], rax
mov edi, ebx
mov qword [rbp - 0x58], rax
mov qword [rbp - 0x50], rax
mov qword [rbp - 0x48], rax
mov dword [rbp - 0x40], eax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], ebx
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x38], ebx
mov qword [r11 - 0x28], r15
mov r15, rdx
mov dword [rsp + 0x30], ebx
mov qword [rdx], rbx
mov dl, 1
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
mov word [rbp - 0x3c], 0x100
mov qword [rsp + 0x68], rbx
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x70], rbx
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x140004636
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x140004628
mov ebx, eax
jmp 0x140004860
movzx ebx, ax
or ebx, 0x80070000
jmp 0x140004860
mov rcx, qword [rsp + 0x60]
mov qword [rsp + 0x208], r14
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, 0x40
lea r14d, [rax + 0x10]
mov edx, r14d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
jne 0x14000466d
mov ebx, 0xc0000017
jmp 0x140004858
mov r8d, 2
mov edx, r14d
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x140004841
mov r9, qword [rsp + 0x60]
mov edx, 2
mov r8d, 0xc0110000
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x140004841
xor edx, edx
mov qword [rbp - 0x30], 0x11c
mov r8d, 0x100
mov qword [rbp - 0x28], rbx
lea rcx, [rbp - 0x1c]
mov dword [rbp - 0x20], ebx
call sub.VCRUNTIME140.dll_memset
xor eax, eax
mov word [rbp + 0xe4], bx
mov r8b, 3
mov dword [rbp + 0xe6], eax
xor ecx, ecx
mov word [rbp + 0xea], ax
lea edx, [rax + 2]
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov r8b, 3
mov edx, 1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov r8b, 3
mov edx, 0x20
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_VerSetConditionMask]
mov edx, 0x23
mov dword [rbp - 0x2c], 6
mov r8, rax
mov dword [rbp - 0x28], 2
lea rcx, [rbp - 0x30]
mov word [rbp + 0xe4], bx
call qword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
test eax, eax
je 0x14000479b
lea rdx, [rsp + 0x70]
lea rcx, str.S_1_15_2_1
call qword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
test eax, eax
je 0x140004841
mov rax, qword [rsp + 0x70]
lea r9, [rsp + 0x68]
mov r8, rdi
mov qword [rbp - 0x48], rax
lea rdx, [rbp - 0x70]
mov dword [rbp - 0x70], 0xc0110000
mov ecx, 1
mov dword [rbp - 0x6c], 2
mov dword [rbp - 0x68], 3
mov dword [rbp - 0x54], ebx
mov dword [rbp - 0x50], 5
call qword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
je 0x1400047a3
jmp 0x140004849
mov qword [rsp + 0x68], rdi
mov rdi, rbx
mov edx, 0x28
lea ecx, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x140004841
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x140004841
mov r8, qword [rsp + 0x68]
xor r9d, r9d
mov rcx, rsi
lea edx, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x140004841
cmp qword [r13 + 0x20], 8
lea rcx, [r13 + 8]
mov dword [rsp + 0x78], 0x18
mov qword [rbp - 0x80], rsi
mov dword [rbp - 0x78], ebx
jb 0x140004805
mov rcx, qword [rcx]
mov r9d, dword [r13 + 0x2c]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x38], rax
xor r8d, r8d
mov dword [rsp + 0x30], ebx
mov edx, 0x40000003
mov dword [rsp + 0x28], 0x1000
mov dword [rsp + 0x20], 0x1000
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov qword [r15], rax
cmp rax, 0xffffffffffffffff
jne 0x140004858
mov qword [r15], rbx
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x14000484f
mov ebx, eax
jmp 0x140004858
movzx ebx, ax
or ebx, 0x80070000
mov r14, qword [rsp + 0x208]
mov rcx, qword [rsp + 0x60]
mov r15, qword [rsp + 0x200]
mov r13, qword [rsp + 0x248]
test rcx, rcx
je 0x140004880
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x140004890
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x1400048a0
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rdi, rdi
je 0x1400048ae
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdi, qword [rsp + 0x240]
test rsi, rsi
je 0x1400048c4
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, ebx
mov rcx, qword [rbp + 0xf0]
xor rcx, rsp
call fcn.1400163f0
add rsp, 0x210
pop rsi
pop rbx
pop rbp
ret