Function at 0x140051758
Capabilities:
Create pipe

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x58]
sub rsp, 0x158
mov qword [rbp - 0x50], 0xfffffffffffffffe
mov rax, qword [0x1400e1300]
xor rax, rsp
mov qword [rbp + 0x48], rax
mov edi, r9d
mov rsi, r8
mov qword [rsp + 0x60], rdx
mov r14, rcx
mov r13, qword [rbp + 0xc0]
xor r15d, r15d
mov qword [r13], r15
mov ebx, 0x8000000a
lock bts dword [rcx + 0xd8], 0
jb 0x140051bea
lea rcx, [rbp + 0x28]
call fcn.140051690
nop
lea r9d, [r15 + 9]
lea r8, str..pipe_
mov rcx, rax
call fcn.140053218
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x18], xmm0
movups xmm0, xmmword [rax]
movups xmmword [rbp + 8], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0x18], xmm1
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], 7
mov word [rax], r15w
lea rcx, [rbp + 0x28]
call fcn.1400045b4
lea rax, [0x1400a14f0]
mov qword [rbp - 0x40], rax
lea rcx, [rbp + 8]
cmp qword [rbp + 0x20], 8
cmovae rcx, qword [rbp + 8]
mov qword [rsp + 0x38], r15
mov dword [rsp + 0x30], r15d
mov eax, 0x200000
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], eax
lea r9d, [r15 + 2]
xor r8d, r8d
mov edx, 0x40000003
call qword [sym.imp.api_ms_win_core_namedpipe_l1_1_0.dll_CreateNamedPipeW]
mov r12, rax
mov qword [rbp - 0x38], rax
cmp rax, 0xffffffffffffffff
jne 0x140051869
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x14005186c
mov ebx, r15d
test ebx, ebx
js 0x140051bab
lea rax, [0x1400a14f0]
mov qword [rbp - 0x30], rax
mov r8d, edi
xor edx, edx
lea ecx, [rdx + 0x40]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_1.dll_OpenProcess]
mov rdi, rax
mov qword [rbp - 0x28], rax
test rax, rax
jne 0x1400518b9
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
mov eax, 0x80004005
cmovns ebx, eax
jmp 0x1400518bc
mov ebx, r15d
test ebx, ebx
js 0x140051b7b
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x48], rdi
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcess]
mov rcx, rax
mov eax, 2
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x40]
mov r8, rdi
mov rdx, r12
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_DuplicateHandle]
test eax, eax
jne 0x140051924
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
mov eax, 0x80004005
cmovns ebx, eax
test ebx, ebx
js 0x140051b30
mov ebx, 0x20
mov r8d, ebx
xor edx, edx
lea rcx, [rbp - 0x70]
call sub.api_ms_win_crt_private_l1_1_0.dll__o_memset
mov dword [rbp - 0x70], ebx
mov dword [rbp - 0x6c], 0x80
mov edx, 0x40000000
mov dword [rbp - 0x68], edx
lea rax, [0x1400a14f0]
mov qword [rsp + 0x68], rax
lea rcx, [rbp + 8]
cmp qword [rbp + 0x20], 8
cmovae rcx, qword [rbp + 8]
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
lea r9d, [rbx - 0x1d]
xor r8d, r8d
call qword [sym.imp.api_ms_win_core_file_l1_2_0.dll_CreateFile2]
mov r15, rax
mov qword [rsp + 0x70], rax
cmp rax, 0xffffffffffffffff
jne 0x14005199d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
jmp 0x14005199f
xor ebx, ebx
test ebx, ebx
js 0x140051b01
lea rax, [0x1400a14f0]
mov qword [rsp + 0x50], rax
and qword [rsp + 0x58], 0
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcess]
mov r8, rax
mov eax, 2
mov dword [rsp + 0x30], eax
and dword [rsp + 0x28], 0
mov dword [rsp + 0x20], eax
lea r9, [rsp + 0x58]
mov rdx, qword [rsp + 0x60]
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_DuplicateHandle]
test eax, eax
jne 0x140051a11
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
test ebx, ebx
mov eax, 0x80004005
cmovns ebx, eax
test ebx, ebx
js 0x140051ac7
mov r8d, 4
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x20]
call fcn.140067030
lea rax, [0x1400a3660]
mov qword [rbp - 0x20], rax
shr rsi, 4
test rsi, rsi
je 0x140051a40
mov ebx, dword [rbp]
test ebx, ebx
js 0x140051abd
lea r15, [r14 + 0x58]
mov rcx, r15
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockExclusive]
mov qword [rbp - 0x48], r15
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x78], xmm0
and qword [rbp - 0x78], 0
add rsi, rsi
mov rdx, qword [rbp - 8]
lea r8, [rdx + rsi*8]
lea rcx, [rsp + 0x78]
call fcn.1400533d8
lea rcx, [r14 + 0xe0]
lea rdx, [r14 + 0x60]
lea r9, [rsp + 0x78]
lea r8, [rsp + 0x68]
call fcn.140052964
mov ebx, eax
lea rcx, [rsp + 0x78]
call fcn.140014be8
nop
test r15, r15
je 0x140051aa9
mov rcx, r15
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockExclusive]
mov rcx, qword [rsp + 0x40]
and qword [rsp + 0x40], 0
mov qword [r13], rcx
mov r15, qword [rsp + 0x70]
lea rcx, [rbp - 0x20]
call fcn.1400670d8
nop
lea rax, [0x1400a14f0]
mov qword [rsp + 0x50], rax
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140051b01
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
test eax, eax
jne 0x140051b01
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000b684
nop
test r15, r15
je 0x140051b30
mov rcx, r15
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
xor r15d, r15d
test eax, eax
jne 0x140051b30
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000b684
nop
mov rdx, qword [rsp + 0x40]
test rdx, rdx
je 0x140051b7b
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_DuplicateHandle]
test eax, eax
jne 0x140051b7b
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000b684
nop
test rdi, rdi
je 0x140051ba7
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
test eax, eax
jne 0x140051ba7
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000b684
int3
test ebx, ebx
jns 0x140051bb5
mov eax, r15d
xchg dword [r14 + 0xd8], eax
test r12, r12
je 0x140051be1
mov rcx, r12
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
test eax, eax
jne 0x140051be1
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
call fcn.14000b684
nop
lea rcx, [rbp + 8]
call fcn.1400045b4
mov eax, ebx
mov rcx, qword [rbp + 0x48]
xor rcx, rsp
call fcn.140098120
add rsp, 0x158
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret