Function at 0x140040d40
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
lea rbp, [rsp - 0x12e0]
mov eax, 0x13e0
call fcn.1400b7920
sub rsp, rax
mov rax, qword [0x140480c38]
xor rax, rsp
mov qword [rbp + 0x12d0], rax
movzx esi, dl
mov dword [rsp + 0x38], 0
mov rdi, rcx
call sub.MSVCP140.dll__Query_perf_frequency
mov rbx, rax
call sub.MSVCP140.dll__Query_perf_counter
cmp rbx, 0x989680
jne 0x140040da0
imul rax, rax, 0x64
jmp 0x140040dbe
cqo
idiv rbx
mov rcx, rax
imul rax, rdx, 0x3b9aca00
imul rcx, rcx, 0x3b9aca00
cqo
idiv rbx
add rax, rcx
mov rdx, rax
mov dword [rsp + 0x44], eax
mov eax, 1
mov dword [rbp + 0x12c4], 0xffffffff
nop dword [rax]
nop dword [rax + rax]
mov ecx, edx
shr ecx, 0x1e
xor ecx, edx
imul edx, ecx, 0x6c078965
add edx, eax
mov dword [rsp + rax*4 + 0x44], edx
inc rax
cmp rax, 0x270
jb 0x140040de0
mov rbx, qword [rdi + 0x10]
lea r9, [rsp + 0x38]
mov dword [rsp + 0x40], 0x270
mov r8d, 4
mov rcx, rbx
movsxd rdx, dword [rbx + 0x3c]
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1400410a3
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
lea rcx, [rsp + 0x20]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0xffffffff
call fcn.140015f50
mov word [rbx + 2], ax
lea rcx, [rsp + 0x20]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0xffffffff
call fcn.140015f50
mov word [rbx + 8], ax
lea rcx, [rsp + 0x20]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0xffffffff
call fcn.140015f50
mov word [rbx + 6], ax
lea rcx, [rsp + 0x20]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0xffffffff
call fcn.140015f50
mov word [rbx + 0x16], ax
lea rcx, [rsp + 0x20]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0xffffffff
call fcn.140015f50
mov word [rbx + 0x12], ax
lea rcx, [rsp + 0x20]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0xffffffff
call fcn.140015f50
mov word [rbx + 0x14], ax
lea rcx, [rsp + 0x20]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0xffffffff
call fcn.140015f50
mov word [rbx + 0x18], ax
lea rcx, [rsp + 0x20]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0xffffffff
call fcn.140015f50
mov word [rbx + 0xc], ax
lea rcx, [rsp + 0x20]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0xffffffff
call fcn.140015f50
mov word [rbx + 0xa], ax
lea rcx, [rsp + 0x20]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0xffffffff
call fcn.140015f50
mov word [rbx + 0x24], ax
lea rcx, [rsp + 0x20]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0xffffffff
call fcn.140015f50
mov word [rbx + 0x26], ax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
mov dword [rsp + 0x30], 0xffffffff
lea rcx, [rsp + 0x20]
call fcn.140015f50
mov word [rbx + 0x1a], ax
lea rcx, [rsp + 0x20]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0xffffffff
call fcn.140015f50
mov word [rbx + 0x10], ax
lea rcx, [rsp + 0x20]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], reloc.WLDAP32.dll_Ordinal_32
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x30], 0xffffffff
call fcn.140015f50
mov word [rbx + 0xe], ax
test sil, sil
je 0x140041084
movsxd r8, dword [rbx + 0x3c]
xor edx, edx
mov rcx, qword [rdi + 0x10]
sub r8, 0x40
add rcx, 0x40
call sub.VCRUNTIME140.dll_memset
movsxd rdx, dword [rbx + 0x3c]
lea r9, [rsp + 0x38]
mov rcx, qword [rdi + 0x10]
mov r8d, 2
call qword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x1400410cb
mov al, 1
mov rcx, qword [rbp + 0x12d0]
xor rcx, rsp
call fcn.1400b7590
lea r11, [rsp + 0x13e0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
lea rcx, [rsp + 0x20]
call fcn.140007ad0
lea rdx, [0x140461cb8]
lea rcx, [rsp + 0x20]
call sub.VCRUNTIME140.dll__CxxThrowException
int3