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

Disassembly:
cmp rcx, rdx
je 0x14000195e
mov r11, rsp
push r14
sub rsp, 0x30
lea rax, [rcx + 1]
mov qword [r11 - 0x18], r12
mov r14, r8
mov r10, rdx
mov r9, rcx
mov r12d, 1
cmp rax, rdx
je 0x140001953
mov qword [r11 + 8], rbx
mov ecx, r12d
mov qword [r11 + 0x10], rbp
sub rcx, r9
mov qword [r11 + 0x20], rsi
mov qword [r11 - 0x10], rdi
mov qword [r11 - 0x20], r13
mov qword [r11 - 0x28], r15
mov qword [rsp], rcx
nop dword [rax]
nop dword [rax + rax]
lea r13, [r12 + r9]
add r13, rcx
nop word [rax + rax]
xor ebp, ebp
xor r15d, r15d
test r12, r12
je 0x1400018de
mov rdx, qword [r14 + 8]
nop dword [rax]
nop word [rax + rax]
lea ecx, [rdx + 0xff]
shl rbp, cl
add rbp, rbp
nop dword [rax]
mov rdi, qword [r14]
mov ecx, dword [rdi]
cmp ecx, 0x270
jne 0x140001793
lea rax, [rdi + 8]
mov r11d, ecx
nop dword [rax]
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 r11, 1
jne 0x140001750
mov ecx, dword [rdi]
jmp 0x140001872
cmp ecx, 0x4e0
jb 0x140001872
lea rbx, [rdi + 0x9c4]
mov esi, 0xe3
mov eax, dword [rbx]
nop dword [rax]
mov edx, eax
lea r8, [rbx + 4]
xor edx, dword [r8]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
mov eax, dword [r8]
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [rbx + 0x634]
xor ecx, edx
mov dword [rbx - 0x9c0], ecx
lea rbx, [r8]
sub rsi, 1
jne 0x1400017b0
lea rbx, [rdi + 0xd50]
mov esi, 0x18c
mov eax, dword [rbx]
nop word [rax + rax]
mov edx, eax
lea r8, [rbx + 4]
xor edx, dword [r8]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
mov eax, dword [r8]
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [rbx - 0xd4c]
xor ecx, edx
mov dword [rbx - 0x9c0], ecx
lea rbx, [r8]
sub rsi, 1
jne 0x140001800
mov edx, dword [rdi + 0x1380]
xor edx, dword [rdi + 4]
btr edx, 0x1f
xor edx, dword [rdi + 0x1380]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [rdi + 0x634]
xor ecx, edx
mov dword [rdi + 0x9c0], ecx
xor ecx, ecx
mov dword [rdi], 0
mov eax, ecx
mov edx, dword [rdi + rax*4 + 4]
lea eax, [rcx + 1]
mov dword [rdi], eax
mov ecx, edx
mov eax, dword [rdi + 0x1384]
mov r8, qword [r14 + 0x10]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and edx, 0xffffdf8c
shl edx, 0xf
mov ecx, edx
xor rcx, rax
mov rax, rcx
shr rax, 0x12
xor rax, rcx
cmp rax, r8
ja 0x140001730
mov rdx, qword [r14 + 8]
or rbp, rax
lea ecx, [rdx + 0xff]
shl r15, cl
add r15, r15
or r15, r8
cmp r15, r12
jb 0x140001720
xor edx, edx
mov rax, r15
div r13
mov rcx, rax
mov r8, rdx
xor edx, edx
mov rax, rbp
div r13
cmp rax, rcx
jb 0x140001902
cmp r8, r12
jne 0x140001700
xor edx, edx
mov rax, rbp
div r13
cmp rdx, r12
je 0x140001921
movzx eax, byte [rdx + r9]
movzx ecx, byte [r12 + r9]
mov byte [r12 + r9], al
mov byte [rdx + r9], cl
mov rcx, qword [rsp]
inc r12
lea rax, [r12 + r9]
cmp rax, r10
jne 0x1400016f0
mov r15, qword [rsp + 0x10]
mov r13, qword [rsp + 0x18]
mov rdi, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x58]
mov rbp, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
mov r12, qword [rsp + 0x20]
add rsp, 0x30
pop r14
ret