Function at 0x140016a20
Capabilities:
Allocate or change rwx memory
Check for software breakpoints
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1360]
mov eax, 0x1460
call fcn.1400b7920
sub rsp, rax
mov rax, qword [0x140480c38]
xor rax, rsp
mov qword [rbp + 0x1350], rax
mov r15, rcx
lea r12, [rcx + 8]
mov r8, r12
mov edx, dword [rcx]
mov ecx, dword [rcx + 4]
call fcn.1400b8880
test eax, eax
jne 0x140016dc4
mov dword [rsp + 0x30], eax
call sub.MSVCP140.dll__Query_perf_frequency
mov rbx, rax
call sub.MSVCP140.dll__Query_perf_counter
cmp rbx, 0x989680
jne 0x140016a9a
imul rax, rax, 0x64
jmp 0x140016ab5
cqo
idiv rbx
imul rcx, rax, 0x3b9aca00
imul rax, rdx, 0x3b9aca00
cqo
idiv rbx
add rax, rcx
mov rcx, rax
mov dword [rbp + 0x1344], 0xffffffff
mov dword [rbp - 0x3c], eax
mov edx, 1
nop word [rax + rax]
mov eax, ecx
shr eax, 0x1e
xor eax, ecx
imul ecx, eax, 0x6c078965
add ecx, edx
mov dword [rbp + rdx*4 - 0x3c], ecx
inc rdx
cmp rdx, 0x270
jb 0x140016ad0
mov dword [rbp - 0x40], 0x270
mov rbx, qword [r15 + 0x18]
mov qword [rbp - 0x80], rbx
mov r14, qword [r15 + 0x20]
mov qword [rbp - 0x48], r14
cmp rbx, r14
je 0x140016d78
nop
mov rsi, qword [rbx]
mov qword [rbp - 0x50], rsi
mov edi, dword [rsi + 0xc]
add rdi, qword [r15 + 0x10]
mov qword [rbp - 0x58], rdi
mov edx, dword [rsi + 0x10]
lea r9, [rsp + 0x30]
mov r8d, 0x40
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x140016d74
mov r8d, dword [rsi + 0x10]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r8
mov r9, rdi
mov rdx, rdi
mov rcx, qword [r12]
call fcn.1400b9030
mov rcx, rax
mov qword [rbp - 0x60], rax
xor r12d, r12d
test rax, rax
je 0x140016d2f
xor r13d, r13d
nop dword [rax]
mov rsi, qword [rsp + 0x78]
mov ecx, dword [rsi + r13]
sub ecx, 0xde
cmp ecx, 1
ja 0x140016d08
xorps xmm0, xmm0
movups xmmword [rsp + 0x38], xmm0
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x48], xmm1
mov qword [rsp + 0x58], 0
mov rsi, qword [rsi + r13 + 8]
mov qword [rsp + 0x38], rsi
mov dword [rsp + 0x44], r12d
mov edi, 1
mov dword [rsp + 0x40], edi
movzx r14d, dil
mov rbx, qword [rsp + 0x50]
movzx eax, byte [rsi]
cmp al, 0xcc
je 0x140016be6
cmp al, 0xf1
je 0x140016be6
xor r14b, r14b
jmp 0x140016c74
xorps xmm0, xmm0
xor ecx, ecx
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], rcx
mov byte [rsp + 0x60], al
mov byte [rsp + 0x61], 0xff
mov byte [rsp + 0x62], al
mov qword [rsp + 0x68], rsi
lea rax, [rbp - 0x40]
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], reloc.WLDAP32.dll_Ordinal_32
mov dword [rbp - 0x68], 0xffffffff
lea edx, [rcx + 3]
lea rcx, [rbp - 0x78]
call fcn.14000a1c0
mov byte [rsp + 0x70], al
cmp rbx, qword [rsp + 0x58]
je 0x140016c53
movups xmm0, xmmword [rsp + 0x60]
movups xmmword [rbx], xmm0
movsd xmm1, qword [rsp + 0x70]
movsd qword [rbx + 0x10], xmm1
add rbx, 0x18
mov qword [rsp + 0x50], rbx
jmp 0x140016c6e
lea r8, [rsp + 0x60]
mov rdx, rbx
lea rcx, [rsp + 0x48]
call fcn.140005760
mov rbx, qword [rsp + 0x50]
mov edi, dword [rsp + 0x40]
inc edi
mov dword [rsp + 0x40], edi
inc rsi
test r14b, r14b
jne 0x140016bd3
cmp edi, 1
jbe 0x140016caa
lea rcx, [r15 + 0x48]
mov rdx, qword [r15 + 0x50]
lea r8, [rsp + 0x38]
cmp rdx, qword [r15 + 0x58]
je 0x140016ca4
call fcn.140006a40
add qword [r15 + 0x50], 0x28
jmp 0x140016caa
call fcn.140005910
nop
mov r8, qword [rsp + 0x48]
test r8, r8
je 0x140016d08
mov rcx, qword [rsp + 0x58]
sub rcx, r8
movabs rax, 0x2aaaaaaaaaaaaaab
imul rcx
sar rdx, 2
mov rax, rdx
shr rax, 0x3f
add rdx, rax
lea rdx, [rdx + rdx*2]
shl rdx, 3
mov rax, r8
cmp rdx, 0x1000
jb 0x140016d00
add rdx, 0x27
mov r8, qword [r8 - 8]
sub rax, r8
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140016d6d
mov rcx, r8
call fcn.1400b7470
inc r12
add r13, 0xf0
mov rcx, qword [rbp - 0x60]
cmp r12, rcx
jb 0x140016b80
mov rbx, qword [rbp - 0x80]
mov rdi, qword [rbp - 0x58]
mov rsi, qword [rbp - 0x50]
mov r14, qword [rbp - 0x48]
mov rdx, rcx
mov rcx, qword [rsp + 0x78]
call fcn.1400b97f0
mov edx, dword [rsi + 0x10]
lea r9, [rsp + 0x30]
mov r8d, reloc.WLDAP32.dll_Ordinal_32
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x140016daa
add rbx, 0x20
mov qword [rbp - 0x80], rbx
cmp rbx, r14
je 0x140016d78
lea r12, [r15 + 8]
jmp 0x140016b10
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
xor al, al
jmp 0x140016d7a
mov al, 1
mov rcx, qword [rbp + 0x1350]
xor rcx, rsp
call fcn.1400b7590
lea r11, [rsp + 0x1460]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
lea rcx, [rbp - 0x78]
call fcn.140007ad0
lea rdx, [0x140461cb8]
lea rcx, [rbp - 0x78]
call sub.VCRUNTIME140.dll__CxxThrowException
int3
lea rcx, [rbp - 0x78]
call fcn.140007ad0
lea rdx, [0x140461cb8]
lea rcx, [rbp - 0x78]
call sub.VCRUNTIME140.dll__CxxThrowException
int3