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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x50
mov rax, qword [0x180140080]
xor rax, rsp
mov qword [rsp + 0x48], rax
mov rdi, rdx
mov qword [rsp + 0x28], rdx
xor r15d, r15d
mov ecx, dword [0x180775fcc]
mov rax, qword gs:[0x58]
mov edx, 4
mov rsi, qword [rax + rcx*8]
add rsi, rdx
lea rbp, [0x180776620]
mov ebx, 0x270
mov eax, dword [rsi]
cmp dword [0x1807779bc], eax
jle 0x180059bb2
lea rcx, [0x1807779bc]
call fcn.180101158
cmp dword [0x1807779bc], 0xffffffff
jne 0x180059bb2
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov r8d, eax
mov dword [0x1807779a4], 0xffffffff
mov dword [0x180776624], eax
lea edx, [r15 + 1]
nop dword [rax]
nop word [rax + rax]
mov eax, r8d
shr eax, 0x1e
xor eax, r8d
imul r8d, eax, 0x6c078965
add r8d, edx
mov dword [rbp + rdx*4 + 4], r8d
inc rdx
cmp rdx, rbx
jb 0x180059b80
mov dword [0x180776620], ebx
lea rcx, [0x1807779bc]
call fcn.1801010ec
mov eax, dword [rsi]
cmp dword [0x1807779b8], eax
jle 0x180059bee
lea rcx, [0x1807779b8]
call fcn.180101158
cmp dword [0x1807779b8], 0xffffffff
jne 0x180059bee
mov dword [0x1807779b0], r15d
mov dword [0x1807779b4], 0x270f
lea rcx, [0x1807779b8]
call fcn.1801010ec
mov edx, dword [0x1807779b4]
mov ecx, dword [0x1807779b0]
lea eax, [rcx - 0x80000000]
mov r12d, 0x80000000
lea r14d, [rcx + r12]
cmp ecx, r12d
cmovae r14d, eax
lea eax, [rdx - 0x80000000]
lea ecx, [rdx + r12]
cmp edx, r12d
cmovae ecx, eax
sub ecx, r14d
cmp ecx, 0xffffffff
jne 0x180059d9a
mov eax, dword [0x180776620]
cmp eax, ebx
jne 0x180059c84
lea r8, [0x180776628]
nop
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 rbx, 1
jne 0x180059c40
mov eax, dword [0x180776620]
jmp 0x180059d5d
cmp eax, 0x4e0
jb 0x180059d5d
mov r9d, 0x9c4
mov r8d, 0xd50
nop dword [rax + 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
and ecx, 0x9908b0df
xor ecx, dword [r9 + rbp + 0x634]
shr edx, 1
xor ecx, edx
mov dword [r9 + rbp - 0x9c0], ecx
add r9, 4
cmp r9, r8
jb 0x180059ca0
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
and ecx, 0x9908b0df
shr edx, 1
xor ecx, edx
xor ecx, dword [r8 + rbp - 0xd4c]
mov dword [r8 + rbp - 0x9c0], ecx
add r8, 4
cmp r8, 0x1380
jb 0x180059ce0
mov edx, dword [0x1807779a0]
xor edx, dword [0x180776624]
btr edx, 0x1f
xor edx, dword [0x1807779a0]
mov eax, edx
and al, 1
neg al
sbb ecx, ecx
and ecx, 0x9908b0df
shr edx, 1
xor ecx, edx
xor ecx, dword [0x180776c54]
mov dword [0x180776fe0], ecx
mov eax, r15d
mov dword [0x180776620], eax
mov ecx, dword [rbp + rax*4 + 4]
inc eax
mov dword [0x180776620], eax
mov eax, ecx
shr eax, 0xb
and eax, dword [0x1807779a4]
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 0x180059dda
lea ebx, [rcx + 1]
mov rcx, rbp
call fcn.18005c490
mov esi, ebx
mov r8d, eax
imul r8, rsi
cmp r8d, ebx
jae 0x180059dd6
mov eax, ebx
neg eax
xor edx, edx
div ebx
mov ebx, edx
cmp r8d, edx
jae 0x180059dd6
mov rcx, rbp
call fcn.18005c490
mov r8d, eax
imul r8, rsi
cmp r8d, ebx
jb 0x180059dc2
shr r8, 0x20
lea ecx, [r14 + r8]
lea eax, [rcx - 0x80000000]
lea r8d, [rcx + r12]
cmp ecx, r12d
cmovae r8d, eax
lea r9, [rsp + 0x45]
test r8d, r8d
jns 0x180059e40
neg r8d
nop dword [rax]
dec r9
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dl
shl al, 2
lea ecx, [rax + rdx]
add cl, cl
sub r8b, cl
add r8b, 0x30
mov byte [r9], r8b
mov r8d, edx
test edx, edx
jne 0x180059e00
dec r9
mov byte [r9], reloc.WLDAP32.dll_Ordinal_45
jmp 0x180059e6a
dec r9
mov eax, 0xcccccccd
mul r8d
shr edx, 3
movzx eax, dl
shl al, 2
lea ecx, [rax + rdx]
add cl, cl
sub r8b, cl
add r8b, 0x30
mov byte [r9], r8b
mov r8d, edx
test edx, edx
jne 0x180059e40
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], r15
mov qword [rdi + 0x18], r15
lea rax, [rsp + 0x45]
cmp r9, rax
jne 0x180059e93
mov qword [rdi + 0x10], r15
mov qword [rdi + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rdi], 0
jmp 0x180059ea6
lea r8, [rsp + 0x45]
sub r8, r9
mov rdx, r9
mov rcx, rdi
call fcn.180006a60
mov rax, rdi
mov rcx, qword [rsp + 0x48]
xor rcx, rsp
call fcn.180100f50
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret