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

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x10], rdx
push rsi
push rdi
push r14
sub rsp, 0x9f0
mov rax, qword gs:[0x58]
mov rdi, rcx
mov esi, 8
add rsi, qword [rax]
mov eax, dword [rsi]
cmp dword [0x14051e5d8], eax
jg 0x1401574e4
mov eax, dword [rsi]
lea rbp, [0x140000000]
cmp dword [0x14051fa1c], eax
jg 0x1401575a2
xorps xmm0, xmm0
lea rsi, [0x14051e648]
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], 0
mov ebx, 0xa
mov qword [rdi + 0x18], reloc.WS2_32.dll_ntohs
movabs r14, 0x842108421084211
mov byte [rdi], 0
mov edx, dword [0x14051e640]
cmp edx, 0x270
jne 0x140157327
mov rax, rsi
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 0x1401572e0
mov edx, dword [0x14051e640]
jmp 0x140157408
cmp edx, 0x4e0
jb 0x140157408
xor r8d, r8d
mov eax, dword [r8 + rbp + 0x51f004]
mov edx, eax
xor edx, dword [r8 + rbp + 0x51f008]
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 + rbp + 0x51f638]
xor ecx, edx
mov dword [r8 + rbp + 0x51e644], ecx
add r8, 4
cmp r8, 0x38c
jb 0x140157336
mov r8d, 0x38c
mov eax, dword [r8 + rbp + 0x51f004]
mov edx, eax
xor edx, dword [r8 + rbp + 0x51f008]
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 + rbp + 0x51e2b8]
xor ecx, edx
mov dword [r8 + rbp + 0x51e644], ecx
add r8, 4
cmp r8, 0x9bc
jb 0x140157383
mov edx, dword [0x14051f9c0]
mov eax, dword [0x14051e644]
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 [0x14051ec74]
xor edx, edx
mov dword [0x14051f000], ecx
mov dword [0x14051e640], edx
mov eax, edx
inc edx
mov ecx, dword [rbp + rax*4 + 0x51e644]
mov eax, ecx
shr eax, 0xb
and eax, dword [0x14051f9c4]
xor ecx, eax
mov dword [0x14051e640], 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, r14
mov r8, rcx
shr r8, 0x12
xor r8, rcx
mov rcx, qword [rdi + 0x10]
mul r8
mov rax, r8
sub rax, rdx
shr rax, 1
add rax, rdx
mov rdx, qword [rdi + 0x18]
shr rax, 5
imul rax, rax, 0x3e
sub r8, rax
movzx r9d, byte [r8 + rbp + 0x493540]
cmp rcx, rdx
jae 0x14015749c
lea rax, [rcx + 1]
mov qword [rdi + 0x10], rax
mov rax, rdi
cmp rdx, 0xf
jbe 0x140157491
mov rax, qword [rdi]
mov byte [rax + rcx], r9b
mov byte [rax + rcx + 1], 0
jmp 0x1401574a4
mov rcx, rdi
call fcn.14013c630
sub rbx, 1
jne 0x1401572c0
lea r11, [rsp + 0x9f0]
mov rax, rdi
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rsi
ret
lea rcx, [0x14051fa1c]
mov dword [0x14051e640], 0x270
call fcn.1401c7f4c
jmp 0x140157291
lea rcx, [0x14051e5d8]
call fcn.1401c7fb8
cmp dword [0x14051e5d8], 0xffffffff
jne 0x14015727c
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov dword [rsp + 0x20], eax
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov dword [rsp + 0x24], eax
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov dword [rsp + 0x28], eax
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
xorps xmm0, xmm0
mov dword [rsp + 0x2c], eax
xor ecx, ecx
lea rbx, [rsp + 0x20]
movdqu xmmword [0x14051f9c8], xmm0
mov qword [0x14051f9d8], rcx
nop
mov rdx, qword [0x14051f9d0]
mov eax, dword [rbx]
mov dword [rsp + 0xa18], eax
cmp rdx, rcx
je 0x140157561
mov dword [rdx], eax
add qword [0x14051f9d0], 4
jmp 0x14015756e
lea r8, [rsp + 0xa18]
call fcn.140178a30
add rbx, 4
lea rax, [rsp + 0x30]
cmp rbx, rax
je 0x140157585
mov rcx, qword [0x14051f9d8]
jmp 0x140157540
lea rcx, [0x1403d8830]
call fcn.1401c8258
lea rcx, [0x14051e5d8]
call fcn.1401c7f4c
jmp 0x14015727c
lea rcx, [0x14051fa1c]
call fcn.1401c7fb8
cmp dword [0x14051fa1c], 0xffffffff
jne 0x140157291
mov edx, 0x1571
mov dword [0x14051f9c4], 0xffffffff
mov dword [0x14051e644], edx
mov ecx, 1
nop word [rax + rax]
mov eax, edx
shr eax, 0x1e
xor eax, edx
imul edx, eax, 0x6c078965
add edx, ecx
mov dword [rbp + rcx*4 + 0x51e644], edx
inc rcx
cmp rcx, 0x270
jb 0x1401575e0
lea r8, [rsp + 0x9f0]
mov dword [0x14051e640], 0x270
lea rdx, [rsp + 0x30]
call fcn.140176490
xor edx, edx
xor r8d, r8d
mov ecx, dword [rsp + r8*4 + 0x30]
mov eax, ecx
or eax, edx
mov dword [rbp + r8*4 + 0x51e644], ecx
mov edx, ecx
shr edx, 0x1f
test r8, r8
cmovne edx, eax
inc r8
cmp r8, 0x270
jb 0x140157623
test edx, edx
jne 0x1401574c9
mov dword [0x14051e644], 0x80000000
jmp 0x1401574c9