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

Disassembly:
mov rax, rsp
sub rsp, 0x78
mov qword [rax + 0x18], rbx
mov ebx, 1
mov qword [rax - 0x18], rdi
mov qword [rax - 0x30], r14
mov r14, rcx
mov qword [rax - 0x38], r15
mov ecx, 0xffffffff
lea rax, [rdx - 1]
mov r15, rdx
mov edi, ecx
cmp rcx, rax
jae 0x140066420
shl rdi, 0x20
inc ebx
or rdi, rcx
cmp rdi, rax
jb 0x140066412
mov r9d, ebx
mov qword [rsp + 0x58], r12
mov r8, r15
lea rdx, [rsp + 0x20]
mov rcx, r14
call fcn.1400672f0
mov r8, qword [rsp + 0x20]
mov rcx, r8
and rcx, rdi
cmp rcx, r15
jae 0x14006666d
xor edx, edx
mov rax, rdi
sub rax, r15
inc rax
div r15
mov r12, rdx
cmp rcx, rdx
jae 0x14006666d
mov qword [rsp + 0x70], rbp
mov qword [rsp + 0x68], rsi
mov qword [rsp + 0x50], r13
lea r13d, [rbx - 1]
nop dword [rax]
mov rcx, r14
call fcn.140067150
mov rsi, rax
mov ebp, r13d
test r13d, r13d
je 0x14006663d
nop word [rax + rax]
mov r10, qword [r14]
shl rsi, 0x20
mov ecx, dword [r10]
cmp ecx, 0x270
jne 0x140066503
lea rcx, [r10 + 8]
mov r9d, 0x270
nop dword [rax]
mov r8d, dword [rcx - 4]
xor r8d, dword [rcx]
lea rcx, [rcx + 4]
btr r8d, 0x1f
xor r8d, dword [rcx - 8]
mov eax, r8d
and al, 1
neg al
sbb edx, edx
shr r8d, 1
and edx, 0x9908b0df
xor edx, dword [rcx + 0x62c]
xor edx, r8d
mov dword [rcx + 0x9b8], edx
sub r9, 1
jne 0x1400664c0
mov ecx, dword [r10]
jmp 0x1400665ea
cmp ecx, 0x4e0
jb 0x1400665ea
lea r11, [r10 + 0x9c4]
mov ebx, 0xe3
mov eax, dword [r11]
nop
mov edx, eax
lea r8, [r11 + 4]
xor edx, dword [r8]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
mov eax, dword [r8]
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r11 + 0x634]
xor ecx, edx
mov dword [r11 - 0x9c0], ecx
lea r11, [r8]
sub rbx, 1
jne 0x140066520
lea r11, [r10 + 0xd50]
mov ebx, 0x18c
mov eax, dword [r11]
nop word [rax + rax]
mov edx, eax
lea r8, [r11 + 4]
xor edx, dword [r8]
btr edx, 0x1f
xor edx, eax
mov eax, edx
and al, 1
neg al
mov eax, dword [r8]
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, dword [r11 - 0xd4c]
xor ecx, edx
mov dword [r11 - 0x9c0], ecx
lea r11, [r8]
sub rbx, 1
jne 0x140066570
mov edx, dword [r10 + 0x1380]
xor edx, dword [r10 + 4]
btr edx, 0x1f
xor edx, dword [r10 + 0x1380]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
shr edx, 1
and ecx, 0x9908b0df
xor ecx, edx
xor ecx, dword [r10 + 0x634]
mov dword [r10 + 0x9c0], ecx
xor ecx, ecx
mov dword [r10], 0
mov eax, ecx
mov edx, dword [r10 + rax*4 + 4]
lea eax, [rcx + 1]
mov dword [r10], eax
mov ecx, edx
mov eax, dword [r10 + 0x1384]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and edx, 0xffffdf8c
shl edx, 0xf
mov ecx, edx
xor rcx, rax
mov rax, rcx
shr rax, 0x12
xor rax, rcx
or rsi, rax
mov eax, 0xffffffff
add ebp, eax
jne 0x1400664a0
mov rax, r15
mul rsi
mov r8, rax
mov qword [rsp + 0x20], rax
and rax, rdi
mov qword [rsp + 0x28], rdx
cmp rax, r12
jb 0x140066480
mov r13, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x68]
mov rbp, qword [rsp + 0x70]
jmp 0x140066672
mov rdx, qword [rsp + 0x28]
cmp dword [reloc.WS2_32.dll_accept], 2
mov r15, qword [rsp + 0x40]
mov r14, qword [rsp + 0x48]
mov r12, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x90]
jge 0x1400666ed
mov rax, rdi
movabs rcx, 0x5555555555555555
shr rax, 1
and rax, rcx
movabs rcx, 0x3333333333333333
sub rdi, rax
mov rax, rdi
and rdi, rcx
shr rax, 2
and rax, rcx
add rax, rdi
mov rcx, rax
shr rcx, 4
add rcx, rax
movabs rax, 0xf0f0f0f0f0f0f0f
and rcx, rax
movabs rax, 0x101010101010101
imul rcx, rax
shr rcx, 0x38
jmp 0x1400666f2
popcnt rcx, rdi
movaps xmm0, xmmword [rsp + 0x20]
mov rdi, qword [rsp + 0x60]
movdqa xmmword [rsp + 0x20], xmm0
mov eax, ecx
test cl, cl
je 0x14006672c
cmp al, 0x40
jb 0x14006671d
movzx ecx, al
and ecx, 0x3f
shr rdx, cl
mov rax, rdx
add rsp, 0x78
ret
movzx ecx, al
shrd r8, rdx, cl
mov rax, r8
add rsp, 0x78
ret
mov rax, qword [rsp + 0x20]
add rsp, 0x78
ret