Function at 0x140059880
Capabilities:
Create pipe
Create thread

Disassembly:
push rbx
push rbp
sub rsp, 0xb8
mov rax, qword [0x14029e8b8]
xor rax, rsp
mov qword [rsp + 0x88], rax
cmp qword [rcx + 0x8150], 0xffffffffffffffff
mov rbp, rdx
mov rbx, rcx
je 0x1400598b3
xor al, al
jmp 0x140059b4a
mov qword [rsp + 0xe0], rsi
lea rcx, [rsp + 0x60]
mov qword [rsp + 0xb0], rdi
mov qword [rsp + 0xa8], r12
mov qword [rsp + 0xa0], r13
xor r13d, r13d
mov qword [rsp + 0x98], r14
mov qword [rsp + 0x90], r15
lea edx, [r13 + 1]
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
xor r9d, r9d
lea edx, [r13 + 1]
xor r8d, r8d
lea rcx, [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
lea rax, [rsp + 0x60]
mov dword [rsp + 0x40], ILCombine
lea rdi, [rbx + 0x8128]
mov qword [rsp + 0x48], rax
mov dword [rsp + 0x50], 1
lea r14, [rbx + 0x18]
xor r12d, r12d
lea esi, [r13 + 2]
mov r15, rdi
nop dword [rax]
lea rax, [rsp + 0x40]
mov r9d, esi
mov qword [rsp + 0x38], rax
mov edx, 0x40000003
mov dword [rsp + 0x30], 0x3e8
mov r8d, 6
mov dword [rsp + 0x28], 0x6000
mov rcx, rbp
mov dword [rsp + 0x20], 0x6000
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov qword [r14 + 0x28], rax
cmp rax, 0xffffffffffffffff
je 0x140059a34
mov edx, 1
xor r9d, r9d
mov r8d, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
mov qword [r15 - 8], rax
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [r15], rax
add r13, rsi
mov rax, qword [r15 - 8]
inc r12
mov qword [r14], rax
mov rax, qword [r15]
add r15, 0x10
mov qword [r14 + 0x20], rax
add r14, 0x4090
cmp r12, rsi
jb 0x140059940
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbx + r13*8 + 0x8120], rax
mov r9, rbx
mov qword [rbx + 0x8148], rax
lea r8, [0x140059ee0]
lea rax, [rsp + 0x58]
xor edx, edx
mov qword [rsp + 0x28], rax
xor ecx, ecx
mov dword [rsp + 0x20], 0
call fcn.1401c6b24
mov qword [rbx + 0x8150], rax
test rax, rax
je 0x140059a34
mov al, 1
jmp 0x140059b1a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbx + 0x8148]
cmp rcx, 0xffffffffffffffff
je 0x140059a4d
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rbx + 0x8150]
cmp rcx, 0xffffffffffffffff
je 0x140059a72
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rbx + 0x8150]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbx + 0x8148]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx + 0x8148], 0xffffffffffffffff
mov qword [rbx + 0x8140], 0xffffffffffffffff
add rbx, 0x40
nop dword [rax]
mov rcx, qword [rbx]
cmp rcx, 0xffffffffffffffff
je 0x140059abf
call qword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbx], 0xffffffffffffffff
mov rcx, qword [rdi - 8]
cmp rcx, 0xffffffffffffffff
je 0x140059ad7
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi - 8], 0xffffffffffffffff
mov rcx, qword [rdi]
cmp rcx, 0xffffffffffffffff
je 0x140059aed
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi], 0xffffffffffffffff
mov qword [rbx - 0x28], 0xffffffffffffffff
add rdi, 0x10
mov qword [rbx - 8], 0xffffffffffffffff
mov dword [rbx + 0x4014], 0
add rbx, 0x4090
sub rsi, 1
jne 0x140059aa0
xor al, al
mov r14, qword [rsp + 0x98]
mov r13, qword [rsp + 0xa0]
mov r12, qword [rsp + 0xa8]
mov rdi, qword [rsp + 0xb0]
mov rsi, qword [rsp + 0xe0]
mov r15, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.140160a40
add rsp, 0xb8
pop rbp
pop rbx
ret