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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r14
sub rsp, 0xa00
mov rax, qword [0x140fb3878]
xor rax, rsp
mov qword [rsp + 0x9f0], rax
mov rax, qword gs:[0x58]
mov rsi, rcx
mov ecx, dword [0x140fbbc40]
mov rbp, rdx
mov edx, 4
mov rdi, qword [rax + rcx*8]
add rdi, rdx
mov eax, dword [rdi]
cmp dword [0x140fb8630], eax
jg 0x1401b596c
mov eax, dword [rdi]
lea r14, [0x140000000]
cmp dword [0x140fb99c8], eax
jg 0x1401b5a1f
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
mov qword [rsi + 0x10], 0
mov qword [rsi + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rsi], 0
test rbp, rbp
je 0x1401b5926
lea rbx, [0x140fb8648]
movabs rdi, 0x842108421084211
nop
mov edx, dword [0x140fb8640]
cmp edx, 0x270
jne 0x1401b5797
mov rax, rbx
mov r9d, edx
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 r9, 1
jne 0x1401b5750
mov edx, dword [0x140fb8640]
jmp 0x1401b5878
cmp edx, 0x4e0
jb 0x1401b5878
xor r8d, r8d
mov eax, dword [r8 + r14 + 0xfb9004]
mov edx, eax
xor edx, dword [r8 + r14 + 0xfb9008]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + r14 + 0xfb9638]
xor ecx, edx
mov dword [r8 + r14 + 0xfb8644], ecx
add r8, 4
cmp r8, 0x38c
jb 0x1401b57a6
mov r8d, 0x38c
mov eax, dword [r8 + r14 + 0xfb9004]
mov edx, eax
xor edx, dword [r8 + r14 + 0xfb9008]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r8 + r14 + 0xfb82b8]
xor ecx, edx
mov dword [r8 + r14 + 0xfb8644], ecx
add r8, 4
cmp r8, 0x9bc
jb 0x1401b57f3
mov edx, dword [0x140fb99c0]
mov eax, dword [0x140fb8644]
and edx, 0x80000000
btr eax, 0x1f
or edx, eax
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, edx
xor ecx, dword [0x140fb8c74]
xor edx, edx
mov dword [0x140fb9000], ecx
mov dword [0x140fb8640], edx
mov eax, edx
inc edx
mov ecx, dword [r14 + rax*4 + 0xfb8644]
mov eax, ecx
shr eax, 0xb
and eax, dword [0x140fb99c4]
xor ecx, eax
mov dword [0x140fb8640], edx
mov eax, ecx
and eax, 0xff3a58ad
shl eax, 7
xor ecx, eax
mov eax, ecx
and ecx, 0xffffdf8c
shl ecx, 0xf
xor rcx, rax
mov rax, rdi
mov r8, rcx
shr r8, 0x12
xor r8, rcx
mov rcx, qword [rsi + 0x10]
mul r8
mov rax, r8
sub rax, rdx
shr rax, 1
add rax, rdx
mov rdx, qword [rsi + 0x18]
shr rax, 5
imul rax, rax, 0x3e
sub r8, rax
movzx r9d, byte [r8 + r14 + 0x398288]
cmp rcx, rdx
jae 0x1401b590d
lea rax, [rcx + 1]
mov qword [rsi + 0x10], rax
mov rax, rsi
cmp rdx, 0x10
jb 0x1401b5902
mov rax, qword [rsi]
mov byte [rax + rcx], r9b
mov byte [rax + rcx + 1], 0
jmp 0x1401b591c
xor r8d, r8d
mov rcx, rsi
lea edx, [r8 + 1]
call fcn.1401775f0
sub rbp, 1
jne 0x1401b5730
mov rax, rsi
mov rcx, qword [rsp + 0x9f0]
xor rcx, rsp
call fcn.140384b70
lea r11, [rsp + 0xa00]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
lea rcx, [0x140fb99c8]
mov dword [0x140fb8640], 0x270
call fcn.140384d3c
jmp 0x1401b56fb
lea rcx, [0x140fb8630]
call fcn.140384da8
cmp dword [0x140fb8630], 0xffffffff
jne 0x1401b56e6
call sub.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_
mov dword [rsp + 0x20], eax
call sub.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_
mov dword [rsp + 0x24], eax
call sub.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_
mov dword [rsp + 0x28], eax
call sub.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_
mov dword [rsp + 0x2c], eax
lea rbx, [rsp + 0x20]
xor eax, eax
xorps xmm0, xmm0
mov qword [0x140fb8628], rax
movdqu xmmword [0x140fb8618], xmm0
mov rdx, qword [0x140fb8620]
cmp rdx, rax
je 0x1401b59dc
mov eax, dword [rbx]
mov dword [rdx], eax
add qword [0x140fb8620], 4
jmp 0x1401b59eb
mov r8, rbx
lea rcx, [0x140fb8618]
call fcn.140174790
add rbx, 4
lea rax, [rsp + 0x30]
cmp rbx, rax
je 0x1401b5a02
mov rax, qword [0x140fb8628]
jmp 0x1401b59c2
lea rcx, [0x14038de50]
call fcn.14038509c
lea rcx, [0x140fb8630]
call fcn.140384d3c
jmp 0x1401b56e6
lea rcx, [0x140fb99c8]
call fcn.140384da8
cmp dword [0x140fb99c8], 0xffffffff
jne 0x1401b56fb
mov ecx, 0x1571
mov dword [0x140fb99c4], 0xffffffff
mov dword [0x140fb8644], ecx
mov edx, 1
nop dword [rax]
nop word [rax + rax]
mov eax, ecx
shr eax, 0x1e
xor eax, ecx
imul ecx, eax, 0x6c078965
add ecx, edx
mov dword [r14 + rdx*4 + 0xfb8644], ecx
inc rdx
cmp rdx, 0x270
jb 0x1401b5a60
lea r8, [rsp + 0x9f0]
mov dword [0x140fb8640], 0x270
lea rdx, [rsp + 0x30]
lea rcx, [0x140fb8618]
call fcn.14017a8a0
mov r8d, 0x9c0
lea rdx, [rsp + 0x30]
lea rcx, [0x140fb8644]
xor ebx, ebx
xor edi, edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + rdi*4 + 0x30]
mov ecx, eax
or ecx, ebx
mov ebx, eax
shr ebx, 0x1f
test rdi, rdi
cmovne ebx, ecx
inc rdi
cmp rdi, 0x270
jb 0x1401b5ac1
test ebx, ebx
jne 0x1401b5951
mov dword [0x140fb8644], 0x80000000
jmp 0x1401b5951