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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push r14
push r15
mov rax, rcx
xor r15d, r15d
movzx ecx, byte [rcx + 0x1398]
mov edx, 1
add cl, 0xff
mov edi, r15d
shl edx, cl
mov ebp, r15d
lea esi, [rdx*2 - 1]
cmp qword [rax + 0x1388], rdi
jbe 0x14002047c
nop dword [rax]
mov r8d, dword [rax]
cmp r8d, 0x270
jne 0x140020306
lea r9, [rax + 8]
mov r10d, r8d
nop dword [rax]
nop word [rax + rax]
mov r8d, dword [r9 - 4]
xor r8d, dword [r9]
lea r9, [r9 + 4]
btr r8d, 0x1f
xor r8d, dword [r9 - 8]
mov ecx, r8d
and cl, 1
neg cl
sbb edx, edx
shr r8d, 1
and edx, 0x9908b0df
xor edx, dword [r9 + 0x62c]
xor edx, r8d
mov dword [r9 + 0x9b8], edx
sub r10, 1
jne 0x1400202c0
mov r8d, dword [rax]
jmp 0x140020412
cmp r8d, 0x4e0
jb 0x140020412
lea r11, [rax + 0x9c4]
mov ebx, 0xe3
mov ecx, dword [r11]
nop dword [rax]
nop word [rax + rax]
mov r8d, dword [r11 + 4]
lea r9, [r11 + 4]
xor r8d, ecx
btr r8d, 0x1f
xor r8d, ecx
mov ecx, r8d
and cl, 1
neg cl
mov ecx, dword [r9]
sbb edx, edx
shr r8d, 1
and edx, 0x9908b0df
xor edx, dword [r11 + 0x634]
xor edx, r8d
mov dword [r11 - 0x9c0], edx
lea r11, [r9]
sub rbx, 1
jne 0x140020330
lea r11, [rax + 0xd50]
mov ebx, 0x18c
mov ecx, dword [r11]
nop dword [rax]
nop word [rax + rax]
mov r8d, dword [r11 + 4]
lea r9, [r11 + 4]
xor r8d, ecx
btr r8d, 0x1f
xor r8d, ecx
mov ecx, r8d
and cl, 1
neg cl
mov ecx, dword [r9]
sbb edx, edx
shr r8d, 1
and edx, 0x9908b0df
xor edx, dword [r11 - 0xd4c]
xor edx, r8d
mov dword [r11 - 0x9c0], edx
lea r11, [r9]
sub rbx, 1
jne 0x140020390
mov r8d, dword [rax + 0x1380]
xor r8d, dword [rax + 4]
btr r8d, 0x1f
xor r8d, dword [rax + 0x1380]
mov ecx, r8d
and cl, 1
neg cl
sbb edx, edx
shr r8d, 1
and edx, 0x9908b0df
xor edx, dword [rax + 0x634]
xor edx, r8d
mov r8d, r15d
mov dword [rax + 0x9c0], edx
mov dword [rax], r15d
mov ecx, r8d
mov edx, dword [rax + rcx*4 + 4]
lea ecx, [r8 + 1]
mov dword [rax], ecx
mov ecx, edx
shr ecx, 0xb
and ecx, dword [rax + 0x1384]
xor edx, ecx
mov ecx, edx
and ecx, 0xff3a58ad
shl ecx, 7
xor edx, ecx
mov ecx, edx
and ecx, 0xffffdf8c
shl ecx, 0xf
xor edx, ecx
mov r8d, edx
shr r8d, 0x12
xor r8d, edx
cmp r8d, dword [rax + 0x13a0]
ja 0x1400202a0
mov rcx, qword [rax + 0x1398]
and r8d, esi
shl edi, cl
inc rbp
or edi, r8d
cmp rbp, qword [rax + 0x1388]
jb 0x1400202a0
add esi, esi
or esi, 1
cmp rbp, qword [rax + 0x1390]
jae 0x14002066e
nop
mov r8d, dword [rax]
cmp r8d, 0x270
jne 0x1400204f6
lea r9, [rax + 8]
mov r10d, r8d
nop dword [rax]
nop word [rax + rax]
mov r8d, dword [r9 - 4]
xor r8d, dword [r9]
lea r9, [r9 + 4]
btr r8d, 0x1f
xor r8d, dword [r9 - 8]
mov ecx, r8d
and cl, 1
neg cl
sbb edx, edx
shr r8d, 1
and edx, 0x9908b0df
xor edx, dword [r9 + 0x62c]
xor edx, r8d
mov dword [r9 + 0x9b8], edx
sub r10, 1
jne 0x1400204b0
mov r8d, dword [rax]
jmp 0x140020602
cmp r8d, 0x4e0
jb 0x140020602
lea r11, [rax + 0x9c4]
mov ebx, 0xe3
mov ecx, dword [r11]
nop dword [rax]
nop word [rax + rax]
mov r8d, ecx
lea r9, [r11 + 4]
xor r8d, dword [r9]
btr r8d, 0x1f
xor r8d, ecx
mov ecx, r8d
and cl, 1
neg cl
mov ecx, dword [r9]
sbb edx, edx
shr r8d, 1
and edx, 0x9908b0df
xor edx, dword [r11 + 0x634]
xor edx, r8d
mov dword [r11 - 0x9c0], edx
lea r11, [r9]
sub rbx, 1
jne 0x140020520
lea r11, [rax + 0xd50]
mov ebx, 0x18c
mov ecx, dword [r11]
nop dword [rax]
nop word [rax + rax]
mov r8d, dword [r11 + 4]
lea r9, [r11 + 4]
xor r8d, ecx
btr r8d, 0x1f
xor r8d, ecx
mov ecx, r8d
and cl, 1
neg cl
mov ecx, dword [r9]
sbb edx, edx
shr r8d, 1
and edx, 0x9908b0df
xor edx, dword [r11 - 0xd4c]
xor edx, r8d
mov dword [r11 - 0x9c0], edx
lea r11, [r9]
sub rbx, 1
jne 0x140020580
mov r8d, dword [rax + 0x1380]
xor r8d, dword [rax + 4]
btr r8d, 0x1f
xor r8d, dword [rax + 0x1380]
mov ecx, r8d
and cl, 1
neg cl
sbb edx, edx
shr r8d, 1
and edx, 0x9908b0df
xor edx, dword [rax + 0x634]
xor edx, r8d
mov r8d, r15d
mov dword [rax + 0x9c0], edx
mov dword [rax], r15d
mov ecx, r8d
mov edx, dword [rax + rcx*4 + 4]
lea ecx, [r8 + 1]
mov dword [rax], ecx
mov ecx, edx
shr ecx, 0xb
and ecx, dword [rax + 0x1384]
xor edx, ecx
mov ecx, edx
and ecx, 0xff3a58ad
shl ecx, 7
xor edx, ecx
mov ecx, edx
and ecx, 0xffffdf8c
shl ecx, 0xf
xor edx, ecx
mov r8d, edx
shr r8d, 0x12
xor r8d, edx
cmp r8d, dword [rax + 0x13a4]
ja 0x140020490
movzx ecx, byte [rax + 0x1398]
and r8d, esi
inc cl
inc rbp
shl edi, cl
or edi, r8d
cmp rbp, qword [rax + 0x1390]
jb 0x140020490
mov rbx, qword [rsp + 0x18]
mov eax, edi
mov rdi, qword [rsp + 0x30]
mov rbp, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x28]
pop r15
pop r14
ret