Function at 0x140002f40
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
push rbp
push rdi
push r14
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 r14, rcx
mov dword [rsp + 0x20], 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 0x140002f9d
imul rax, rax, 0x64
jmp 0x140002fbb
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 word [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 0x140002fe0
mov rdi, qword [r14 + 0x10]
lea r9, [rsp + 0x20]
mov edx, 0x108
mov dword [rsp + 0x40], ebx
mov r8d, 4
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x30], 0xffffffffffffffff
movsxd rsi, dword [rdi + 0x3c]
add rsi, rdi
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1400032b1
lea rax, [rsp + 0x48]
nop dword [rax]
nop word [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 0x140003050
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 [rsi + 0x16], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rsi + 4], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov dword [rsi + 0x10], eax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov dword [rsi + 0xc], eax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rsi + 6], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rsi + 0x14], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov dword [rsi + 8], eax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov dword [rsi + 0x28], eax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov dword [rsi + 0x2c], eax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov dword [rsi + 0x58], eax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rsi + 0x5e], ax
call fcn.140016be0
lea rdx, [rsp + 0x40]
mov dword [rsi + 0x3c], eax
lea rcx, [rsp + 0x28]
call fcn.140015390
lea rdx, [rsp + 0x40]
mov qword [rsi + 0x30], rax
lea rcx, [rsp + 0x28]
call fcn.140015390
lea rdx, [rsp + 0x40]
mov qword [rsi + 0x78], rax
lea rcx, [rsp + 0x28]
call fcn.140015390
lea rcx, [rsp + 0x40]
mov qword [rsi + 0x70], rax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov dword [rsi + 0x80], eax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rsi + 0x44], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rsi + 0x46], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov byte [rsi + 0x1a], al
call fcn.140016be0
mov byte [rsi + 0x1b], al
lea rcx, [rsp + 0x40]
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rsi + 0x40], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rsi + 0x42], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rsi + 0x48], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rsi + 0x4a], ax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov dword [rsi + 0x84], eax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov dword [rsi + 0x38], eax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov dword [rsi + 0x1c], eax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov dword [rsi + 0x54], eax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov dword [rsi + 0x50], eax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov dword [rsi + 0x20], eax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov dword [rsi + 0x24], eax
call fcn.140016be0
lea rcx, [rsp + 0x40]
mov word [rsi + 0x5c], ax
call fcn.140016be0
mov dword [rsi + 0x4c], eax
lea r9, [rsp + 0x20]
movsxd rcx, dword [rdi + 0x3c]
mov edx, 0x108
add rcx, qword [r14 + 0x10]
mov r8d, 2
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1400032d8
mov al, 1
mov rcx, qword [rbp + 0x12d0]
xor rcx, rsp
call fcn.14015af10
lea r11, [rsp + 0x13e0]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret
lea rcx, [rsp + 0x28]
call fcn.1400021e0
lea rdx, [0x1403abde0]
lea rcx, [rsp + 0x28]
call sub.VCRUNTIME140.dll__CxxThrowException
int3