Function at 0x140021b10
Capabilities:
Create pipe
Generate random numbers via winapi

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x138
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0xa0], xmm6
mov qword [rbp + 0x98], 0xfffffffffffffffe
mov qword [rbp + 0x48], rcx
mov byte [rbp + 0x95], dl
movzx eax, dl
mov ecx, 0x40080002
sub ecx, eax
mov dword [rbp + 0x3c], ecx
xor r12d, r12d
mov r15d, 8
mov r14b, 1
xorps xmm6, xmm6
mov rsi, qword [sym.imp.bcrypt.dll_BCryptGenRandom]
xor eax, eax
mov qword [rbp - 0x18], rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [rbp + 0x30], eax
jmp 0x140021b8b
mov rax, qword [rbp + 0x50]
xchg qword [0x1400361b8], rax
mov rax, qword [0x1400361b8]
test rax, rax
jne 0x140021bd0
movaps xmmword [rbp + 0x50], xmm6
xor ecx, ecx
lea rdx, [rbp + 0x50]
mov r8d, 0x10
mov r9d, 2
call rsi
test eax, eax
jns 0x140021b80
mov byte [rbp + 0x97], r12b
mov byte [rbp + 0x96], 1
call fcn.140022e90
jmp 0x140021b84
mov eax, 1
lock xadd qword [0x1400361b8], rax
mov qword [rbp - 0x20], rax
lea rax, [rbp + 0x30]
mov qword [rbp + 0x10], rax
lea rax, [0x140003f60]
mov qword [rbp + 0x18], rax
lea rax, [rbp - 0x20]
mov qword [rbp + 0x20], rax
lea rax, [fcn.140002410]
mov qword [rbp + 0x28], rax
mov qword [rbp + 0x50], 0
lea rax, str..pipe__rust_anonymous_pipe1__.
mov qword [rbp + 0x60], rax
mov qword [rbp + 0x68], 2
lea rax, [rbp + 0x10]
mov qword [rbp + 0x70], rax
mov qword [rbp + 0x78], 2
mov byte [rbp + 0x97], r12b
mov byte [rbp + 0x96], 1
lea rcx, [rbp - 0x40]
lea rdx, [rbp + 0x50]
call fcn.140001f30
movups xmm0, xmmword [rbp - 0x40]
movaps xmmword [rbp + 0x50], xmm0
mov rax, qword [rbp - 0x30]
mov qword [rbp + 0x60], rax
test r14b, 1
jne 0x140021c7d
mov rdx, qword [rbp - 0x10]
test rdx, rdx
je 0x140021c7d
mov rcx, qword [rbp - 8]
not rdx
shr rdx, 0x3f
call fcn.140006e00
mov rax, qword [rbp + 0x60]
mov qword [rbp], rax
movaps xmm0, xmmword [rbp + 0x50]
movaps xmmword [rbp - 0x10], xmm0
mov r12, qword [rbp - 8]
lea rcx, [r12 + rax]
mov qword [rbp + 0x40], rcx
test rax, rax
lea rsi, [rbp + 0x10]
mov dword [rbp + 0x34], r15d
je 0x140021cc0
movzx ecx, byte [r12]
movzx r13d, cl
test r13b, r13b
js 0x140021ce0
inc r12
jmp 0x140021d47
xor r13d, r13d
xor edi, edi
xor r15d, r15d
xor r12d, r12d
xor r14d, r14d
jmp 0x140021d70
mov eax, r13d
and eax, 0x1f
movzx edx, byte [r12 + 1]
and edx, 0x3f
cmp r13b, 0xdf
jbe 0x140021d3b
movzx r13d, byte [r12 + 2]
shl edx, 6
and r13d, 0x3f
or r13d, edx
cmp cl, 0xf0
jb 0x1400220c1
movzx ecx, byte [r12 + 3]
add r12, 4
and eax, 7
shl eax, 0x12
shl r13d, 6
and ecx, 0x3f
or ecx, r13d
or ecx, eax
mov r13d, ecx
cmp r13d, 0xffff
jbe 0x140021d47
jmp 0x1400220d8
add r12, 2
shl eax, 6
or eax, edx
mov r13d, eax
mov eax, 1
xor r15d, r15d
mov r14, qword [rbp + 0x40]
sub r14, r12
add r14, 3
mov rcx, 0xffffffffffffffff
cmovb r14, rcx
shr r14, 2
add r14, rax
mov di, 1
cmp r14, 4
mov eax, 3
cmovb r14, rax
movabs rax, 0x3fffffffffffffff
cmp r14, rax
jae 0x140022275
inc r14
lea rbx, [r14 + r14]
mov edx, 2
mov rcx, rbx
call fcn.140006d70
test rax, rax
je 0x140022258
mov rcx, rax
mov rax, qword [rbp - 0x18]
inc eax
mov dword [rbp + 0x38], eax
mov word [rcx], r13w
mov ebx, 1
mov rax, r14
mov qword [rbp + 0x88], rcx
mov r8, rdi
jmp 0x140021e18
mov rdx, qword [rbp + 0x20]
movabs rax, 0x8000000000000001
cmp rdx, rax
jne 0x140022245
mov r8, rdi
mov rax, qword [rbp + 0x80]
mov r14, rax
mov rcx, qword [rbp + 0x88]
mov edx, r15d
mov word [rcx + rbx*2], dx
inc rbx
mov r15d, r13d
test r12, r12
je 0x140021e80
test r15w, r15w
je 0x140021e60
xor r13d, r13d
cmp rbx, rax
jne 0x140021e0b
mov qword [rbp + 0x80], r14
mov r14, qword [rbp + 0x40]
sub r14, r12
add r14, 3
mov rax, 0xffffffffffffffff
cmovb r14, rax
shr r14, 2
cmp r13w, 1
sbb r14, 0xffffffffffffffff
cmp r8w, 1
sbb r14, 0xffffffffffffffff
jmp 0x140021ea8
cmp r12, qword [rbp + 0x40]
je 0x140021e80
movzx edx, byte [r12]
movzx r15d, dl
test r15b, r15b
js 0x140021f54
inc r12
jmp 0x140021e23
cmp r8w, 1
jne 0x140022010
xor r12d, r12d
xor edx, edx
cmp rbx, r14
jne 0x140021f10
mov qword [rbp + 0x80], r14
mov r13d, r15d
xor r8d, r8d
xor r15d, r15d
xor r14d, r14d
inc r14
add r14, rbx
jb 0x14002224a
mov rdi, r8
mov rax, qword [rbp + 0x80]
add rax, rax
cmp rax, r14
cmova r14, rax
cmp r14, 5
jae 0x140021ed4
mov r14d, 4
xor r8d, r8d
mov rcx, r14
shr rcx, 0x3e
sete r8b
lea rdx, [r14 + r14]
add r8, r8
cmp qword [rbp + 0x80], 0
je 0x140021f1e
mov rcx, qword [rbp + 0x88]
mov qword [rbp + 0x50], rcx
mov qword [rbp + 0x58], rax
mov eax, 2
jmp 0x140021f20
mov rax, r14
xor r8d, r8d
mov r13d, r15d
jmp 0x140021e0e
xor eax, eax
mov qword [rbp + 0x60], rax
mov rcx, rsi
lea r9, [rbp + 0x50]
call fcn.14000eb90
cmp qword [rbp + 0x10], 0
mov rcx, qword [rbp + 0x18]
jne 0x140021de0
mov qword [rbp + 0x88], rcx
mov rax, r14
mov edx, r15d
mov r8, rdi
jmp 0x140021e0e
mov edi, r15d
and edi, 0x1f
movzx esi, byte [r12 + 1]
and esi, 0x3f
cmp r15b, 0xdf
jbe 0x140021f9f
movzx r15d, byte [r12 + 2]
shl esi, 6
and r15d, 0x3f
or r15d, esi
cmp dl, 0xf0
jb 0x140021fb4
movzx edx, byte [r12 + 3]
add r12, 4
and edi, 7
shl edi, 0x12
shl r15d, 6
and edx, 0x3f
or edx, r15d
or edx, edi
mov r15d, edx
jmp 0x140021fbe
add r12, 2
shl edi, 6
or edi, esi
mov r15d, edi
lea rsi, [rbp + 0x10]
jmp 0x140021e23
add r12, 3
shl edi, 0xc
or r15d, edi
lea rsi, [rbp + 0x10]
cmp r15d, 0xffff
jbe 0x140021e23
add r15d, 0xffff0000
mov edx, r15d
shr edx, 0xa
or edx, 0xd800
and r15d, 0x3ff
or r15d, 0xdc00
mov r13d, r15d
mov r15d, edx
cmp rbx, rax
jne 0x140021e0b
jmp 0x140021e2b
mov rdi, r14
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x10000
mov dword [rsp + 0x20], 0x10000
mov rbx, qword [rbp + 0x88]
mov rcx, rbx
mov edx, dword [rbp + 0x3c]
mov r15d, dword [rbp + 0x34]
mov r8d, r15d
mov r9d, 1
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x140022142
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbp + 0x38]
cmp ecx, 0xa
mov rsi, qword [sym.imp.bcrypt.dll_BCryptGenRandom]
jge 0x140022109
cmp eax, 5
jne 0x140022090
mov eax, ecx
mov qword [rbp - 0x18], rax
jmp 0x14002209d
test r15d, r15d
je 0x140022109
xor r15d, r15d
cmp eax, 0x57
jne 0x140022109
mov r12b, 1
xor r14d, r14d
test rdi, rdi
je 0x140021b70
mov edx, 2
mov rcx, rbx
call fcn.140006e00
xor r14d, r14d
jmp 0x140021b70
add r12, 3
shl eax, 0xc
or r13d, eax
cmp r13d, 0xffff
jbe 0x140021d47
add r13d, 0xffff0000
mov ecx, r13d
shr ecx, 0xa
or ecx, 0xd800
and r13d, 0x3ff
or r13d, 0xdc00
mov r15d, r13d
mov eax, 2
mov r13d, ecx
jmp 0x140021d4f
shl rax, 0x20
or rax, 2
mov rcx, qword [rbp + 0x48]
mov qword [rcx + 8], rax
mov qword [rcx], 1
mov rsi, 0xffffffffffffffff
test rdi, rdi
je 0x1400221d5
mov edx, 2
mov rcx, rbx
call fcn.140006e00
jmp 0x1400221d5
test rdi, rdi
je 0x140022154
mov edx, 2
mov rcx, rbx
call fcn.140006e00
mov dword [rbp + 0x58], 0
mov dword [rbp + 0x70], 0
mov word [rbp + 0x74], 0
movzx eax, byte [rbp + 0x95]
mov byte [rbp + 0x71], al
xor al, 1
mov byte [rbp + 0x70], al
xorps xmm0, xmm0
movups xmmword [rbp + 0x60], xmm0
mov dword [rbp + 0x10], 0x18
mov qword [rbp + 0x18], 0
mov dword [rbp + 0x20], 1
mov qword [rbp + 0x50], rsi
mov rsi, qword [rbp - 8]
mov rdx, qword [rbp]
mov qword [rbp - 0x28], r14
mov byte [rbp + 0x97], 1
mov byte [rbp + 0x96], 0
lea r8, [rbp + 0x50]
mov rcx, rsi
call fcn.140015800
test rax, rax
je 0x140022218
mov rax, qword [rbp + 0x48]
mov qword [rax + 8], rdx
mov qword [rax], 1
mov rsi, r14
mov rdx, qword [rbp - 0x10]
test rdx, rdx
je 0x1400221ee
mov rcx, qword [rbp - 8]
not rdx
shr rdx, 0x3f
call fcn.140006e00
cmp r14, 0xffffffffffffffff
je 0x1400221fd
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movaps xmm6, xmmword [rbp + 0xa0]
add rsp, 0x138
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov rax, qword [rbp + 0x48]
mov qword [rax + 8], r14
mov qword [rax + 0x10], rdx
mov qword [rax], 0
mov rdx, qword [rbp - 0x10]
test rdx, rdx
je 0x1400221fd
not rdx
shr rdx, 0x3f
mov rcx, rsi
call fcn.140006e00
jmp 0x1400221fd
test rdx, rdx
jne 0x140022251
call fcn.140001d60
jmp 0x140022288
call fcn.140028ff0
jmp 0x140022288
mov byte [rbp + 0x97], 1
mov byte [rbp + 0x96], 1
mov edx, 2
mov rcx, rbx
call fcn.140028ff0
jmp 0x140022288
mov byte [rbp + 0x97], 1
mov byte [rbp + 0x96], 1
call fcn.140001d60
ud2