Function at 0x14003a850
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, 0x128
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0x90], xmm6
mov qword [rbp + 0x88], 0xfffffffffffffffe
mov qword [rbp + 0x38], rcx
mov byte [rbp + 0x85], dl
movzx eax, dl
mov ecx, 0x40080002
sub ecx, eax
mov dword [rbp + 0x34], ecx
xor edi, edi
mov ebx, 8
mov r14b, 1
xorps xmm6, xmm6
mov rsi, qword [sym.imp.bcrypt.dll_BCryptGenRandom]
xor eax, eax
mov qword [rbp - 0x18], rax
nop
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [rbp + 0x28], eax
jmp 0x14003a8cb
mov rax, qword [rbp + 0x40]
xchg qword [0x141072bd8], rax
mov rax, qword [0x141072bd8]
test rax, rax
jne 0x14003a910
movaps xmmword [rbp + 0x40], xmm6
xor ecx, ecx
lea rdx, [rbp + 0x40]
mov r8d, 0x10
mov r9d, 2
call rsi
test eax, eax
jns 0x14003a8c0
mov byte [rbp + 0x87], dil
mov byte [rbp + 0x86], 1
call fcn.14003c0f0
jmp 0x14003a8c4
mov eax, 1
lock xadd qword [0x141072bd8], rax
mov qword [rbp - 0x20], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 0x10], rax
lea rax, [0x140017c40]
mov qword [rbp - 8], rax
lea rax, [rbp - 0x20]
mov qword [rbp], rax
lea rax, [fcn.140016130]
mov qword [rbp + 8], rax
mov qword [rbp + 0x40], 0
lea rax, [0x1410616f8]
mov qword [rbp + 0x50], rax
mov qword [rbp + 0x58], 2
lea rax, [rbp - 0x10]
mov qword [rbp + 0x60], rax
mov qword [rbp + 0x68], 2
mov byte [rbp + 0x87], dil
mov byte [rbp + 0x86], 1
lea rcx, [rbp - 0x40]
lea rdx, [rbp + 0x40]
call fcn.140012550
movups xmm0, xmmword [rbp - 0x40]
movaps xmmword [rbp + 0x40], xmm0
mov rax, qword [rbp - 0x30]
mov qword [rbp + 0x50], rax
test r14b, 1
jne 0x14003a9be
cmp qword [rbp + 0x10], 0
je 0x14003a9be
mov r8, qword [rbp + 0x18]
mov rcx, qword [0x141072bd0]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rax, qword [rbp + 0x50]
mov qword [rbp + 0x20], rax
movaps xmm0, xmmword [rbp + 0x40]
movaps xmmword [rbp + 0x10], xmm0
mov r14, qword [rbp + 0x18]
lea r15, [r14 + rax]
test rax, rax
mov dword [rbp + 0x2c], ebx
je 0x14003a9f0
movzx ecx, byte [r14]
movzx edi, cl
test dil, dil
js 0x14003aa10
inc r14
jmp 0x14003aa6c
xor edi, edi
xor r12d, r12d
xor r13d, r13d
xor r14d, r14d
xor edx, edx
jmp 0x14003aa95
mov eax, edi
and eax, 0x1f
movzx edx, byte [r14 + 1]
and edx, 0x3f
cmp dil, 0xdf
jbe 0x14003aa61
movzx edi, byte [r14 + 2]
shl edx, 6
and edi, 0x3f
or edi, edx
cmp cl, 0xf0
jb 0x14003adfc
movzx ecx, byte [r14 + 3]
add r14, 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 0x14003aa6c
jmp 0x14003ae11
add r14, 2
shl eax, 6
or eax, edx
mov edi, eax
mov eax, 1
xor r13d, r13d
mov rdx, r15
sub rdx, r14
add rdx, 3
mov rcx, 0xffffffffffffffff
cmovb rdx, rcx
shr rdx, 2
add rdx, rax
mov r12w, 1
cmp rdx, 4
mov eax, 3
cmovb rdx, rax
movabs rax, 0x3fffffffffffffff
cmp rdx, rax
jae 0x14003afcc
inc rdx
mov rbx, rdx
lea rsi, [rdx + rdx]
mov rax, qword [0x141072bd0]
test rax, rax
jne 0x14003aae1
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x14003afaf
mov qword [0x141072bd0], rax
mov rcx, rax
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x14003afaf
mov rcx, rax
mov rax, qword [rbp - 0x18]
inc eax
mov dword [rbp + 0x30], eax
mov word [rcx], di
mov edi, 1
mov rsi, rbx
mov rax, rbx
mov qword [rbp + 0x78], rcx
jmp 0x14003ab2c
mov qword [rbp + 0x78], rcx
mov rax, rsi
mov edx, r13d
mov word [rcx + rdi*2], dx
inc rdi
mov r13d, ebx
test r14, r14
je 0x14003abb0
test r13w, r13w
je 0x14003ab80
xor ebx, ebx
cmp rdi, rax
jne 0x14003ab1f
mov qword [rbp + 0x70], rsi
mov rsi, r15
sub rsi, r14
add rsi, 3
mov rax, 0xffffffffffffffff
cmovb rsi, rax
shr rsi, 2
cmp bx, 1
sbb rsi, 0xffffffffffffffff
cmp r12w, 1
sbb rsi, 0xffffffffffffffff
inc rsi
add rsi, rdi
jae 0x14003abe0
jmp 0x14003afa1
cmp r14, r15
je 0x14003abb0
movzx ebx, byte [r14]
movzx r13d, bl
test r13b, r13b
js 0x14003ac87
inc r14
xor ebx, ebx
cmp rdi, rax
jne 0x14003ab1f
jmp 0x14003ab3e
cmp r12w, 1
jne 0x14003ad50
xor r14d, r14d
xor edx, edx
cmp rdi, rsi
jne 0x14003ac30
mov qword [rbp + 0x70], rsi
mov ebx, r13d
xor r12d, r12d
xor r13d, r13d
xor esi, esi
inc rsi
add rsi, rdi
jb 0x14003afa1
mov rax, qword [rbp + 0x70]
add rax, rax
cmp rax, rsi
cmova rsi, rax
cmp rsi, 5
jae 0x14003abf9
mov esi, 4
xor r8d, r8d
mov rcx, rsi
shr rcx, 0x3e
sete r8b
lea rdx, [rsi + rsi]
add r8, r8
cmp qword [rbp + 0x70], 0
je 0x14003ac3e
mov rcx, qword [rbp + 0x78]
mov qword [rbp + 0x40], rcx
mov qword [rbp + 0x48], rax
mov eax, 2
jmp 0x14003ac40
mov rax, rsi
xor r12d, r12d
mov ebx, r13d
jmp 0x14003ab22
xor eax, eax
mov qword [rbp + 0x50], rax
lea rcx, [rbp - 0x10]
lea r9, [rbp + 0x40]
call fcn.140006a00
cmp qword [rbp - 0x10], 0
mov rcx, qword [rbp - 8]
je 0x14003ab18
mov rdx, qword [rbp]
movabs rax, 0x8000000000000001
cmp rdx, rax
jne 0x14003af9c
mov rax, qword [rbp + 0x70]
mov rsi, rax
mov rcx, qword [rbp + 0x78]
jmp 0x14003ab1f
mov r8, rsi
mov edx, r13d
and edx, 0x1f
movzx esi, byte [r14 + 1]
and esi, 0x3f
cmp r13b, 0xdf
jbe 0x14003ace2
movzx r13d, byte [r14 + 2]
shl esi, 6
and r13d, 0x3f
or r13d, esi
cmp bl, 0xf0
jb 0x14003ad01
movzx ebx, byte [r14 + 3]
add r14, 4
and edx, 7
shl edx, 0x12
shl r13d, 6
and ebx, 0x3f
or ebx, r13d
or ebx, edx
mov r13d, ebx
mov rsi, r8
cmp r13d, 0xffff
jbe 0x14003ab37
jmp 0x14003ad1b
add r14, 2
shl edx, 6
or edx, esi
mov r13d, edx
mov rsi, r8
xor ebx, ebx
cmp rdi, rax
jne 0x14003ab1f
jmp 0x14003ab3e
add r14, 3
shl edx, 0xc
or r13d, edx
mov rsi, r8
cmp r13d, 0xffff
jbe 0x14003ab37
add r13d, 0xffff0000
mov edx, r13d
shr edx, 0xa
or edx, 0xd800
and r13d, 0x3ff
or r13d, 0xdc00
mov ebx, r13d
mov r13d, edx
cmp rdi, rax
jne 0x14003ab1f
jmp 0x14003ab3e
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x10000
mov dword [rsp + 0x20], 0x10000
mov rcx, qword [rbp + 0x78]
mov edx, dword [rbp + 0x34]
mov ebx, dword [rbp + 0x2c]
mov r8d, ebx
mov r9d, 1
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x14003aeba
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbp + 0x30]
cmp ecx, 0xa
jge 0x14003ae3d
cmp eax, 5
jne 0x14003adc0
mov eax, ecx
mov qword [rbp - 0x18], rax
jmp 0x14003adcb
test ebx, ebx
je 0x14003ae3d
xor ebx, ebx
cmp eax, 0x57
jne 0x14003ae3d
mov dil, 1
xor r14d, r14d
test rsi, rsi
mov rsi, qword [sym.imp.bcrypt.dll_BCryptGenRandom]
je 0x14003a8b0
mov rcx, qword [0x141072bd0]
xor r14d, r14d
xor edx, edx
mov r8, qword [rbp + 0x78]
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x14003a8b0
add r14, 3
shl eax, 0xc
or edi, eax
cmp edi, 0xffff
jbe 0x14003aa6c
add edi, 0xffff0000
mov ecx, edi
shr ecx, 0xa
or ecx, 0xd800
and edi, 0x3ff
or edi, 0xdc00
mov r13d, edi
mov eax, 2
mov edi, ecx
jmp 0x14003aa74
shl rax, 0x20
or rax, 2
mov rcx, qword [rbp + 0x38]
mov qword [rcx + 8], rax
mov qword [rcx], 1
mov rax, rsi
mov rsi, 0xffffffffffffffff
test rax, rax
je 0x14003ae76
mov rcx, qword [0x141072bd0]
xor edx, edx
mov r8, qword [rbp + 0x78]
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rbp + 0x10], 0
je 0x14003ae90
mov r8, qword [rbp + 0x18]
mov rcx, qword [0x141072bd0]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp r14, 0xffffffffffffffff
je 0x14003ae9f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movaps xmm6, xmmword [rbp + 0x90]
add rsp, 0x128
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
test rsi, rsi
je 0x14003aed2
mov rcx, qword [0x141072bd0]
xor edx, edx
mov r8, qword [rbp + 0x78]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [rbp + 0x48], 0
mov dword [rbp + 0x60], 0
mov word [rbp + 0x64], 0
movzx eax, byte [rbp + 0x85]
mov byte [rbp + 0x61], al
xor al, 1
mov byte [rbp + 0x60], al
xorps xmm0, xmm0
movups xmmword [rbp + 0x50], xmm0
mov dword [rbp - 0x10], 0x18
mov qword [rbp - 8], 0
mov dword [rbp], 1
lea rax, [rbp - 0x10]
mov qword [rbp + 0x40], rax
mov rsi, qword [rbp + 0x18]
mov rdx, qword [rbp + 0x20]
mov qword [rbp - 0x28], r14
mov byte [rbp + 0x87], 1
mov byte [rbp + 0x86], 0
lea r8, [rbp + 0x40]
mov rcx, rsi
call fcn.14002c4a0
test rax, rax
je 0x14003af67
mov rax, qword [rbp + 0x38]
mov qword [rax + 8], rdx
mov qword [rax], 1
mov rsi, r14
cmp qword [rbp + 0x10], 0
jne 0x14003ae7d
jmp 0x14003ae90
mov rax, qword [rbp + 0x38]
mov qword [rax + 8], r14
mov qword [rax + 0x10], rdx
mov qword [rax], 0
cmp qword [rbp + 0x10], 0
je 0x14003ae9f
mov rcx, qword [0x141072bd0]
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x14003ae9f
test rdx, rdx
jne 0x14003afa8
call fcn.140011f10
jmp 0x14003afdf
call fcn.140051530
jmp 0x14003afdf
mov byte [rbp + 0x87], 1
mov byte [rbp + 0x86], 1
mov edx, 2
mov rcx, rsi
call fcn.140051530
jmp 0x14003afdf
mov byte [rbp + 0x87], 1
mov byte [rbp + 0x86], 1
call fcn.140011f10
ud2