Function at 0x180045240
Capabilities:
Create pipe

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x128
lea rbp, [rsp + 0x80]
mov qword [rbp + 0xa0], 0xfffffffffffffffe
mov qword [rbp + 0x58], rcx
mov byte [rbp + 0x9d], dl
movzx eax, dl
mov ecx, 0x40080002
sub ecx, eax
mov dword [rbp + 0x54], ecx
mov qword [rbp + 0x88], 0
mov r12d, 8
lea rbx, [rbp + 0x18]
mov r15, qword [sym.imp.bcryptprimitives.dll_ProcessPrng]
xor esi, esi
mov qword [rbp - 0x10], 0
nop word cs:[rax + rax]
call qword [sym.imp.kernel32.dll_GetCurrentProcessId]
mov dword [rbp + 0x48], eax
nop dword [rax]
mov rax, qword [0x1800bdba0]
test rax, rax
jne 0x1800452f0
mov qword [rbp + 0x18], 0
mov edx, 8
mov rcx, rbx
call r15
mov rax, qword [rbp + 0x18]
mov qword [0x1800bdba0], rax
jmp 0x1800452c0
mov eax, 1
lock xadd qword [0x1800bdba0], rax
mov qword [rbp - 0x20], rax
lea rax, [rbp + 0x48]
mov qword [rbp - 8], rax
lea rax, [0x180020b20]
mov qword [rbp], rax
lea rax, [rbp - 0x20]
mov qword [rbp + 8], rax
lea rax, [fcn.18001fb30]
mov qword [rbp + 0x10], rax
lea rax, str..pipe__rust_anonymous_pipe1__.
mov qword [rbp + 0x18], rax
mov qword [rbp + 0x20], 2
mov qword [rbp + 0x38], 0
lea rax, [rbp - 8]
mov qword [rbp + 0x28], rax
mov qword [rbp + 0x30], 2
mov qword [rbp + 0x68], rdi
mov qword [rbp + 0x60], r14
mov byte [rbp + 0x9f], sil
mov byte [rbp + 0x9e], 0
lea rcx, [rbp - 0x40]
mov rdx, rbx
call fcn.18001ea60
test r14, r14
setne al
and sil, al
cmp sil, 1
jne 0x180045391
mov edx, 1
mov rcx, rdi
call fcn.18001e6a0
mov r9, qword [rbp - 0x40]
mov r8, qword [rbp - 0x38]
mov r10, qword [rbp - 0x30]
lea rsi, [r8 + r10]
test r10, r10
mov qword [rbp + 0x78], r8
mov qword [rbp + 0x80], r9
mov dword [rbp + 0x4c], r12d
mov qword [rbp - 0x18], r10
je 0x1800453d0
movzx ecx, byte [r8]
movzx r15d, cl
test r15b, r15b
js 0x1800453f0
lea r13, [r8 + 1]
jmp 0x180045454
mov r12d, 4
mov ebx, 8
xor r14d, r14d
xor r13d, r13d
xor r15d, r15d
xor edi, edi
jmp 0x1800454a8
mov eax, r15d
and eax, 0x1f
movzx edx, byte [r8 + 1]
and edx, 0x3f
cmp r15b, 0xdf
jbe 0x180045448
movzx r15d, byte [r8 + 2]
shl edx, 6
and r15d, 0x3f
or r15d, edx
cmp cl, 0xf0
jb 0x18004577f
lea r13, [r8 + 4]
movzx ecx, byte [r8 + 3]
and eax, 7
shl eax, 0x12
shl r15d, 6
and ecx, 0x3f
or ecx, r15d
or ecx, eax
mov r15d, ecx
cmp r15d, 0xffff
jbe 0x180045454
jmp 0x180045796
lea r13, [r8 + 2]
shl eax, 6
or eax, edx
mov r15d, eax
mov eax, 1
xor r14d, r14d
mov rcx, rsi
sub rcx, r13
add rcx, 3
mov rdx, 0xffffffffffffffff
cmovb rcx, rdx
shr rcx, 2
add rcx, rax
cmp rcx, 4
mov r12d, 3
cmovae r12, rcx
lea rbx, [r12*2 + 2]
movabs rax, 0x3ffffffffffffffe
cmp rcx, rax
ja 0x18004592d
inc r12
mov di, 1
movzx eax, byte [0x1800bdc28]
xor ecx, ecx
mov rdx, rbx
call fcn.180049660
test rax, rax
je 0x180045921
mov rcx, rax
mov rax, qword [rbp - 0x10]
inc eax
mov dword [rbp + 0x50], eax
mov word [rcx], r15w
mov ebx, 1
jmp 0x1800454f5
mov r12, r8
mov r14d, eax
mov rcx, qword [rbp + 0x90]
mov word [rcx + rbx*2], r15w
inc rbx
mov r8, r12
test r13, r13
mov qword [rbp + 0x90], rcx
je 0x180045560
test r14w, r14w
je 0x180045540
xor eax, eax
mov r15d, r14d
cmp rbx, r8
jne 0x1800454e0
mov rcx, rsi
sub rcx, r13
add rcx, 3
mov rdx, 0xffffffffffffffff
cmovb rcx, rdx
shr rcx, 2
movzx edx, di
cmp ax, 1
sbb rcx, 0xffffffffffffffff
add rcx, rdx
mov r14d, eax
jmp 0x18004557f
cmp r13, rsi
je 0x180045560
movzx ecx, byte [r13]
movzx r15d, cl
test r15b, r15b
js 0x180045626
inc r13
xor eax, eax
jmp 0x18004550f
cmp di, 1
jne 0x1800456d0
xor r13d, r13d
xor edi, edi
mov r15d, 0
mov ecx, 0
cmp rbx, r8
jne 0x1800455f0
lea rax, [rcx + 1]
add rax, rbx
mov qword [rbp + 0x70], r8
jb 0x180045902
lea r12, [rcx + rbx]
inc r12
lea rax, [r8 + r8]
cmp rax, r12
cmova r12, rax
cmp r12, 5
jae 0x1800455ae
mov r12d, 4
test r12, r12
js 0x180045902
lea r8, [r12 + r12]
movabs rcx, 0x7ffffffffffffffe
cmp r8, rcx
ja 0x180045913
cmp qword [rbp + 0x70], 0
je 0x1800455fb
mov rcx, qword [rbp + 0x90]
mov qword [rbp + 0x18], rcx
mov qword [rbp + 0x28], rax
mov eax, 2
jmp 0x1800455fd
mov r12, r8
xor r15d, r15d
jmp 0x1800454e6
xor eax, eax
mov qword [rbp + 0x20], rax
mov edx, 2
lea rcx, [rbp - 8]
lea r9, [rbp + 0x18]
call fcn.180035c80
cmp dword [rbp - 8], 1
je 0x180045904
mov rcx, qword [rbp]
jmp 0x1800454ed
mov eax, r15d
and eax, 0x1f
movzx edx, byte [r13 + 1]
and edx, 0x3f
cmp r15b, 0xdf
jbe 0x18004569e
movzx r15d, byte [r13 + 2]
shl edx, 6
and r15d, 0x3f
or r15d, edx
cmp cl, 0xf0
jb 0x1800456b1
movzx ecx, byte [r13 + 3]
add r13, 4
and eax, 7
shl eax, 0x12
shl r15d, 6
and ecx, 0x3f
or ecx, r15d
or ecx, eax
mov r15d, ecx
cmp r15d, 0xffff
jbe 0x1800456c4
lea ecx, [r15 + 0xff0000]
shr ecx, 0xa
or ecx, 0xd800
and r15d, 0x3ff
or r15d, 0xdc00
mov eax, r15d
mov r15d, ecx
jmp 0x18004550f
add r13, 2
shl eax, 6
or eax, edx
mov r15d, eax
xor eax, eax
jmp 0x18004550f
add r13, 3
shl eax, 0xc
or r15d, eax
cmp r15d, 0xffff
ja 0x180045675
xor eax, eax
jmp 0x18004550f
mov rsi, r8
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x10000
mov dword [rsp + 0x20], 0x10000
mov r13, rcx
mov edx, dword [rbp + 0x54]
mov r12d, dword [rbp + 0x4c]
mov r8d, r12d
mov r9d, 1
call qword [sym.imp.kernel32.dll_CreateNamedPipeW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x180045823
call qword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [rbp + 0x50]
cmp ecx, 9
mov rdi, qword [rbp + 0x78]
mov r14, qword [rbp + 0x80]
mov r15, qword [sym.imp.bcryptprimitives.dll_ProcessPrng]
mov rdx, rsi
jg 0x1800457c4
cmp eax, 5
jne 0x180045750
mov eax, ecx
mov qword [rbp - 0x10], rax
jmp 0x18004575d
test r12d, r12d
je 0x1800457c4
xor r12d, r12d
cmp eax, 0x57
jne 0x1800457c4
mov sil, 1
test rdx, rdx
lea rbx, [rbp + 0x18]
je 0x1800452b0
mov edx, 2
mov rcx, r13
call fcn.18001e6a0
jmp 0x1800452b0
lea r13, [r8 + 3]
shl eax, 0xc
or r15d, eax
cmp r15d, 0xffff
jbe 0x180045454
lea ecx, [r15 + 0xff0000]
shr ecx, 0xa
or ecx, 0xd800
and r15d, 0x3ff
or r15d, 0xdc00
mov eax, 2
mov r14d, r15d
mov r15d, ecx
jmp 0x18004545c
shl rax, 0x20
or rax, 2
mov rcx, qword [rbp + 0x58]
mov qword [rcx + 8], rax
mov qword [rcx], 1
test rdx, rdx
je 0x1800457ed
mov edx, 2
mov rcx, r13
call fcn.18001e6a0
test r14, r14
je 0x1800457ff
mov edx, 1
mov rcx, rdi
call fcn.18001e6a0
cmp rbx, 0xffffffffffffffff
je 0x18004580e
mov rcx, rbx
call qword [sym.imp.kernel32.dll_CloseHandle]
nop
add rsp, 0x128
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
test rsi, rsi
mov rdi, qword [rbp + 0x78]
mov r14, qword [rbp + 0x80]
je 0x180045840
mov edx, 2
mov rcx, r13
call fcn.18001e6a0
mov dword [rbp + 0x18], 0
mov dword [rbp + 0x38], 0
mov word [rbp + 0x3c], 0
movzx eax, byte [rbp + 0x9d]
mov byte [rbp + 0x39], al
xor al, 1
mov byte [rbp + 0x38], al
xorps xmm0, xmm0
movups xmmword [rbp + 0x28], xmm0
mov dword [rbp - 8], 0x18
mov qword [rbp], 0
mov dword [rbp + 8], 1
lea rax, [rbp - 8]
mov qword [rbp + 0x20], rax
mov qword [rbp + 0x68], rdi
mov qword [rbp + 0x60], r14
mov qword [rbp - 0x28], rbx
mov byte [rbp + 0x9f], 1
mov byte [rbp + 0x9e], 1
lea r8, [rbp + 0x18]
mov rcx, rdi
mov rdx, qword [rbp - 0x18]
call fcn.180037ca0
test rax, rax
je 0x1800458d4
mov rax, qword [rbp + 0x58]
mov qword [rax + 8], rdx
mov qword [rax], 1
test r14, r14
jne 0x1800457f2
jmp 0x1800457ff
mov rax, qword [rbp + 0x58]
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rdx
mov qword [rax], 0
test r14, r14
je 0x18004580e
mov edx, 1
mov rcx, rdi
call fcn.18001e6a0
jmp 0x18004580e
jmp 0x180045913
mov rax, qword [rbp]
mov qword [rbp + 0x88], rax
mov rdx, qword [rbp + 8]
mov rcx, qword [rbp + 0x88]
call fcn.18006c931
jmp 0x18004595d
mov eax, 2
mov qword [rbp + 0x88], rax
mov rax, qword [rbp + 0x78]
mov qword [rbp + 0x68], rax
mov rax, qword [rbp + 0x80]
mov qword [rbp + 0x60], rax
mov byte [rbp + 0x9f], 1
mov byte [rbp + 0x9e], 0
mov rcx, qword [rbp + 0x88]
mov rdx, rbx
call fcn.18006c931
ud2