Function at 0x140002ca0
Capabilities:
Allocate or change rwx memory
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
lea rbp, [rsp - 0x12e0]
mov eax, 0x13e0
call fcn.14015c020
sub rsp, rax
mov rax, qword [0x140538240]
xor rax, rsp
mov qword [rbp + 0x12d0], rax
mov rsi, rcx
mov dword [rsp + 0x38], 0
call qword [sym.imp.MSVCP140.dll__Query_perf_frequency]
mov rbx, rax
call qword [sym.imp.MSVCP140.dll__Query_perf_counter]
cmp rbx, 0x989680
jne 0x140002cff
imul rax, rax, 0x64
jmp 0x140002d1d
cqo
idiv rbx
mov rcx, rax
imul rax, rdx, 0x3b9aca00
imul rcx, rcx, 0x3b9aca00
cqo
idiv rbx
add rax, rcx
mov rcx, rax
mov dword [rbp + 0x12c4], 0xffffffff
mov dword [rsp + 0x44], eax
mov edx, 1
mov ebx, 0x270
nop dword [rax + rax]
mov eax, ecx
shr eax, 0x1e
xor eax, ecx
imul ecx, eax, 0x6c078965
add ecx, edx
mov dword [rsp + rdx*4 + 0x44], ecx
inc rdx
cmp rdx, rbx
jb 0x140002d40
mov rdi, qword [rsi + 0x10]
lea r9, [rsp + 0x38]
mov r8d, 4
mov dword [rsp + 0x40], ebx
mov rcx, rdi
movsxd rdx, dword [rdi + 0x3c]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x140002ef6
lea rax, [rsp + 0x48]
nop dword [rax + rax]
mov r8d, dword [rax - 4]
xor r8d, dword [rax]
lea rax, [rax + 4]
btr r8d, 0x1f
xor r8d, dword [rax - 8]
mov ecx, r8d
and cl, 1
neg cl
sbb edx, edx
shr r8d, 1
and edx, 0x9908b0df
xor edx, dword [rax + 0x62c]
xor edx, r8d
mov dword [rax + 0x9b8], edx
sub rbx, 1
jne 0x140002d90
mov ebx, dword [rsp + 0x40]
mov ecx, dword [rsp + rbx*4 + 0x44]
mov eax, ecx
shr eax, 0xb
inc ebx
and eax, dword [rbp + 0x12c4]
xor ecx, eax
mov dword [rsp + 0x40], ebx
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and eax, 0xffffdf8c
shl eax, 0xf
xor ecx, eax
mov eax, ecx
shr eax, 0x12
xor eax, ecx
lea rcx, [rsp + 0x40]
mov word [rdi + 2], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rdi + 8], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rdi + 6], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rdi + 0x16], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rdi + 0x12], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rdi + 0x14], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rdi + 0x18], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rdi + 0xc], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rdi + 0xa], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rdi + 0x24], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rdi + 0x26], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rdi + 0x1a], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rdi + 0x10], ax
call fcn.140016be0
movsxd r8, dword [rdi + 0x3c]
xor edx, edx
mov word [rdi + 0xe], ax
sub r8, 0x40
mov rcx, qword [rsi + 0x10]
add rcx, 0x40
call sub.VCRUNTIME140.dll_memset
movsxd rdx, dword [rdi + 0x3c]
lea r9, [rsp + 0x38]
mov rcx, qword [rsi + 0x10]
mov r8d, 2
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x140002f1e
mov al, 1
mov rcx, qword [rbp + 0x12d0]
xor rcx, rsp
call fcn.14015af10
lea r11, [rsp + 0x13e0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
lea rcx, [rsp + 0x20]
call fcn.1400021e0
lea rdx, [0x1403abde0]
lea rcx, [rsp + 0x20]
call sub.VCRUNTIME140.dll__CxxThrowException
int3