Function at 0x14003a080
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 r12d, 8
mov sil, 1
xorps xmm6, xmm6
mov rbx, 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 0x14003a0fb
mov rax, qword [rbp + 0x40]
xchg qword [0x14123bbd8], rax
mov rax, qword [0x14123bbd8]
test rax, rax
jne 0x14003a140
movaps xmmword [rbp + 0x40], xmm6
xor ecx, ecx
lea rdx, [rbp + 0x40]
mov r8d, 0x10
mov r9d, 2
call rbx
test eax, eax
jns 0x14003a0f0
mov byte [rbp + 0x87], dil
mov byte [rbp + 0x86], 1
call fcn.14003b910
jmp 0x14003a0f4
mov eax, 1
lock xadd qword [0x14123bbd8], rax
mov qword [rbp - 0x20], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 0x10], rax
lea rax, [0x140017260]
mov qword [rbp - 8], rax
lea rax, [rbp - 0x20]
mov qword [rbp], rax
lea rax, [fcn.1400157b0]
mov qword [rbp + 8], rax
mov qword [rbp + 0x40], 0
lea rax, [0x14122ad00]
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.140011a70
movups xmm0, xmmword [rbp - 0x40]
movaps xmmword [rbp + 0x40], xmm0
mov rax, qword [rbp - 0x30]
cmp qword [rbp + 0x10], 0
mov qword [rbp + 0x50], rax
sete al
or sil, al
test sil, 1
jne 0x14003a1f2
mov r8, qword [rbp + 0x18]
mov rcx, qword [0x14123bbd0]
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], r12d
je 0x14003a230
movzx ecx, byte [r14]
movzx edi, cl
test dil, dil
js 0x14003a250
inc r14
jmp 0x14003a2ac
xor r13d, r13d
xor edi, edi
xor r12d, r12d
xor r14d, r14d
xor ecx, ecx
jmp 0x14003a2d9
mov eax, edi
and eax, 0x1f
movzx edx, byte [r14 + 1]
and edx, 0x3f
cmp dil, 0xdf
jbe 0x14003a2a1
movzx edi, byte [r14 + 2]
shl edx, 6
and edi, 0x3f
or edi, edx
cmp cl, 0xf0
jb 0x14003a64c
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 0x14003a2ac
jmp 0x14003a661
add r14, 2
shl eax, 6
or eax, edx
mov edi, eax
xor r13d, r13d
mov rcx, r15
sub rcx, r14
add rcx, 3
mov rax, 0xffffffffffffffff
cmovb rcx, rax
shr rcx, 2
cmp r13w, 1
sbb rcx, 0xffffffffffffffff
inc rcx
mov r12w, 1
cmp rcx, 4
mov eax, 3
cmovb rcx, rax
movabs rax, 0x3fffffffffffffff
cmp rcx, rax
jae 0x14003a813
inc rcx
mov rbx, rcx
lea rsi, [rcx + rcx]
mov rax, qword [0x14123bbd0]
test rax, rax
jne 0x14003a325
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x14003a7f6
mov qword [0x14123bbd0], rax
mov rcx, rax
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x14003a7f6
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 0x14003a370
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 0x14003a3f0
test r13w, r13w
je 0x14003a3c0
xor ebx, ebx
cmp rdi, rax
jne 0x14003a363
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 0x14003a420
jmp 0x14003a7e8
cmp r14, r15
je 0x14003a3f0
movzx ebx, byte [r14]
movzx r13d, bl
test r13b, r13b
js 0x14003a4ca
inc r14
xor ebx, ebx
cmp rdi, rax
jne 0x14003a363
jmp 0x14003a382
cmp r12w, 1
jne 0x14003a5a0
xor r14d, r14d
xor edx, edx
cmp rdi, rsi
jne 0x14003a470
mov qword [rbp + 0x70], rsi
mov ebx, r13d
xor r12d, r12d
xor r13d, r13d
xor esi, esi
inc rsi
add rsi, rdi
jb 0x14003a7e8
mov rax, qword [rbp + 0x70]
add rax, rax
cmp rax, rsi
cmova rsi, rax
cmp rsi, 5
jae 0x14003a439
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 0x14003a47e
mov rcx, qword [rbp + 0x78]
mov qword [rbp + 0x40], rcx
mov qword [rbp + 0x48], rax
mov eax, 2
jmp 0x14003a480
mov rax, rsi
xor r12d, r12d
mov ebx, r13d
jmp 0x14003a366
xor eax, eax
mov qword [rbp + 0x50], rax
lea rcx, [rbp - 0x10]
lea r9, [rbp + 0x40]
call fcn.1400239b0
cmp qword [rbp - 0x10], 0
mov rcx, qword [rbp - 8]
je 0x14003a35c
mov rdx, qword [rbp]
movabs rax, 0x8000000000000001
cmp rdx, rax
jne 0x14003a7e3
mov rax, qword [rbp + 0x70]
mov rsi, rax
mov edx, r13d
mov rcx, qword [rbp + 0x78]
jmp 0x14003a366
mov r8, rsi
mov edx, r13d
and edx, 0x1f
movzx esi, byte [r14 + 1]
and esi, 0x3f
cmp r13b, 0xdf
jbe 0x14003a525
movzx r13d, byte [r14 + 2]
shl esi, 6
and r13d, 0x3f
or r13d, esi
cmp bl, 0xf0
jb 0x14003a544
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 0x14003a37b
jmp 0x14003a55e
add r14, 2
shl edx, 6
or edx, esi
mov r13d, edx
mov rsi, r8
xor ebx, ebx
cmp rdi, rax
jne 0x14003a363
jmp 0x14003a382
add r14, 3
shl edx, 0xc
or r13d, edx
mov rsi, r8
cmp r13d, 0xffff
jbe 0x14003a37b
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 0x14003a363
jmp 0x14003a382
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 r12d, dword [rbp + 0x2c]
mov r8d, r12d
mov r9d, 1
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x14003a701
mov rbx, rsi
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbp + 0x30]
cmp ecx, 0xa
jge 0x14003a687
cmp eax, 5
jne 0x14003a610
mov eax, ecx
mov qword [rbp - 0x18], rax
jmp 0x14003a61d
test r12d, r12d
je 0x14003a687
xor r12d, r12d
cmp eax, 0x57
jne 0x14003a687
mov dil, 1
xor esi, esi
test rbx, rbx
mov rbx, qword [sym.imp.bcrypt.dll_BCryptGenRandom]
je 0x14003a0e0
mov rcx, qword [0x14123bbd0]
xor esi, esi
xor edx, edx
mov r8, qword [rbp + 0x78]
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x14003a0e0
add r14, 3
shl eax, 0xc
or edi, eax
cmp edi, 0xffff
jbe 0x14003a2ac
add edi, 0xffff0000
mov eax, edi
shr eax, 0xa
or eax, 0xd800
and edi, 0x3ff
or edi, 0xdc00
mov r13d, edi
mov edi, eax
jmp 0x14003a2af
shl rax, 0x20
or rax, 2
mov rcx, qword [rbp + 0x38]
mov qword [rcx + 8], rax
mov qword [rcx], 1
mov rsi, 0xffffffffffffffff
test rbx, rbx
je 0x14003a6bd
mov rcx, qword [0x14123bbd0]
xor edx, edx
mov r8, qword [rbp + 0x78]
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rbp + 0x10], 0
je 0x14003a6d7
mov r8, qword [rbp + 0x18]
mov rcx, qword [0x14123bbd0]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp r14, 0xffffffffffffffff
je 0x14003a6e6
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 0x14003a719
mov rcx, qword [0x14123bbd0]
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.14002c060
test rax, rax
je 0x14003a7ae
mov rax, qword [rbp + 0x38]
mov qword [rax + 8], rdx
mov qword [rax], 1
mov rsi, r14
cmp qword [rbp + 0x10], 0
jne 0x14003a6c4
jmp 0x14003a6d7
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 0x14003a6e6
mov rcx, qword [0x14123bbd0]
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x14003a6e6
test rdx, rdx
jne 0x14003a7ef
call fcn.140011430
jmp 0x14003a826
call fcn.140051930
jmp 0x14003a826
mov byte [rbp + 0x87], 1
mov byte [rbp + 0x86], 1
mov edx, 2
mov rcx, rsi
call fcn.140051930
jmp 0x14003a826
mov byte [rbp + 0x87], 1
mov byte [rbp + 0x86], 1
call fcn.140011430
ud2