Function at 0x140022d90
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1320]
mov eax, 0x1420
call fcn.140045520
sub rsp, rax
movaps xmmword [rsp + 0x1410], xmm6
mov rax, qword [0x140056380]
xor rax, rsp
mov qword [rbp + 0x1300], rax
mov rax, rdx
mov qword [rsp + 0x40], rdx
mov r13, rcx
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x28], xmm0
xor r15d, r15d
mov edi, r15d
mov qword [rsp + 0x38], r15
mov r14d, 1
mov dword [rsp + 0x20], r14d
add rax, 0x10
lea rcx, [rsp + 0x20]
cmp dword [rax], r14d
cmovg rcx, rax
mov r12d, dword [rcx]
mov esi, r15d
mov rbx, qword [rsp + 0x30]
test r12d, r12d
jle 0x140022e89
movd xmm0, r12d
cvtdq2pd xmm0, xmm0
movsd xmm6, qword [0x14004b068]
divsd xmm6, xmm0
nop word [rax + rax]
movd xmm0, esi
cvtdq2pd xmm0, xmm0
mulsd xmm0, xmm6
cvttsd2si eax, xmm0
mov dword [rsp + 0x24], eax
cmp rbx, rdi
je 0x140022e66
mov dword [rbx], eax
add rbx, 4
mov qword [rsp + 0x30], rbx
jmp 0x140022e82
lea r8, [rsp + 0x24]
mov rdx, rbx
lea rcx, [rsp + 0x28]
call fcn.140019110
mov rdi, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
inc esi
cmp esi, r12d
jl 0x140022e40
call sub.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_
mov edx, 0xffffffff
mov dword [rbp + 0x12f4], edx
mov dword [rsp + 0x74], eax
nop dword [rax]
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul eax, ecx, 0x6c078965
add eax, r14d
mov dword [rsp + r14*4 + 0x74], eax
inc r14
cmp r14, 0x270
jb 0x140022ea0
mov dword [rsp + 0x70], 0x270
lea rax, [rsp + 0x70]
mov qword [rsp + 0x48], rax
mov ecx, 0x40
mov rax, 0xffffffffffffffff
nop
dec rcx
shr rax, 1
cmp rax, rdx
ja 0x140022ee0
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], rcx
lea r8, [rsp + 0x48]
mov rdx, rbx
mov rsi, qword [rsp + 0x28]
mov rcx, rsi
call fcn.1400201b0
sub rbx, rsi
sar rbx, 2
test rbx, rbx
je 0x140022f61
mov r14, rsi
mov r12, qword [rsp + 0x40]
nop
mov r8d, dword [r14]
mov rdx, r12
lea rcx, [rsp + 0x48]
call fcn.140009eb0
movsd xmm0, qword [r13 + 0x88]
comisd xmm0, xmmword [rsp + 0x58]
jbe 0x140022f52
movsd xmm0, qword [r13 + 0x90]
comisd xmm0, xmmword [rsp + 0x60]
ja 0x140022f99
inc r15d
add r14, 4
movsxd rax, r15d
cmp rax, rbx
jb 0x140022f20
test rsi, rsi
je 0x140022fed
sub rdi, rsi
and rdi, 0xfffffffffffffffc
mov rax, rsi
cmp rdi, 0x1000
jb 0x140022fe2
add rdi, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140022fe2
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
movsxd rax, r15d
mov ebx, dword [rsi + rax*4]
test rsi, rsi
je 0x140022fde
sub rdi, rsi
and rdi, 0xfffffffffffffffc
mov rax, rsi
cmp rdi, 0x1000
jb 0x140022fd3
add rdi, 0x27
mov rsi, qword [rsi - 8]
sub rax, rsi
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140022fd3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rdx, rdi
mov rcx, rsi
call fcn.140044d00
mov eax, ebx
jmp 0x140022ff2
mov rdx, rdi
mov rcx, rsi
call fcn.140044d00
mov eax, 0xffffffff
mov rcx, qword [rbp + 0x1300]
xor rcx, rsp
call fcn.140045060
lea r11, [rsp + 0x1420]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
movaps xmm6, xmmword [r11 - 0x10]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret