Function at 0x140037930
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 + 0x68], rcx
mov byte [rbp + 0xa5], dl
movzx eax, dl
mov ecx, 0x40080002
sub ecx, eax
mov dword [rbp + 0x64], ecx
xor edi, edi
mov r15d, 8
mov sil, 1
xorps xmm6, xmm6
mov r12, qword [sym.imp.bcrypt.dll_BCryptGenRandom]
xor eax, eax
mov qword [rbp - 8], rax
nop
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [rbp + 0x58], eax
jmp 0x1400379ab
mov rax, qword [rbp + 0x20]
xchg qword [0x1413b0bc0], rax
mov rax, qword [0x1413b0bc0]
test rax, rax
jne 0x140037a00
movaps xmmword [rbp + 0x20], xmm6
xor ecx, ecx
lea rdx, [rbp + 0x20]
mov r8d, 0x10
mov r9d, 2
call r12
test eax, eax
jns 0x1400379a0
mov qword [rbp + 0x80], r14
mov qword [rbp + 0x78], rbx
mov byte [rbp + 0xa7], dil
mov byte [rbp + 0xa6], 1
call fcn.140039410
jmp 0x1400379a4
mov eax, 1
lock xadd qword [0x1413b0bc0], rax
mov qword [rbp - 0x18], rax
lea rax, [rbp + 0x58]
mov qword [rbp], rax
lea rax, [0x140017cc0]
mov qword [rbp + 8], rax
lea rax, [rbp - 0x18]
mov qword [rbp + 0x10], rax
lea rax, [fcn.140016550]
mov qword [rbp + 0x18], rax
lea rax, [0x14139f138]
mov qword [rbp + 0x20], rax
mov qword [rbp + 0x28], 2
mov qword [rbp + 0x40], 0
mov rax, rbp
mov qword [rbp + 0x30], rax
mov qword [rbp + 0x38], 2
mov qword [rbp + 0x80], r14
mov qword [rbp + 0x78], rbx
mov byte [rbp + 0xa7], dil
mov byte [rbp + 0xa6], 1
lea rcx, [rbp - 0x38]
lea rdx, [rbp + 0x20]
call fcn.1400124b0
test r14, r14
sete al
or sil, al
test sil, 1
jne 0x140037aa9
mov rcx, qword [0x1413b0bb8]
xor edx, edx
mov r8, rbx
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r8, qword [rbp - 0x38]
mov rax, qword [rbp - 0x30]
mov qword [rbp + 0x90], rax
mov r9, qword [rbp - 0x28]
lea rax, [r8 + r9]
mov qword [rbp + 0x70], rax
test r9, r9
mov qword [rbp + 0x88], r8
mov dword [rbp + 0x5c], r15d
je 0x140037af0
movzx ecx, byte [r8]
movzx edi, cl
test dil, dil
js 0x140037b10
lea r15, [r8 + 1]
jmp 0x140037b6c
xor r12d, r12d
xor r14d, r14d
xor edi, edi
xor r15d, r15d
xor r13d, r13d
jmp 0x140037b96
mov eax, edi
and eax, 0x1f
movzx edx, byte [r8 + 1]
and edx, 0x3f
cmp dil, 0xdf
jbe 0x140037b61
movzx edi, byte [r8 + 2]
shl edx, 6
and edi, 0x3f
or edi, edx
cmp cl, 0xf0
jb 0x140037edb
lea r15, [r8 + 4]
movzx ecx, byte [r8 + 3]
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 0x140037b6c
jmp 0x140037ef0
lea r15, [r8 + 2]
shl eax, 6
or eax, edx
mov edi, eax
mov eax, 1
xor r12d, r12d
mov r13, qword [rbp + 0x70]
sub r13, r15
add r13, 3
mov rcx, 0xffffffffffffffff
cmovb r13, rcx
shr r13, 2
add r13, rax
mov r14w, 1
cmp r13, 4
mov eax, 3
cmovb r13, rax
movabs rax, 0x3fffffffffffffff
cmp r13, rax
jae 0x1400380d2
mov qword [rbp - 0x10], r9
inc r13
lea rbx, [r13*2]
movzx eax, byte [0x1413b0ad0]
mov rax, qword [0x1413b0bb8]
test rax, rax
jne 0x140037bee
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x14003809c
mov qword [0x1413b0bb8], rax
mov rcx, rax
xor edx, edx
mov r8, rbx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x14003809c
mov rcx, rax
mov rax, qword [rbp - 8]
inc eax
mov dword [rbp + 0x60], eax
mov word [rcx], di
mov ebx, 1
mov qword [rbp + 0x98], rcx
jmp 0x140037c40
mov rsi, r13
mov r12d, eax
mov word [rcx + rbx*2], di
inc rbx
mov r13, rsi
test r15, r15
je 0x140037cb0
test r12w, r12w
je 0x140037c90
xor eax, eax
mov edi, r12d
cmp rbx, r13
jne 0x140037c30
mov rsi, qword [rbp + 0x70]
sub rsi, r15
add rsi, 3
mov rcx, 0xffffffffffffffff
cmovb rsi, rcx
shr rsi, 2
cmp ax, 1
sbb rsi, 0xffffffffffffffff
cmp r14w, 1
sbb rsi, 0xffffffffffffffff
mov r12d, eax
jmp 0x140037cd4
cmp r15, qword [rbp + 0x70]
je 0x140037cb0
movzx edx, byte [r15]
movzx edi, dl
test dil, dil
js 0x140037d76
inc r15
xor eax, eax
jmp 0x140037c50
cmp r14w, 1
jne 0x140037e10
xor r15d, r15d
xor r14d, r14d
mov edi, 0
mov esi, 0
cmp rbx, r13
jne 0x140037d60
inc rsi
add rsi, rbx
jb 0x14003808a
lea rax, [r13*2]
cmp rax, rsi
cmova rsi, rax
cmp rsi, 5
jae 0x140037cfa
mov esi, 4
xor edx, edx
mov rcx, rsi
shr rcx, 0x3e
sete dl
lea r8, [rsi + rsi]
add rdx, rdx
mov rcx, qword [rbp + 0x98]
mov qword [rbp + 0x20], rcx
mov qword [rbp + 0x28], 2
mov qword [rbp + 0x30], rax
mov rcx, rbp
lea r9, [rbp + 0x20]
call fcn.140022cb0
cmp qword [rbp], 0
mov rcx, qword [rbp + 8]
je 0x140037d6a
movabs rax, 0x8000000000000001
cmp rcx, rax
jne 0x140038085
mov rsi, r13
mov rcx, qword [rbp + 0x98]
jmp 0x140037c36
mov rsi, r13
xor edi, edi
jmp 0x140037c36
mov qword [rbp + 0x98], rcx
jmp 0x140037c36
mov eax, edi
and eax, 0x1f
movzx r8d, byte [r15 + 1]
and r8d, 0x3f
cmp dil, 0xdf
jbe 0x140037dc8
movzx edi, byte [r15 + 2]
shl r8d, 6
and edi, 0x3f
or edi, r8d
cmp dl, 0xf0
jb 0x140037ddb
movzx edx, byte [r15 + 3]
add r15, 4
and eax, 7
shl eax, 0x12
shl edi, 6
and edx, 0x3f
or edx, edi
or edx, eax
mov edi, edx
cmp edi, 0xffff
ja 0x140037dec
xor eax, eax
jmp 0x140037c50
add r15, 2
shl eax, 6
or eax, r8d
mov edi, eax
xor eax, eax
jmp 0x140037c50
add r15, 3
shl eax, 0xc
or edi, eax
cmp edi, 0xffff
jbe 0x140037dc1
lea edx, [rdi + 0xff0000]
shr edx, 0xa
or edx, 0xd800
and edi, 0x3ff
or edi, 0xdc00
mov eax, edi
mov edi, edx
jmp 0x140037c50
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x10000
mov dword [rsp + 0x20], 0x10000
mov rcx, qword [rbp + 0x98]
mov edx, dword [rbp + 0x64]
mov r15d, dword [rbp + 0x5c]
mov r8d, r15d
mov r9d, 1
call qword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140037f95
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rax
shl rcx, 0x20
or rcx, 2
mov qword [rbp + 0x20], rcx
mov edx, dword [rbp + 0x60]
cmp edx, 9
jg 0x140037f1a
cmp eax, 5
jne 0x140037e90
mov eax, edx
mov qword [rbp - 8], rax
mov r12, qword [sym.imp.bcrypt.dll_BCryptGenRandom]
jmp 0x140037ea4
test r15d, r15d
mov r12, qword [sym.imp.bcrypt.dll_BCryptGenRandom]
je 0x140037f1a
xor r15d, r15d
cmp eax, 0x57
jne 0x140037f1a
lea rcx, [rbp + 0x20]
call fcn.140022040
mov rcx, qword [0x1413b0bb8]
xor esi, esi
xor edx, edx
mov r8, qword [rbp + 0x98]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov dil, 1
mov rbx, qword [rbp + 0x88]
mov r14, qword [rbp + 0x90]
jmp 0x140037990
lea r15, [r8 + 3]
shl eax, 0xc
or edi, eax
cmp edi, 0xffff
jbe 0x140037b6c
lea ecx, [rdi + 0xff0000]
shr ecx, 0xa
or ecx, 0xd800
and edi, 0x3ff
or edi, 0xdc00
mov eax, 2
mov r12d, edi
mov edi, ecx
jmp 0x140037b74
mov rax, qword [rbp + 0x68]
mov qword [rax + 8], rcx
mov qword [rax], 1
mov rcx, qword [0x1413b0bb8]
xor edx, edx
mov r8, qword [rbp + 0x98]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rsi, 0xffffffffffffffff
mov rdi, qword [rbp + 0x88]
mov r14, qword [rbp + 0x90]
test r14, r14
je 0x140037f6b
mov rcx, qword [0x1413b0bb8]
xor edx, edx
mov r8, rdi
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp rbx, 0xffffffffffffffff
je 0x140037f7a
mov rcx, rsi
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
mov rcx, qword [0x1413b0bb8]
xor edx, edx
mov r8, qword [rbp + 0x98]
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [rbp + 0x20], 0
mov dword [rbp + 0x40], 0
mov word [rbp + 0x44], 0
movzx eax, byte [rbp + 0xa5]
mov byte [rbp + 0x41], al
xor al, 1
mov byte [rbp + 0x40], al
xorps xmm0, xmm0
movups xmmword [rbp + 0x30], xmm0
mov dword [rbp], 0x18
mov qword [rbp + 8], 0
mov dword [rbp + 0x10], 1
mov rax, rbp
mov qword [rbp + 0x28], rax
mov r14, qword [rbp + 0x90]
mov qword [rbp + 0x80], r14
mov rdi, qword [rbp + 0x88]
mov qword [rbp + 0x78], rdi
mov qword [rbp - 0x20], rbx
mov byte [rbp + 0xa7], 1
mov byte [rbp + 0xa6], 0
lea r8, [rbp + 0x20]
mov rcx, rdi
mov rdx, qword [rbp - 0x10]
call fcn.14002aac0
test rax, rax
je 0x140038052
mov rax, qword [rbp + 0x68]
mov qword [rax + 8], rdx
mov qword [rax], 1
mov rsi, rbx
test r14, r14
jne 0x140037f59
jmp 0x140037f6b
mov rax, qword [rbp + 0x68]
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rdx
mov qword [rax], 0
test r14, r14
je 0x140037f7a
mov rcx, qword [0x1413b0bb8]
xor edx, edx
mov r8, rdi
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x140037f7a
test rcx, rcx
jne 0x140038091
call fcn.140012060
jmp 0x1400380fe
mov rdx, qword [rbp + 0x10]
call fcn.14004e060
jmp 0x1400380fe
mov rax, qword [rbp + 0x90]
mov qword [rbp + 0x80], rax
mov rax, qword [rbp + 0x88]
mov qword [rbp + 0x78], rax
mov byte [rbp + 0xa7], 1
mov byte [rbp + 0xa6], 1
mov ecx, 2
mov rdx, rbx
call fcn.14004e060
jmp 0x1400380fe
mov rax, qword [rbp + 0x90]
mov qword [rbp + 0x80], rax
mov rax, qword [rbp + 0x88]
mov qword [rbp + 0x78], rax
mov byte [rbp + 0xa7], 1
mov byte [rbp + 0xa6], 1
call fcn.140012060
ud2