Function at 0x140021230
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, 0x148
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0xb0], xmm6
mov qword [rbp + 0xa8], 0xfffffffffffffffe
mov qword [rbp + 0x48], rcx
mov byte [rbp + 0xa5], dl
movzx eax, dl
mov ecx, 0x40080002
sub ecx, eax
mov dword [rbp + 0x3c], ecx
xor edi, edi
mov r14d, 8
mov sil, 1
xorps xmm6, xmm6
mov rbx, qword [sym.imp.bcrypt.dll_BCryptGenRandom]
xor eax, eax
mov qword [rbp - 0x38], rax
jmp 0x1400212ac
mov dil, 1
xor esi, esi
mov rbx, qword [sym.imp.bcrypt.dll_BCryptGenRandom]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [rbp + 0x34], eax
jmp 0x1400212cb
mov rax, qword [rbp + 0x50]
xchg qword [0x140567180], rax
mov rax, qword [0x140567180]
test rax, rax
jne 0x140021310
movaps xmmword [rbp + 0x50], xmm6
xor ecx, ecx
lea rdx, [rbp + 0x50]
mov r8d, 0x10
mov r9d, 2
call rbx
test eax, eax
jns 0x1400212c0
mov byte [rbp + 0xa7], dil
mov byte [rbp + 0xa6], 1
call fcn.1400229f0
jmp 0x1400212c4
mov eax, 1
lock xadd qword [0x140567180], rax
mov qword [rbp - 0x30], rax
lea rax, [rbp + 0x34]
mov qword [rbp - 0x10], rax
lea rax, [0x140004880]
mov qword [rbp - 8], rax
lea rax, [rbp - 0x30]
mov qword [rbp], rax
lea rax, [fcn.140003520]
mov qword [rbp + 8], rax
lea rax, str..pipe__rust_anonymous_pipe1__.
mov qword [rbp + 0x50], rax
mov qword [rbp + 0x58], 2
mov qword [rbp + 0x70], 0
lea rax, [rbp - 0x10]
mov qword [rbp + 0x60], rax
mov qword [rbp + 0x68], 2
mov byte [rbp + 0xa7], dil
mov byte [rbp + 0xa6], 1
lea rcx, [rbp + 0x80]
lea rdx, [rbp + 0x50]
call fcn.140003010
movups xmm0, xmmword [rbp + 0x80]
movaps xmmword [rbp + 0x50], xmm0
mov rax, qword [rbp + 0x90]
cmp qword [rbp + 0x18], 0
mov qword [rbp + 0x60], rax
sete al
or sil, al
test sil, 1
jne 0x1400213c6
mov rcx, qword [rbp + 0x10]
mov edx, 1
call fcn.140007680
mov rax, qword [rbp + 0x60]
mov qword [rbp + 0x20], rax
movaps xmm0, xmmword [rbp + 0x50]
movaps xmmword [rbp + 0x10], xmm0
mov r15, qword [rbp + 0x10]
lea rcx, [r15 + rax]
mov qword [rbp + 0x98], rcx
test rax, rax
mov dword [rbp + 0x40], r14d
je 0x140021400
movzx ecx, byte [r15]
movzx edi, cl
test dil, dil
js 0x140021420
inc r15
jmp 0x14002147c
xor edi, edi
xor r15d, r15d
xor r12d, r12d
xor r14d, r14d
xor ebx, ebx
jmp 0x1400214a9
mov eax, edi
and eax, 0x1f
movzx edx, byte [r15 + 1]
and edx, 0x3f
cmp dil, 0xdf
jbe 0x140021471
movzx edi, byte [r15 + 2]
shl edx, 6
and edi, 0x3f
or edi, edx
cmp cl, 0xf0
jb 0x140021803
movzx ecx, byte [r15 + 3]
add r15, 4
and eax, 7
shl eax, 0x12
shl edi, 6
and ecx, 0x3f
or ecx, edi
or ecx, eax
mov edi, ecx
cmp edi, 0xffff
jbe 0x14002147c
jmp 0x140021818
add r15, 2
shl eax, 6
or eax, edx
mov edi, eax
mov eax, 1
xor r12d, r12d
mov rbx, qword [rbp + 0x98]
sub rbx, r15
add rbx, 3
mov rcx, 0xffffffffffffffff
cmovb rbx, rcx
shr rbx, 2
add rbx, rax
mov r14w, 1
cmp rbx, 4
mov eax, 3
cmovb rbx, rax
movabs rax, 0x3fffffffffffffff
cmp rbx, rax
jae 0x1400219c9
inc rbx
lea rsi, [rbx + rbx]
mov edx, 2
mov rcx, rsi
call fcn.1400075f0
test rax, rax
je 0x1400219ac
mov rcx, qword [rbp - 0x38]
inc ecx
mov dword [rbp + 0x38], ecx
mov word [rax], di
mov qword [rbp + 0x80], rax
mov qword [rbp + 0x88], rbx
mov qword [rbp + 0x90], 1
mov esi, 1
mov rdi, rbx
jmp 0x14002152b
mov r12d, ecx
mov word [rax + rsi*2], r13w
inc rsi
test r15, r15
je 0x1400215b0
test r12w, r12w
je 0x140021580
xor ecx, ecx
mov r13d, r12d
cmp rsi, rdi
jne 0x140021520
mov rdx, qword [rbp + 0x98]
sub rdx, r15
add rdx, 3
mov rax, 0xffffffffffffffff
cmovb rdx, rax
shr rdx, 2
cmp cx, 1
sbb rdx, 0xffffffffffffffff
cmp r14w, 1
sbb rdx, 0xffffffffffffffff
mov r12d, ecx
jmp 0x1400215db
cmp r15, qword [rbp + 0x98]
je 0x1400215b0
movzx edx, byte [r15]
movzx r13d, dl
test r13b, r13b
js 0x14002168c
inc r15
xor ecx, ecx
jmp 0x14002153f
cmp r14w, 1
jne 0x140021740
xor r13d, r13d
mov rdi, rbx
mov r15d, 0
mov r14d, 0
mov edx, 0
cmp rsi, rbx
jne 0x140021523
inc rdx
add rdx, rsi
jb 0x140021989
mov rdi, qword [rbp + 0x88]
lea rax, [rdi + rdi]
mov rbx, rax
cmp rax, rdx
ja 0x1400215fd
mov rbx, rdx
cmp rbx, 5
jae 0x140021608
mov ebx, 4
xor edx, edx
mov rcx, rbx
shr rcx, 0x3e
sete dl
lea r8, [rbx + rbx]
add rdx, rdx
test rdi, rdi
je 0x140021636
mov rcx, qword [rbp + 0x80]
mov qword [rbp + 0x50], rcx
mov qword [rbp + 0x60], rax
mov eax, 2
jmp 0x140021638
xor eax, eax
mov qword [rbp + 0x58], rax
lea rcx, [rbp - 0x10]
lea r9, [rbp + 0x50]
call fcn.14000f5a0
cmp qword [rbp - 0x10], 0
mov rax, qword [rbp - 8]
je 0x140021676
movabs rcx, 0x8000000000000001
cmp rax, rcx
jne 0x140021984
mov rax, qword [rbp + 0x80]
mov rbx, rdi
jmp 0x140021523
mov qword [rbp + 0x80], rax
mov qword [rbp + 0x88], rbx
mov rdi, rbx
jmp 0x140021523
mov ecx, r13d
and ecx, 0x1f
movzx r8d, byte [r15 + 1]
and r8d, 0x3f
cmp r13b, 0xdf
jbe 0x140021706
movzx r13d, byte [r15 + 2]
shl r8d, 6
and r13d, 0x3f
or r13d, r8d
cmp dl, 0xf0
jb 0x14002171a
movzx edx, byte [r15 + 3]
add r15, 4
and ecx, 7
shl ecx, 0x12
shl r13d, 6
and edx, 0x3f
or edx, r13d
or edx, ecx
mov r13d, edx
cmp r13d, 0xffff
jbe 0x14002172d
lea edx, [r13 + 0xff0000]
shr edx, 0xa
or edx, 0xd800
and r13d, 0x3ff
or r13d, 0xdc00
mov ecx, r13d
mov r13d, edx
jmp 0x14002153f
add r15, 2
shl ecx, 6
or ecx, r8d
mov r13d, ecx
xor ecx, ecx
jmp 0x14002153f
add r15, 3
shl ecx, 0xc
or r13d, ecx
cmp r13d, 0xffff
ja 0x1400216dd
xor ecx, ecx
jmp 0x14002153f
movups xmm0, xmmword [rbp + 0x80]
movaps xmmword [rbp - 0x30], xmm0
mov qword [rbp - 0x20], rsi
mov rbx, qword [rbp - 0x30]
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x10000
mov dword [rsp + 0x20], 0x10000
mov rcx, rbx
mov edx, dword [rbp + 0x3c]
mov r14d, dword [rbp + 0x40]
mov r8d, r14d
mov r9d, 1
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x1400218ab
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rax
shl rcx, 0x20
or rcx, 2
mov qword [rbp + 0x50], rcx
mov edx, dword [rbp + 0x38]
cmp edx, 0xa
jge 0x140021842
cmp eax, 5
jne 0x1400217d0
mov eax, edx
mov qword [rbp - 0x38], rax
jmp 0x1400217dd
test r14d, r14d
je 0x140021842
xor r14d, r14d
cmp eax, 0x57
jne 0x140021842
lea rcx, [rbp + 0x50]
call fcn.14000e950
cmp qword [rbp - 0x28], 0
je 0x1400212a0
mov edx, 2
mov rcx, rbx
call fcn.140007680
jmp 0x1400212a0
add r15, 3
shl eax, 0xc
or edi, eax
cmp edi, 0xffff
jbe 0x14002147c
lea ecx, [rdi + 0xff0000]
shr ecx, 0xa
or ecx, 0xd800
and edi, 0x3ff
or edi, 0xdc00
mov r12d, edi
mov eax, 2
mov edi, ecx
jmp 0x140021484
mov rax, qword [rbp + 0x48]
mov qword [rax + 8], rcx
mov qword [rax], 1
cmp qword [rbp - 0x28], 0
je 0x140021865
mov edx, 2
mov rcx, rbx
call fcn.140007680
mov rdi, 0xffffffffffffffff
cmp qword [rbp + 0x18], 0
je 0x140021881
mov rcx, qword [rbp + 0x10]
mov edx, 1
call fcn.140007680
cmp rsi, 0xffffffffffffffff
je 0x140021890
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movaps xmm6, xmmword [rbp + 0xb0]
add rsp, 0x148
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
cmp qword [rbp - 0x28], 0
je 0x1400218bf
mov edx, 2
mov rcx, rbx
call fcn.140007680
mov dword [rbp + 0x50], 0
mov dword [rbp + 0x70], 0
mov word [rbp + 0x74], 0
movzx eax, byte [rbp + 0xa5]
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 - 8], 0
mov dword [rbp], 1
lea rax, [rbp - 0x10]
mov qword [rbp + 0x58], rax
mov rdi, qword [rbp + 0x10]
mov rdx, qword [rbp + 0x20]
mov qword [rbp - 0x40], rsi
mov byte [rbp + 0xa7], 1
mov byte [rbp + 0xa6], 0
lea r8, [rbp + 0x50]
mov rcx, rdi
call fcn.1400162a0
test rax, rax
je 0x140021954
mov rax, qword [rbp + 0x48]
mov qword [rax + 8], rdx
mov qword [rax], 1
mov rdi, rsi
cmp qword [rbp + 0x18], 0
jne 0x140021873
jmp 0x140021881
mov rax, qword [rbp + 0x48]
mov qword [rax + 8], rsi
mov qword [rax + 0x10], rdx
mov qword [rax], 0
cmp qword [rbp + 0x18], 0
je 0x140021890
mov edx, 1
mov rcx, rdi
call fcn.140007680
jmp 0x140021890
test rax, rax
jne 0x140021997
mov qword [rbp + 0x90], rsi
call fcn.140002e60
jmp 0x1400219dc
mov rdx, qword [rbp]
mov qword [rbp + 0x90], rsi
mov rcx, rax
call fcn.140028c40
jmp 0x1400219dc
mov byte [rbp + 0xa7], 1
mov byte [rbp + 0xa6], 1
mov ecx, 2
mov rdx, rsi
call fcn.140028c40
jmp 0x1400219dc
mov byte [rbp + 0xa7], 1
mov byte [rbp + 0xa6], 1
call fcn.140002e60
ud2