Function at 0x1401ea160
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, 0x138
lea rbp, [rsp + 0x80]
movaps xmmword [rbp + 0xa0], xmm6
mov qword [rbp + 0x98], 0xfffffffffffffffe
mov qword [rbp + 0x38], rcx
mov byte [rbp + 0x95], dl
movzx eax, dl
mov ecx, 0x40080002
sub ecx, eax
mov dword [rbp + 0x2c], 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 - 0x28], rax
nop
call qword [sym.imp.kernel32.dll_GetCurrentProcessId]
mov dword [rbp + 0x24], eax
jmp 0x1401ea1db
mov rax, qword [rbp + 0x40]
xchg qword [0x1403210b0], rax
mov rax, qword [0x1403210b0]
test rax, rax
jne 0x1401ea220
movaps xmmword [rbp + 0x40], xmm6
xor ecx, ecx
lea rdx, [rbp + 0x40]
mov r8d, 0x10
mov r9d, 2
call rsi
test eax, eax
jns 0x1401ea1d0
mov byte [rbp + 0x97], dil
mov byte [rbp + 0x96], 1
call fcn.1401ef730
jmp 0x1401ea1d4
mov eax, 1
lock xadd qword [0x1403210b0], rax
mov qword [rbp - 0x30], rax
lea rax, [rbp + 0x24]
mov qword [rbp - 0x20], rax
lea rax, [0x140209560]
mov qword [rbp - 0x18], rax
lea rax, [rbp - 0x30]
mov qword [rbp - 0x10], rax
lea rax, [fcn.1402097d0]
mov qword [rbp - 8], rax
mov qword [rbp + 0x40], 0
lea rax, str.h_
mov qword [rbp + 0x50], rax
mov qword [rbp + 0x58], 2
lea rax, [rbp - 0x20]
mov qword [rbp + 0x60], rax
mov qword [rbp + 0x68], 2
mov byte [rbp + 0x97], dil
mov byte [rbp + 0x96], 1
lea rcx, [rbp + 0x70]
lea rdx, [rbp + 0x40]
call fcn.1401fa6e0
movups xmm0, xmmword [rbp + 0x70]
movaps xmmword [rbp + 0x40], xmm0
mov rax, qword [rbp + 0x80]
mov qword [rbp + 0x50], rax
test r14b, 1
jne 0x1401ea2cf
mov rdx, qword [rbp]
test rdx, rdx
je 0x1401ea2cf
mov rcx, qword [rbp + 8]
mov r8d, 1
call fcn.14001c240
mov rax, qword [rbp + 0x50]
mov qword [rbp + 0x10], rax
movaps xmm0, xmmword [rbp + 0x40]
movaps xmmword [rbp], xmm0
mov r13, qword [rbp + 8]
lea rcx, [rax + r13]
mov qword [rbp + 0x88], rcx
test rax, rax
mov dword [rbp + 0x30], ebx
je 0x1401ea310
movzx ecx, byte [r13]
movzx edi, cl
test dil, dil
js 0x1401ea330
inc r13
jmp 0x1401ea38c
xor r12d, r12d
xor edi, edi
xor r14d, r14d
xor r13d, r13d
xor r15d, r15d
jmp 0x1401ea3bd
mov eax, edi
and eax, 0x1f
movzx edx, byte [r13 + 1]
and edx, 0x3f
cmp dil, 0xdf
jbe 0x1401ea381
movzx edi, byte [r13 + 2]
shl edx, 6
and edi, 0x3f
or edi, edx
cmp cl, 0xf0
jb 0x1401ea6d6
movzx ecx, byte [r13 + 3]
add r13, 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 0x1401ea38c
jmp 0x1401ea6eb
add r13, 2
shl eax, 6
or eax, edx
mov edi, eax
xor r12d, r12d
mov r15, qword [rbp + 0x88]
sub r15, r13
add r15, 3
mov rax, 0xffffffffffffffff
cmovb r15, rax
shr r15, 2
cmp r12w, 1
sbb r15, 0xffffffffffffffff
inc r15
mov r14w, 1
cmp r15, 4
mov eax, 3
cmovb r15, rax
movabs rax, 0x3fffffffffffffff
cmp r15, rax
jae 0x1401ea8a4
inc r15
lea rbx, [r15 + r15]
mov edx, 2
mov rcx, rbx
call fcn.14001c230
test rax, rax
je 0x1401ea887
mov rcx, qword [rbp - 0x28]
inc ecx
mov dword [rbp + 0x28], ecx
mov word [rax], di
mov qword [rbp + 0x70], r15
mov qword [rbp + 0x78], rax
mov qword [rbp + 0x80], 1
mov ebx, 1
jmp 0x1401ea42a
mov r12d, ecx
mov word [rax + rbx*2], di
inc rbx
test r13, r13
je 0x1401ea4b0
test r12w, r12w
je 0x1401ea480
xor ecx, ecx
mov edi, r12d
cmp rbx, r15
jne 0x1401ea420
mov rdx, qword [rbp + 0x88]
sub rdx, r13
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 0x1401ea4db
cmp r13, qword [rbp + 0x88]
je 0x1401ea4b0
movzx edx, byte [r13]
movzx edi, dl
test dil, dil
js 0x1401ea58a
inc r13
xor ecx, ecx
jmp 0x1401ea43e
mov r15, qword [rbp + 0x70]
cmp r14w, 1
jne 0x1401ea630
xor edi, edi
mov r14d, 0
mov r13d, 0
mov edx, 0
cmp rbx, r15
jne 0x1401ea423
inc rdx
add rdx, rbx
jb 0x1401ea868
mov rsi, r14
mov r14, qword [rbp + 0x70]
lea rax, [r14 + r14]
mov r15, rax
cmp rax, rdx
ja 0x1401ea4fd
mov r15, rdx
cmp r15, 5
jae 0x1401ea509
mov r15d, 4
xor r8d, r8d
mov rcx, r15
shr rcx, 0x3e
sete r8b
lea rdx, [r15 + r15]
add r8, r8
test r14, r14
je 0x1401ea536
mov rcx, qword [rbp + 0x78]
mov qword [rbp + 0x40], rcx
mov qword [rbp + 0x48], rax
mov eax, 2
jmp 0x1401ea538
xor eax, eax
mov qword [rbp + 0x50], rax
lea rcx, [rbp - 0x20]
lea r9, [rbp + 0x40]
call fcn.1401d95e0
cmp qword [rbp - 0x20], 0
mov rax, qword [rbp - 0x18]
je 0x1401ea57a
mov rdx, qword [rbp - 0x10]
movabs rcx, 0x8000000000000001
cmp rdx, rcx
jne 0x1401ea863
mov rax, qword [rbp + 0x78]
mov r15, r14
mov r14, rsi
jmp 0x1401ea423
mov qword [rbp + 0x78], rax
mov qword [rbp + 0x70], r15
mov r14, rsi
jmp 0x1401ea423
mov ecx, edi
and ecx, 0x1f
movzx esi, byte [r13 + 1]
and esi, 0x3f
cmp dil, 0xdf
jbe 0x1401ea5f8
movzx edi, byte [r13 + 2]
shl esi, 6
and edi, 0x3f
or edi, esi
cmp dl, 0xf0
jb 0x1401ea60a
movzx edx, byte [r13 + 3]
add r13, 4
and ecx, 7
shl ecx, 0x12
shl edi, 6
and edx, 0x3f
or edx, edi
or edx, ecx
mov edi, edx
cmp edi, 0xffff
jbe 0x1401ea61b
add edi, 0xffff0000
mov edx, edi
shr edx, 0xa
or edx, 0xd800
and edi, 0x3ff
or edi, 0xdc00
mov ecx, edi
mov edi, edx
jmp 0x1401ea43e
add r13, 2
shl ecx, 6
or ecx, esi
mov edi, ecx
xor ecx, ecx
jmp 0x1401ea43e
add r13, 3
shl ecx, 0xc
or edi, ecx
cmp edi, 0xffff
ja 0x1401ea5d2
xor ecx, ecx
jmp 0x1401ea43e
mov r13, qword [rbp + 0x78]
mov qword [rsp + 0x38], 0
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x10000
mov dword [rsp + 0x20], 0x10000
mov rcx, r13
mov edx, dword [rbp + 0x2c]
mov ebx, dword [rbp + 0x30]
mov r8d, ebx
mov r9d, 1
call qword [sym.imp.kernel32.dll_CreateNamedPipeW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x1401ea783
call qword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [rbp + 0x28]
cmp ecx, 0xa
mov rsi, qword [sym.imp.bcrypt.dll_BCryptGenRandom]
jge 0x1401ea711
cmp eax, 5
jne 0x1401ea6a0
mov eax, ecx
mov qword [rbp - 0x28], rax
jmp 0x1401ea6ab
test ebx, ebx
je 0x1401ea711
xor ebx, ebx
cmp eax, 0x57
jne 0x1401ea711
mov dil, 1
xor r14d, r14d
test r15, r15
je 0x1401ea1c0
add r15, r15
mov r8d, 2
mov rcx, r13
mov rdx, r15
call fcn.14001c240
xor r14d, r14d
jmp 0x1401ea1c0
add r13, 3
shl eax, 0xc
or edi, eax
cmp edi, 0xffff
jbe 0x1401ea38c
add edi, 0xffff0000
mov eax, edi
shr eax, 0xa
or eax, 0xd800
and edi, 0x3ff
or edi, 0xdc00
mov r12d, edi
mov edi, eax
jmp 0x1401ea38f
shl rax, 0x20
or rax, 2
mov rcx, qword [rbp + 0x38]
mov qword [rcx + 8], rax
mov qword [rcx], 1
test r15, r15
je 0x1401ea741
add r15, r15
mov r8d, 2
mov rcx, r13
mov rdx, r15
call fcn.14001c240
mov rdx, qword [rbp]
test rdx, rdx
je 0x1401ea759
mov rcx, qword [rbp + 8]
mov r8d, 1
call fcn.14001c240
cmp rdi, 0xffffffffffffffff
je 0x1401ea768
mov rcx, rdi
call qword [sym.imp.kernel32.dll_CloseHandle]
movaps xmm6, xmmword [rbp + 0xa0]
add rsp, 0x138
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
test r15, r15
je 0x1401ea79c
add r15, r15
mov r8d, 2
mov rcx, r13
mov rdx, r15
call fcn.14001c240
mov dword [rbp + 0x48], 0
mov dword [rbp + 0x60], 0
mov word [rbp + 0x64], 0
movzx eax, byte [rbp + 0x95]
mov byte [rbp + 0x61], al
xor al, 1
mov byte [rbp + 0x60], al
xorps xmm0, xmm0
movups xmmword [rbp + 0x50], xmm0
mov dword [rbp - 0x20], 0x18
mov qword [rbp - 0x18], 0
mov dword [rbp - 0x10], 1
lea rax, [rbp - 0x20]
mov qword [rbp + 0x40], rax
mov rsi, qword [rbp + 8]
mov rdx, qword [rbp + 0x10]
mov qword [rbp - 0x38], rdi
mov byte [rbp + 0x97], 1
mov byte [rbp + 0x96], 0
lea r8, [rbp + 0x40]
mov rcx, rsi
call fcn.1401e7600
test rax, rax
je 0x1401ea830
mov rax, qword [rbp + 0x38]
mov qword [rax + 8], rdx
mov qword [rax], 1
mov rdx, qword [rbp]
test rdx, rdx
jne 0x1401ea74a
jmp 0x1401ea759
mov rax, qword [rbp + 0x38]
mov qword [rax + 8], rdi
mov qword [rax + 0x10], rdx
mov qword [rax], 0
mov rdx, qword [rbp]
test rdx, rdx
je 0x1401ea768
mov r8d, 1
mov rcx, rsi
call fcn.14001c240
jmp 0x1401ea768
test rdx, rdx
jne 0x1401ea876
mov qword [rbp + 0x80], rbx
call fcn.1401fa2d0
jmp 0x1401ea8b7
mov qword [rbp + 0x80], rbx
mov rcx, rax
call fcn.1402179b0
jmp 0x1401ea8b7
mov byte [rbp + 0x97], 1
mov byte [rbp + 0x96], 1
mov edx, 2
mov rcx, rbx
call fcn.1402179b0
jmp 0x1401ea8b7
mov byte [rbp + 0x97], 1
mov byte [rbp + 0x96], 1
call fcn.1401fa2d0
ud2