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

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x1340]
mov eax, 0x1440
call fcn.14008ffe0
sub rsp, rax
mov rax, qword [0x1400be080]
xor rax, rsp
mov qword [rbp + 0x1330], rax
mov r14, rcx
mov qword [rsp + 0x38], rcx
xor r15d, r15d
xorps xmm0, xmm0
movups xmmword [rbp - 0x80], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x70], xmm1
lea r8d, [r15 + 0x3d]
lea rdx, [0x1400a6ab0]
lea rcx, [rbp - 0x80]
call fcn.140018730
nop
xorps xmm0, xmm0
movups xmmword [rsp + 0x60], xmm0
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], 7
mov word [rsp + 0x60], r15w
lea rdx, [rbp - 0x80]
cmp qword [rbp - 0x68], 8
cmovae rdx, qword [rbp - 0x80]
mov rax, qword [rbp - 0x70]
lea rsi, [rdx + rax*2]
lea rbx, [rbp - 0x80]
cmovae rbx, qword [rbp - 0x80]
movups xmmword [rsp + 0x40], xmm0
mov edi, reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x58], rdi
cmp rbx, rsi
jne 0x1400043e7
mov qword [rsp + 0x50], r15
mov byte [rsp + 0x40], r15b
jmp 0x1400044e7
mov rax, rsi
sub rax, rbx
sar rax, 1
mov rdx, r15
mov qword [rsp + 0x50], rdx
movabs rcx, 0x7fffffffffffffff
cmp rax, rcx
ja 0x14000478f
cmp rax, 0x10
jb 0x1400044a0
mov rdi, rax
or rdi, 0xf
cmp rdi, rcx
jbe 0x140004426
mov rdi, rcx
jmp 0x140004432
mov eax, reloc.WLDAP32.dll_Ordinal_22
cmp rdi, rax
cmovb rdi, rax
mov rcx, rdi
add rcx, 1
mov rax, 0xffffffffffffffff
cmovb rcx, rax
cmp rcx, 0x1000
jb 0x140004481
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x140004789
mov rcx, rax
call fcn.14008f728
mov rcx, rax
test rax, rax
je 0x140004678
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
mov rdx, qword [rsp + 0x50]
jmp 0x140004495
test rcx, rcx
je 0x140004492
call fcn.14008f728
mov rdx, qword [rsp + 0x50]
jmp 0x140004495
mov rax, r15
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x58], rdi
nop
lea rcx, [rsp + 0x40]
cmp rdi, 0x10
cmovae rcx, qword [rsp + 0x40]
movzx eax, byte [rbx]
mov byte [rdx + rcx], al
mov rdx, qword [rsp + 0x50]
inc rdx
mov qword [rsp + 0x50], rdx
add rbx, 2
cmp rbx, rsi
je 0x1400044d2
mov rdi, qword [rsp + 0x58]
jmp 0x1400044a0
lea rax, [rsp + 0x40]
cmp qword [rsp + 0x58], 0x10
cmovae rax, qword [rsp + 0x40]
mov byte [rdx + rax], 0
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov edx, eax
mov dword [rbp + 0x1324], 0xffffffff
mov dword [rbp - 0x5c], eax
mov ecx, 1
mov eax, edx
shr eax, 0x1e
xor eax, edx
imul edx, eax, 0x6c078965
add edx, ecx
mov dword [rbp + rcx*4 - 0x5c], edx
inc rcx
cmp rcx, 0x270
jb 0x140004501
mov dword [rbp - 0x60], 0x270
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0x10
cmovae rcx, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x50]
add rdx, rcx
lea rcx, [rsp + 0x40]
cmp qword [rsp + 0x58], 0x10
cmovae rcx, qword [rsp + 0x40]
lea r8, [rbp - 0x60]
call fcn.140017780
lea r8, [rsp + 0x40]
cmp qword [rsp + 0x58], 0x10
cmovae r8, qword [rsp + 0x40]
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
mov r9d, dword [rsp + 0x50]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rbx, eax
mov r9, qword [rsp + 0x70]
cmp rbx, r9
ja 0x1400045b1
lea rax, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
cmovae rax, qword [rsp + 0x60]
mov qword [rsp + 0x70], rbx
mov word [rax + rbx*2], r15w
jmp 0x140004606
mov rdx, rbx
sub rdx, r9
mov rdi, qword [rsp + 0x78]
mov rax, rdi
sub rax, r9
cmp rdx, rax
ja 0x1400045f9
mov qword [rsp + 0x70], rbx
lea r8, [rsp + 0x60]
cmp rdi, 8
cmovae r8, qword [rsp + 0x60]
lea rdi, [r8 + r9*2]
test rdx, rdx
je 0x1400045ee
movzx eax, r15w
mov rcx, rdx
rep stosw word [rdi], ax
lea rax, [r9 + rdx]
mov word [r8 + rax*2], r15w
jmp 0x140004606
mov r9, rdx
lea rcx, [rsp + 0x60]
call fcn.140018fd0
lea rax, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
cmovae rax, qword [rsp + 0x60]
lea r8, [rsp + 0x40]
cmp qword [rsp + 0x58], 0x10
cmovae r8, qword [rsp + 0x40]
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x50]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
nop
mov rdx, qword [rsp + 0x58]
cmp rdx, 0x10
jb 0x140004684
inc rdx
mov rcx, qword [rsp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14000467f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000467f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14008f720
xorps xmm0, xmm0
movups xmmword [r14], xmm0
mov qword [r14 + 0x10], r15
mov qword [r14 + 0x18], r15
mov r8d, reloc.OLEAUT32.dll_SafeArrayPutElement
cmp qword [rsp + 0x70], r8
cmovb r8, qword [rsp + 0x70]
lea rdx, [rsp + 0x60]
cmp qword [rsp + 0x78], 8
cmovae rdx, qword [rsp + 0x60]
mov rcx, r14
call fcn.140018730
nop
mov rdx, qword [rsp + 0x78]
cmp rdx, 8
jb 0x140004703
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400046fe
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400046fe
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14008f720
mov qword [rsp + 0x70], r15
mov qword [rsp + 0x78], 7
mov word [rsp + 0x60], r15w
mov rdx, qword [rbp - 0x68]
cmp rdx, 8
jb 0x14000475a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x80]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004755
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004755
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14008f720
mov rax, r14
mov rcx, qword [rbp + 0x1330]
xor rcx, rsp
call fcn.14008f700
lea r11, [rsp + 0x1440]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call fcn.140002fc0
nop
call fcn.140003060
int3