Function at 0x140051c20
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
push rdi
push r14
push r15
sub rsp, 0x20
mov rax, qword gs:[0x58]
lea rbp, [0x1400d2530]
mov esi, ecx
mov edi, edx
mov ecx, 4
mov ebx, 0x270
mov rax, qword [rax]
mov eax, dword [rcx + rax]
cmp dword [0x1400d38b8], eax
jle 0x140051cd1
lea rcx, [0x1400d38b8]
call fcn.1400626f4
cmp dword [0x1400d38b8], 0xffffffff
jne 0x140051cd1
xor ecx, ecx
call qword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
mov dword [0x1400d38b4], 0xffffffff
mov r8d, 1
mov dword [0x1400d2534], eax
nop word [rax + rax]
mov edx, eax
shr edx, 0x1e
xor edx, eax
imul edx, edx, 0x6c078965
add edx, r8d
mov dword [rbp + r8*4 + 4], edx
mov eax, edx
inc r8
cmp r8, rbx
jb 0x140051ca0
lea rcx, [0x1400d38b8]
mov dword [0x1400d2530], ebx
call fcn.140062688
mov r15d, 0x80000000
lea eax, [rsi - 0x80000000]
cmp esi, r15d
lea r14d, [rsi + r15]
cmovae r14d, eax
lea ecx, [rdi + r15]
cmp edi, r15d
lea eax, [rdi - 0x80000000]
cmovae ecx, eax
sub ecx, r14d
cmp ecx, 0xffffffff
jne 0x140051e7b
mov edx, dword [0x1400d2530]
cmp edx, ebx
jne 0x140051d64
lea r8, [0x1400d2538]
nop word [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 0x140051d20
mov edx, dword [0x1400d2530]
jmp 0x140051e3c
cmp edx, 0x4e0
jb 0x140051e3c
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 0x140051d80
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 0x140051dc0
mov edx, dword [0x1400d38b0]
xor edx, dword [0x1400d2534]
btr edx, 0x1f
xor edx, dword [0x1400d38b0]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, edx
xor ecx, dword [0x1400d2b64]
xor edx, edx
mov dword [0x1400d2ef0], ecx
mov dword [0x1400d2530], edx
mov eax, edx
inc edx
mov ecx, dword [rbp + rax*4 + 4]
mov eax, ecx
shr eax, 0xb
and eax, dword [0x1400d38b4]
xor ecx, eax
mov dword [0x1400d2530], edx
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 0x140051ebb
lea ebx, [rcx + 1]
mov rcx, rbp
call fcn.14004d480
mov r8d, eax
mov edi, ebx
imul r8, rdi
cmp r8d, ebx
jae 0x140051eb7
mov eax, ebx
xor edx, edx
neg eax
div ebx
mov ebx, edx
cmp r8d, edx
jae 0x140051eb7
mov rcx, rbp
call fcn.14004d480
mov r8d, eax
imul r8, rdi
cmp r8d, ebx
jb 0x140051ea3
shr r8, 0x20
mov rbx, qword [rsp + 0x40]
lea edx, [r14 + r8]
mov rbp, qword [rsp + 0x48]
lea ecx, [rdx - 0x80000000]
mov rsi, qword [rsp + 0x50]
lea eax, [rdx + r15]
cmp edx, r15d
cmovae eax, ecx
add rsp, 0x20
pop r15
pop r14
pop rdi
ret