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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x108
movaps xmmword [rsp + 0xf0], xmm6
mov qword [rsp + 0x80], rcx
mov byte [rsp + 0x47], dl
movzx eax, dl
mov ecx, 0x40080002
sub ecx, eax
mov dword [rsp + 0x88], ecx
xor eax, eax
mov qword [rsp + 0x98], rax
mov r14d, 8
mov sil, 1
xorps xmm6, xmm6
lea r15, [rsp + 0x50]
nop word cs:[rax + rax]
call sub.KERNEL32.dll_GetCurrentProcessId
mov dword [rsp + 0x94], eax
jmp 0x140030abc
mov rax, qword [rsp + 0x50]
xchg qword [0x140094220], rax
mov rax, qword [0x140094220]
test rax, rax
jne 0x140030af0
movaps xmmword [rsp + 0x50], xmm6
xor ecx, ecx
mov rdx, r15
mov r8d, 0x10
mov r9d, 2
call sub.bcrypt.dll_BCryptGenRandom
test eax, eax
jns 0x140030ab0
call fcn.14005f860
jmp 0x140030ab5
mov eax, 1
lock xadd qword [0x140094220], rax
mov qword [rsp + 0xd0], rax
lea rax, [rsp + 0x94]
mov qword [rsp + 0xa8], rax
lea rax, [0x14000b730]
mov qword [rsp + 0xb0], rax
lea rax, [rsp + 0xd0]
mov qword [rsp + 0xb8], rax
lea rax, [fcn.14000b850]
mov qword [rsp + 0xc0], rax
lea rax, str.ro_b_
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 2
mov qword [rsp + 0x70], 0
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], 2
lea rcx, [rsp + 0xd8]
mov rdx, r15
call fcn.140004460
cmp qword [rsp + 0x48], 0
sete al
or sil, al
test sil, 1
jne 0x140030ba7
mov edx, 1
mov rcx, rbp
call fcn.140003d40
mov r8, qword [rsp + 0xd8]
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0x48], rax
mov rcx, qword [rsp + 0xe8]
lea rbx, [r8 + rcx]
test rcx, rcx
mov qword [rsp + 0xa0], r8
mov dword [rsp + 0x90], r14d
mov qword [rsp + 0xc8], rcx
je 0x140030c00
movzx eax, byte [r8]
test al, al
js 0x140030c20
lea r12, [r8 + 1]
mov r13d, eax
jmp 0x140030c7d
xor r14d, r14d
xor esi, esi
xor r12d, r12d
xor r13d, r13d
xor ebp, ebp
jmp 0x140030ca6
mov r13d, eax
and r13d, 0x1f
movzx edx, byte [r8 + 1]
and edx, 0x3f
cmp al, 0xdf
jbe 0x140030c72
movzx ecx, byte [r8 + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp al, 0xf0
jb 0x140030f61
lea r12, [r8 + 4]
movzx eax, byte [r8 + 3]
and r13d, 7
shl r13d, 0x12
shl ecx, 6
and eax, 0x3f
or eax, ecx
or r13d, eax
cmp r13d, 0xffff
jbe 0x140030c7d
jmp 0x140030f79
lea r12, [r8 + 2]
shl r13d, 6
or r13d, edx
xor r14d, r14d
xor eax, eax
mov rcx, rbx
sub rcx, r12
add rcx, 3
mov rdx, 0xffffffffffffffff
cmovb rcx, rdx
shr rcx, 2
lea rbp, [rcx + rax]
inc rbp
mov si, 1
cmp rbp, 4
mov eax, 3
cmovb rbp, rax
movabs rax, 0x3fffffffffffffff
cmp rbp, rax
jae 0x140031103
inc rbp
lea rdi, [rbp*2]
movzx eax, byte [0x140094300]
mov edx, 2
mov rcx, rdi
call fcn.140003cb0
test rax, rax
je 0x1400310f4
mov rcx, qword [rsp + 0x98]
inc ecx
mov dword [rsp + 0x8c], ecx
mov word [rax], r13w
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x60], 1
mov edi, 1
mov rbp, qword [rsp + 0xa0]
jmp 0x140030d40
mov r14d, ecx
mov word [rax + rdi*2], r13w
inc rdi
mov qword [rsp + 0x60], rdi
test r12, r12
je 0x140030db0
test r14w, r14w
je 0x140030d90
xor ecx, ecx
mov r13d, r14d
cmp rdi, qword [rsp + 0x58]
jne 0x140030d30
mov r8, rbx
sub r8, r12
add r8, 3
mov rax, 0xffffffffffffffff
cmovb r8, rax
shr r8, 2
cmp cx, 1
sbb r8, 0xffffffffffffffff
cmp si, 1
sbb r8, 0xffffffffffffffff
mov r14d, ecx
jmp 0x140030dd9
cmp r12, rbx
je 0x140030db0
movzx ecx, byte [r12]
test cl, cl
js 0x140030df1
inc r12
mov r13d, ecx
xor ecx, ecx
jmp 0x140030d50
cmp si, 1
jne 0x140030ea0
xor esi, esi
mov r12d, 0
mov r13d, 0
mov r8d, 0
cmp rdi, qword [rsp + 0x58]
jne 0x140030d33
inc r8
mov rcx, r15
mov rdx, rdi
call fcn.140044450
mov rax, qword [rsp + 0x50]
jmp 0x140030d33
mov r13d, ecx
and r13d, 0x1f
movzx r8d, byte [r12 + 1]
and r8d, 0x3f
cmp cl, 0xdf
jbe 0x140030e49
movzx edx, byte [r12 + 2]
shl r8d, 6
and edx, 0x3f
or edx, r8d
cmp cl, 0xf0
jb 0x140030e5b
movzx ecx, byte [r12 + 3]
add r12, 4
and r13d, 7
shl r13d, 0x12
shl edx, 6
and ecx, 0x3f
or ecx, edx
or r13d, ecx
cmp r13d, 0xffff
ja 0x140030e6f
xor ecx, ecx
jmp 0x140030d50
add r12, 2
shl r13d, 6
or r13d, r8d
xor ecx, ecx
jmp 0x140030d50
add r12, 3
shl r13d, 0xc
or r13d, edx
cmp r13d, 0xffff
jbe 0x140030e42
lea edx, [r13 + 0xff0000]
shr edx, 0xa
or edx, 0xd800
and r13d, 0x3ff
or r13d, 0xdc00
mov ecx, r13d
mov r13d, edx
jmp 0x140030d50
mov rbx, qword [rsp + 0x50]
mov r12, qword [rsp + 0x58]
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 [rsp + 0x88]
mov r14d, dword [rsp + 0x90]
mov r8d, r14d
mov r9d, 1
call sub.KERNEL32.dll_CreateNamedPipeW
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140030fdc
call sub.KERNEL32.dll_GetLastError
mov rcx, rax
shl rcx, 0x20
or rcx, 2
mov edx, dword [rsp + 0x8c]
cmp edx, 9
jg 0x140030fa7
cmp eax, 5
jne 0x140030f30
mov eax, edx
mov qword [rsp + 0x98], rax
jmp 0x140030f3d
test r14d, r14d
je 0x140030fa7
xor r14d, r14d
cmp eax, 0x57
jne 0x140030fa7
call fcn.14005cbc0
xor esi, esi
test r12, r12
je 0x140030aa0
mov edx, 2
mov rcx, rbx
call fcn.140003d40
xor esi, esi
jmp 0x140030aa0
lea r12, [r8 + 3]
shl r13d, 0xc
or r13d, ecx
cmp r13d, 0xffff
jbe 0x140030c7d
lea ecx, [r13 + 0xff0000]
shr ecx, 0xa
or ecx, 0xd800
and r13d, 0x3ff
or r13d, 0xdc00
mov eax, 1
mov r14d, r13d
mov r13d, ecx
jmp 0x140030c82
mov rax, qword [rsp + 0x80]
mov qword [rax + 8], rcx
mov qword [rax], 1
mov r14, 0xffffffffffffffff
test r12, r12
je 0x140031085
mov edx, 2
mov rcx, rbx
call fcn.140003d40
jmp 0x140031085
test r12, r12
je 0x140030fee
mov edx, 2
mov rcx, rbx
call fcn.140003d40
mov qword [rsp + 0x60], 0
mov dword [rsp + 0x50], 0
mov qword [rsp + 0x6c], 0
mov word [rsp + 0x74], 0
movzx eax, byte [rsp + 0x47]
mov byte [rsp + 0x71], al
xor al, 1
mov byte [rsp + 0x70], al
mov dword [rsp + 0x68], 0
mov dword [rsp + 0xa8], 0x18
mov qword [rsp + 0xb0], 0
mov dword [rsp + 0xb8], 1
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x58], rax
lea r8, [rsp + 0x50]
mov rcx, rbp
mov rdx, qword [rsp + 0xc8]
call fcn.1400520d0
test rax, rax
je 0x1400310c6
mov rax, qword [rsp + 0x80]
mov qword [rax + 8], rdx
mov qword [rax], 1
mov r14, rdi
mov rax, qword [rsp + 0x48]
test rax, rax
je 0x14003109c
mov edx, 1
mov rcx, rbp
call fcn.140003d40
cmp rdi, 0xffffffffffffffff
je 0x1400310aa
mov rcx, r14
call fcn.1400676d0
movaps xmm6, xmmword [rsp + 0xf0]
add rsp, 0x108
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rsp + 0x80]
mov qword [rax + 8], rdi
mov qword [rax + 0x10], rdx
mov qword [rax], 0
cmp qword [rsp + 0x48], 0
je 0x1400310aa
mov edx, 1
mov rcx, rbp
call fcn.140003d40
jmp 0x1400310aa
mov ecx, 2
mov rdx, rdi
call fcn.1400059f0
jmp 0x140031108
call fcn.1400057a0
ud2