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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x12d0]
mov eax, 0x13d0
call fcn.180059be0
sub rsp, rax
mov rax, qword [0x180071040]
xor rax, rsp
mov qword [rbp + 0x12c0], rax
mov r14, r8
mov rsi, rcx
mov qword [rsp + 0x28], rcx
xor r12d, r12d
mov dword [rsp + 0x20], r12d
xorps xmm0, xmm0
movups xmmword [rcx], xmm0
mov qword [rcx + 0x10], r12
mov qword [rcx + 0x18], 0xf
mov byte [rcx], r12b
mov ebx, 1
mov dword [rsp + 0x20], ebx
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov ecx, eax
mov dword [rbp + 0x12b4], 0xffffffff
mov dword [rsp + 0x34], eax
nop
mov eax, ecx
shr eax, 0x1e
xor eax, ecx
imul ecx, eax, 0x6c078965
add ecx, ebx
mov dword [rsp + rbx*4 + 0x34], ecx
inc rbx
cmp rbx, 0x270
jb 0x180050970
mov ebx, 0x270
mov dword [rsp + 0x30], ebx
mov r15d, dword [r14 + 0x10]
dec r15d
cmp qword [rsi + 0x10], 8
jae 0x180050be0
nop word [rax + rax]
cmp r15d, 0xffffffff
jne 0x180050b43
cmp ebx, 0x270
jne 0x180050a12
lea r8, [rsp + 0x38]
mov r9d, ebx
nop word [rax + rax]
mov edx, dword [r8 - 4]
xor edx, dword [r8]
btr edx, 0x1f
xor edx, dword [r8 - 4]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
and ecx, 0x9908b0df
xor ecx, dword [r8 + 0x630]
shr edx, 1
xor ecx, edx
mov dword [r8 + 0x9bc], ecx
lea r8, [r8 + 4]
sub r9, 1
jne 0x1800509d0
mov ebx, dword [rsp + 0x30]
jmp 0x180050b09
cmp ebx, 0x4e0
jb 0x180050b09
mov r8, r12
lea r9, [rbp + 0x8f4]
lea r10, [rbp + 0xf28]
lea r11, [rsp + 0x34]
nop dword [rax]
nop dword [rax + rax]
mov edx, dword [r9 + r8*4]
xor edx, dword [rbp + r8*4 + 0x8f8]
btr edx, 0x1f
xor edx, dword [r9 + r8*4]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
and ecx, 0x9908b0df
xor ecx, dword [r10 + r8*4]
shr edx, 1
xor ecx, edx
mov dword [r11 + r8*4], ecx
inc r8
cmp r8, 0xe3
jb 0x180050a40
mov r8d, 0xe3
lea r9, [rbp + 0x8f8]
lea r10, [rsp + 0x34]
nop dword [rax]
mov eax, dword [rbp + r8*4 + 0x8f4]
mov edx, eax
xor edx, dword [r9 + r8*4]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
and ecx, 0x9908b0df
xor ecx, dword [rbp + r8*4 - 0x458]
shr edx, 1
xor ecx, edx
mov dword [r10 + r8*4], ecx
inc r8
cmp r8, 0x26f
jb 0x180050a90
mov edx, dword [rbp + 0x12b0]
and edx, 0x80000000
mov eax, dword [rsp + 0x34]
btr eax, 0x1f
or edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
and ecx, 0x9908b0df
shr edx, 1
xor ecx, edx
xor ecx, dword [rbp + 0x564]
mov dword [rbp + 0x8f0], ecx
mov ebx, r12d
mov dword [rsp + 0x30], ebx
mov eax, ebx
mov edx, dword [rsp + rax*4 + 0x34]
inc ebx
mov dword [rsp + 0x30], ebx
mov eax, edx
shr eax, 0xb
and eax, dword [rbp + 0x12b4]
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov ecx, edx
shr ecx, 0x12
xor ecx, edx
jmp 0x180050b8c
lea ebx, [r15 + 1]
lea rcx, [rsp + 0x30]
call fcn.1800545f0
mov edi, ebx
mov ecx, eax
imul rcx, rdi
cmp ecx, ebx
jae 0x180050b84
mov eax, ebx
neg eax
xor edx, edx
div ebx
mov ebx, edx
cmp ecx, edx
jae 0x180050b84
nop dword [rax + rax]
lea rcx, [rsp + 0x30]
call fcn.1800545f0
mov ecx, eax
imul rcx, rdi
cmp ecx, ebx
jb 0x180050b70
shr rcx, 0x20
mov ebx, dword [rsp + 0x30]
mov rdx, r14
cmp qword [r14 + 0x18], 0xf
jbe 0x180050b99
mov rdx, qword [r14]
movsxd rax, ecx
movzx r9d, byte [rax + rdx]
mov rcx, qword [rsi + 0x10]
mov rdx, qword [rsi + 0x18]
cmp rcx, rdx
jae 0x180050bcd
lea rax, [rcx + 1]
mov qword [rsi + 0x10], rax
mov rax, rsi
cmp rdx, 0xf
jbe 0x180050bc2
mov rax, qword [rsi]
mov byte [rax + rcx], r9b
mov byte [rax + rcx + 1], 0
jmp 0x180050bd5
mov rcx, rsi
call fcn.180054480
cmp qword [rsi + 0x10], 8
jb 0x1800509b0
mov rax, rsi
mov rcx, qword [rbp + 0x12c0]
xor rcx, rsp
call fcn.1800589c0
lea r11, [rsp + 0x13d0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret