Function at 0x14003a870
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 0x14003a8eb
mov rax, qword [rbp + 0x40]
xchg qword [0x141089bd8], rax
mov rax, qword [0x141089bd8]
test rax, rax
jne 0x14003a930
movaps xmmword [rbp + 0x40], xmm6
xor ecx, ecx
lea rdx, [rbp + 0x40]
mov r8d, 0x10
mov r9d, 2
call rsi
test eax, eax
jns 0x14003a8e0
mov byte [rbp + 0x87], dil
mov byte [rbp + 0x86], 1
call fcn.14003c110
jmp 0x14003a8e4
mov eax, 1
lock xadd qword [0x141089bd8], rax
mov qword [rbp - 0x20], rax
lea rax, [rbp + 0x28]
mov qword [rbp - 0x10], rax
lea rax, [0x140017cb0]
mov qword [rbp - 8], rax
lea rax, [rbp - 0x20]
mov qword [rbp], rax
lea rax, [fcn.140016180]
mov qword [rbp + 8], rax
mov qword [rbp + 0x40], 0
lea rax, [0x141078d68]
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.140012500
movups xmm0, xmmword [rbp - 0x40]
movaps xmmword [rbp + 0x40], xmm0
mov rax, qword [rbp - 0x30]
mov qword [rbp + 0x50], rax
test r14b, 1
jne 0x14003a9de
cmp qword [rbp + 0x10], 0
je 0x14003a9de
mov r8, qword [rbp + 0x18]
mov rcx, qword [0x141089bd0]
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 0x14003aa10
movzx ecx, byte [r14]
movzx edi, cl
test dil, dil
js 0x14003aa30
inc r14
jmp 0x14003aa8c
xor edi, edi
xor r12d, r12d
xor r13d, r13d
xor r14d, r14d
xor edx, edx
jmp 0x14003aab5
mov eax, edi
and eax, 0x1f
movzx edx, byte [r14 + 1]
and edx, 0x3f
cmp dil, 0xdf
jbe 0x14003aa81
movzx edi, byte [r14 + 2]
shl edx, 6
and edi, 0x3f
or edi, edx
cmp cl, 0xf0
jb 0x14003ae1c
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 0x14003aa8c
jmp 0x14003ae31
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 0x14003afec
inc rdx
mov rbx, rdx
lea rsi, [rdx + rdx]
mov rax, qword [0x141089bd0]
test rax, rax
jne 0x14003ab01
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x14003afcf
mov qword [0x141089bd0], rax
mov rcx, rax
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
test rax, rax
je 0x14003afcf
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 0x14003ab4c
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 0x14003abd0
test r13w, r13w
je 0x14003aba0
xor ebx, ebx
cmp rdi, rax
jne 0x14003ab3f
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 0x14003ac00
jmp 0x14003afc1
cmp r14, r15
je 0x14003abd0
movzx ebx, byte [r14]
movzx r13d, bl
test r13b, r13b
js 0x14003aca7
inc r14
xor ebx, ebx
cmp rdi, rax
jne 0x14003ab3f
jmp 0x14003ab5e
cmp r12w, 1
jne 0x14003ad70
xor r14d, r14d
xor edx, edx
cmp rdi, rsi
jne 0x14003ac50
mov qword [rbp + 0x70], rsi
mov ebx, r13d
xor r12d, r12d
xor r13d, r13d
xor esi, esi
inc rsi
add rsi, rdi
jb 0x14003afc1
mov rax, qword [rbp + 0x70]
add rax, rax
cmp rax, rsi
cmova rsi, rax
cmp rsi, 5
jae 0x14003ac19
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 0x14003ac5e
mov rcx, qword [rbp + 0x78]
mov qword [rbp + 0x40], rcx
mov qword [rbp + 0x48], rax
mov eax, 2
jmp 0x14003ac60
mov rax, rsi
xor r12d, r12d
mov ebx, r13d
jmp 0x14003ab42
xor eax, eax
mov qword [rbp + 0x50], rax
lea rcx, [rbp - 0x10]
lea r9, [rbp + 0x40]
call fcn.1400069b0
cmp qword [rbp - 0x10], 0
mov rcx, qword [rbp - 8]
je 0x14003ab38
mov rdx, qword [rbp]
movabs rax, 0x8000000000000001
cmp rdx, rax
jne 0x14003afbc
mov rax, qword [rbp + 0x70]
mov rsi, rax
mov rcx, qword [rbp + 0x78]
jmp 0x14003ab3f
mov r8, rsi
mov edx, r13d
and edx, 0x1f
movzx esi, byte [r14 + 1]
and esi, 0x3f
cmp r13b, 0xdf
jbe 0x14003ad02
movzx r13d, byte [r14 + 2]
shl esi, 6
and r13d, 0x3f
or r13d, esi
cmp bl, 0xf0
jb 0x14003ad21
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 0x14003ab57
jmp 0x14003ad3b
add r14, 2
shl edx, 6
or edx, esi
mov r13d, edx
mov rsi, r8
xor ebx, ebx
cmp rdi, rax
jne 0x14003ab3f
jmp 0x14003ab5e
add r14, 3
shl edx, 0xc
or r13d, edx
mov rsi, r8
cmp r13d, 0xffff
jbe 0x14003ab57
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 0x14003ab3f
jmp 0x14003ab5e
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 0x14003aeda
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [rbp + 0x30]
cmp ecx, 0xa
jge 0x14003ae5d
cmp eax, 5
jne 0x14003ade0
mov eax, ecx
mov qword [rbp - 0x18], rax
jmp 0x14003adeb
test ebx, ebx
je 0x14003ae5d
xor ebx, ebx
cmp eax, 0x57
jne 0x14003ae5d
mov dil, 1
xor r14d, r14d
test rsi, rsi
mov rsi, qword [sym.imp.bcrypt.dll_BCryptGenRandom]
je 0x14003a8d0
mov rcx, qword [0x141089bd0]
xor r14d, r14d
xor edx, edx
mov r8, qword [rbp + 0x78]
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x14003a8d0
add r14, 3
shl eax, 0xc
or edi, eax
cmp edi, 0xffff
jbe 0x14003aa8c
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 0x14003aa94
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 0x14003ae96
mov rcx, qword [0x141089bd0]
xor edx, edx
mov r8, qword [rbp + 0x78]
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp qword [rbp + 0x10], 0
je 0x14003aeb0
mov r8, qword [rbp + 0x18]
mov rcx, qword [0x141089bd0]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
cmp r14, 0xffffffffffffffff
je 0x14003aebf
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 0x14003aef2
mov rcx, qword [0x141089bd0]
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.14002c4c0
test rax, rax
je 0x14003af87
mov rax, qword [rbp + 0x38]
mov qword [rax + 8], rdx
mov qword [rax], 1
mov rsi, r14
cmp qword [rbp + 0x10], 0
jne 0x14003ae9d
jmp 0x14003aeb0
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 0x14003aebf
mov rcx, qword [0x141089bd0]
xor edx, edx
mov r8, rsi
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x14003aebf
test rdx, rdx
jne 0x14003afc8
call fcn.140011ec0
jmp 0x14003afff
call fcn.140050ce0
jmp 0x14003afff
mov byte [rbp + 0x87], 1
mov byte [rbp + 0x86], 1
mov edx, 2
mov rcx, rsi
call fcn.140050ce0
jmp 0x14003afff
mov byte [rbp + 0x87], 1
mov byte [rbp + 0x86], 1
call fcn.140011ec0
ud2