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

Disassembly:
cmp rcx, rdx
je 0x140022c0d
mov r11, rsp
mov qword [r11 + 0x10], rdx
mov qword [r11 + 8], rcx
push r14
sub rsp, 0x30
lea rax, [rcx + 8]
mov qword [r11 - 0x30], r13
mov qword [rsp + 0x58], rax
mov r14, r8
mov r13d, 1
cmp rax, rdx
je 0x140022c02
mov qword [r11 + 0x18], rbx
mov qword [r11 - 0x10], rbp
mov qword [r11 - 0x18], rsi
mov qword [r11 - 0x20], rdi
movabs rdi, 0xb5026f5aa96619e9
mov qword [r11 - 0x28], r12
mov qword [rsp], r15
nop dword [rax + rax]
lea r12, [r13 + 1]
movabs r10, 0x38eb3ffff6d3
nop
xor ebp, ebp
xor r15d, r15d
test r13, r13
je 0x140022b82
mov r8, qword [r14 + 8]
nop dword [rax]
nop word [rax + rax]
lea ecx, [r8 + 0xff]
shl rbp, cl
add rbp, rbp
nop dword [rax]
mov rbx, qword [r14]
mov ecx, dword [rbx]
cmp ecx, 0x138
jne 0x140022a14
lea rax, [rbx + 0x10]
mov r11d, ecx
nop dword [rax]
nop dword [rax + rax]
mov r8d, dword [rax - 8]
xor r8d, dword [rax]
lea rax, [rax + 8]
btr r8d, 0x1f
xor r8, qword [rax - 0x10]
movzx ecx, r8b
and cl, 1
neg cl
sbb rdx, rdx
shr r8, 1
and rdx, rdi
xor rdx, qword [rax + 0x4d0]
xor rdx, r8
mov qword [rax + 0x9b0], rdx
sub r11, 1
jne 0x1400229d0
mov ecx, dword [rbx]
jmp 0x140022b0e
cmp ecx, 0x270
jb 0x140022b0e
lea rdi, [rbx + 0x9c8]
mov esi, 0x9c
mov rax, qword [rdi]
movabs r9, 0xb5026f5aa96619e9
nop dword [rax]
mov rdx, rax
lea r8, [rdi + 8]
xor rdx, qword [r8]
btr edx, 0x1f
xor rdx, rax
movzx eax, dl
and al, 1
neg al
mov rax, qword [r8]
sbb rcx, rcx
shr rdx, 1
and rcx, r9
xor rcx, qword [rdi + 0x4e0]
xor rcx, rdx
mov qword [rdi - 0x9c0], rcx
lea rdi, [r8]
sub rsi, 1
jne 0x140022a40
lea rdi, [rbx + 0xea8]
mov esi, 0x9b
mov rax, qword [rdi]
nop dword [rax]
mov rdx, rax
lea r8, [rdi + 8]
xor rdx, qword [r8]
btr edx, 0x1f
xor rdx, rax
movzx eax, dl
and al, 1
neg al
mov rax, qword [r8]
sbb rcx, rcx
shr rdx, 1
and rcx, r9
xor rcx, qword [rdi - 0xea0]
xor rcx, rdx
mov qword [rdi - 0x9c0], rcx
lea rdi, [r8]
sub rsi, 1
jne 0x140022a90
mov edx, dword [rbx + 0x1380]
mov rdi, r9
xor edx, dword [rbx + 8]
btr edx, 0x1f
xor rdx, qword [rbx + 0x1380]
movzx eax, dl
and al, 1
neg al
sbb rcx, rcx
shr rdx, 1
and rcx, r9
xor rcx, qword [rbx + 0x4e0]
xor rcx, rdx
mov qword [rbx + 0x9c0], rcx
xor ecx, ecx
mov dword [rbx], 0
mov eax, ecx
mov rdx, qword [rbx + rax*8 + 8]
lea eax, [rcx + 1]
mov dword [rbx], eax
mov rcx, rdx
mov rax, qword [rbx + 0x1388]
shr rcx, 0x1d
and rax, rcx
xor rdx, rax
mov rax, rdx
and rax, r10
shl rax, 0x11
xor rdx, rax
mov rax, rdx
and rax, 0xffffffffffffbf77
shl rax, 0x25
xor rdx, rax
mov rax, rdx
shr rax, 0x2b
xor rax, rdx
mov rdx, qword [r14 + 0x10]
cmp rax, rdx
ja 0x1400229b0
mov r8, qword [r14 + 8]
or rbp, rax
lea ecx, [r8 + 0xff]
shl r15, cl
add r15, r15
or r15, rdx
cmp r15, r13
jb 0x1400229a0
xor edx, edx
mov rax, r15
div r12
mov rcx, rax
mov r8, rdx
xor edx, edx
mov rax, rbp
div r12
cmp rax, rcx
jb 0x140022ba6
cmp r8, r13
jne 0x140022980
mov r9, qword [rsp + 0x48]
xor edx, edx
mov r10, qword [rsp + 0x40]
mov rax, rbp
mov r8, qword [rsp + 0x58]
div r12
cmp rdx, r13
je 0x140022bd0
mov rax, qword [r10 + rdx*8]
mov rcx, qword [r8]
mov qword [r8], rax
mov qword [r10 + rdx*8], rcx
add r8, 8
mov r13, r12
mov qword [rsp + 0x58], r8
cmp r8, r9
jne 0x140022970
mov r15, qword [rsp]
mov r12, qword [rsp + 0x10]
mov rdi, qword [rsp + 0x18]
mov rsi, qword [rsp + 0x20]
mov rbp, qword [rsp + 0x28]
mov rbx, qword [rsp + 0x50]
mov r13, qword [rsp + 8]
add rsp, 0x30
pop r14
ret