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

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rdi
push r12
push r15
sub rsp, 0x20
cmp byte [0x140023328], 0
lea rbp, [0x140021130]
mov qword [rsp + 0x40], rsi
mov ebx, 0x270
mov qword [rsp + 0x48], r14
mov esi, edx
mov r14d, ecx
jne 0x140017f55
mov byte [0x140023328], 1
call qword [sym.imp.MSVCP140.dll__Query_perf_frequency]
mov rdi, rax
call qword [sym.imp.MSVCP140.dll__Query_perf_counter]
cmp rdi, 0x989680
jne 0x140017efc
imul rax, rax, 0x64
jmp 0x140017f1a
cqo
idiv rdi
mov rcx, rax
imul rax, rdx, 0x3b9aca00
imul rcx, rcx, 0x3b9aca00
cqo
idiv rdi
add rax, rcx
mov rcx, rax
mov dword [0x140021134], eax
mov edx, 1
nop dword [rax + rax]
mov eax, ecx
shr eax, 0x1e
xor eax, ecx
imul ecx, eax, 0x6c078965
add ecx, edx
mov dword [rbp + rdx*4 + 4], ecx
inc rdx
cmp rdx, rbx
jb 0x140017f30
mov ecx, ebx
mov dword [0x140021130], ebx
jmp 0x140017f5b
mov ecx, dword [0x140021130]
mov r12d, 0x80000000
lea eax, [r14 - 0x80000000]
cmp r14d, r12d
lea r15d, [r14 + r12]
mov r14, qword [rsp + 0x48]
cmovae r15d, eax
lea edx, [rsi + r12]
cmp esi, r12d
lea eax, [rsi - 0x80000000]
mov rsi, qword [rsp + 0x40]
cmovae edx, eax
sub edx, r15d
cmp edx, 0xffffffff
jne 0x14001810b
cmp ecx, ebx
jne 0x140017ff4
lea r8, [0x140021138]
nop dword [rax]
nop dword [rax + rax]
mov edx, dword [r8 - 4]
xor edx, dword [r8]
lea r8, [r8 + 4]
btr edx, 0x1f
xor edx, dword [r8 - 8]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x62c]
xor ecx, edx
mov dword [r8 + 0x9b8], ecx
sub rbx, 1
jne 0x140017fb0
mov ecx, dword [0x140021130]
jmp 0x1400180cc
cmp ecx, 0x4e0
jb 0x1400180cc
mov r9d, 0x9c4
mov r8d, 0xd50
nop dword [rax]
mov edx, dword [r9 + rbp]
xor edx, dword [r9 + rbp + 4]
btr edx, 0x1f
xor edx, dword [r9 + rbp]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r9 + rbp + 0x634]
xor ecx, edx
mov dword [r9 + rbp - 0x9c0], ecx
add r9, 4
cmp r9, r8
jb 0x140018010
nop dword [rax]
mov edx, dword [r8 + rbp]
xor edx, dword [r8 + rbp + 4]
btr edx, 0x1f
xor edx, dword [r8 + rbp]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + rbp - 0xd4c]
xor ecx, edx
mov dword [r8 + rbp - 0x9c0], ecx
add r8, 4
cmp r8, 0x1380
jb 0x140018050
mov edx, dword [0x1400224b0]
xor edx, dword [0x140021134]
btr edx, 0x1f
xor edx, dword [0x1400224b0]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, edx
xor ecx, dword [0x140021764]
mov dword [0x140021af0], ecx
xor ecx, ecx
mov dword [0x140021130], ecx
mov eax, ecx
mov ecx, dword [rbp + rax*4 + 4]
inc eax
mov dword [0x140021130], eax
mov eax, ecx
shr eax, 0xb
and eax, dword [0x1400224b4]
xor ecx, eax
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 r8d, ecx
shr r8d, 0x12
xor r8d, ecx
jmp 0x14001814b
mov rcx, rbp
lea ebx, [rdx + 1]
call fcn.1400187e0
mov r8d, eax
mov edi, ebx
imul r8, rdi
cmp r8d, ebx
jae 0x140018147
mov eax, ebx
xor edx, edx
neg eax
div ebx
mov ebx, edx
cmp r8d, edx
jae 0x140018147
mov rcx, rbp
call fcn.1400187e0
mov r8d, eax
imul r8, rdi
cmp r8d, ebx
jb 0x140018133
shr r8, 0x20
mov rbx, qword [rsp + 0x50]
lea edx, [r15 + r8]
mov rbp, qword [rsp + 0x58]
lea ecx, [rdx - 0x80000000]
cmp edx, r12d
lea eax, [rdx + r12]
cmovae eax, ecx
add rsp, 0x20
pop r15
pop r12
pop rdi
ret