Function at 0x140039610
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 [0x1400564b8], 0
lea rbp, [0x14004f090]
mov qword [rsp + 0x40], rsi
mov ebx, 0x270
mov qword [rsp + 0x48], r14
mov esi, edx
mov r14d, ecx
jne 0x1400396c5
mov byte [0x1400564b8], 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 0x14003966c
imul rax, rax, 0x64
jmp 0x14003968a
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 [0x14004f094], 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 0x1400396a0
mov ecx, ebx
mov dword [0x14004f090], ebx
jmp 0x1400396cb
mov ecx, dword [0x14004f090]
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 0x14003987b
cmp ecx, ebx
jne 0x140039764
lea r8, [0x14004f098]
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 0x140039720
mov ecx, dword [0x14004f090]
jmp 0x14003983c
cmp ecx, 0x4e0
jb 0x14003983c
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 0x140039780
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 0x1400397c0
mov edx, dword [0x140050410]
xor edx, dword [0x14004f094]
btr edx, 0x1f
xor edx, dword [0x140050410]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, edx
xor ecx, dword [0x14004f6c4]
mov dword [0x14004fa50], ecx
xor ecx, ecx
mov dword [0x14004f090], ecx
mov eax, ecx
mov ecx, dword [rbp + rax*4 + 4]
inc eax
mov dword [0x14004f090], eax
mov eax, ecx
shr eax, 0xb
and eax, dword [0x140050414]
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 0x1400398bb
mov rcx, rbp
lea ebx, [rdx + 1]
call fcn.1400275e0
mov r8d, eax
mov edi, ebx
imul r8, rdi
cmp r8d, ebx
jae 0x1400398b7
mov eax, ebx
xor edx, edx
neg eax
div ebx
mov ebx, edx
cmp r8d, edx
jae 0x1400398b7
mov rcx, rbp
call fcn.1400275e0
mov r8d, eax
imul r8, rdi
cmp r8d, ebx
jb 0x1400398a3
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