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

Disassembly:
push rbx
mov eax, 0x13f0
call fcn.1400045e0
sub rsp, rax
mov rax, qword [0x140008040]
xor rax, rsp
mov qword [rsp + 0x13e0], rax
lea rcx, [0x1400054f8]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov rbx, rax
test rax, rax
jne 0x14000158e
lea rdx, str.Failed_to_get_handle_to_ntdll.dll
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002ee0
lea rdx, [0x1400030c0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
jmp 0x140001737
lea rdx, str.ZwAllocateVirtualMemory
mov rcx, rbx
call fcn.140001310
lea rdx, str.ZwProtectVirtualMemory
mov qword [0x14000bc18], rax
mov rcx, rbx
call fcn.140001310
cmp qword [0x14000bc18], 0
mov qword [0x14000bc10], rax
je 0x140001769
test rax, rax
je 0x140001769
mov qword [rsp + 0x1408], rdi
call qword [sym.imp.MSVCP140.dll_unsigned_int___cdecl_std::_Random_device_void_]
mov dword [rsp + 0x13d4], 0xffffffff
mov edx, 1
mov dword [rsp + 0x54], eax
nop dword [rax]
nop word [rax + rax]
mov ecx, eax
shr ecx, 0x1e
xor ecx, eax
imul eax, ecx, 0x6c078965
add eax, edx
mov dword [rsp + rdx*4 + 0x54], eax
inc rdx
cmp rdx, 0x270
jb 0x140001600
lea rcx, [rsp + 0x50]
mov dword [rsp + 0x50], 0x270
call fcn.1400033d0
mov ecx, eax
imul rax, rcx, 0xb
cmp eax, 3
ja 0x140001655
nop dword [rax]
lea rcx, [rsp + 0x50]
call fcn.1400033d0
mov ecx, eax
imul rax, rcx, 0xb
cmp eax, 4
jb 0x140001640
mov rbx, qword [0x14000bc18]
shr rax, 0x20
mov qword [rsp + 0x30], 0
lea edi, [rax - 0x7ffffffb]
btc edi, 0x1f
lea ecx, [rdi + 1]
mov qword [rsp + 0x38], rcx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [rsp + 0x28], 4
lea r9, [rsp + 0x38]
mov rcx, rax
mov dword [rsp + 0x20], 0x3000
xor r8d, r8d
lea rdx, [rsp + 0x30]
call rbx
test eax, eax
jns 0x1400016b0
lea rdx, str.ZwAllocateVirtualMemory_failed
jmp 0x140001713
mov rbx, qword [rsp + 0x30]
mov qword [rsp + 0x1400], rsi
mov esi, edi
test edi, edi
je 0x1400016d0
mov r8d, esi
mov dl, 0x90
mov rcx, rbx
call sub.VCRUNTIME140.dll_memset
mov byte [rdi + rbx], 0xc3
mov rbx, qword [0x14000bc10]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r9d, 0x20
lea r8, [rsp + 0x38]
mov rcx, rax
lea rdx, [rsp + 0x30]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
call rbx
mov rsi, qword [rsp + 0x1400]
test eax, eax
jns 0x140001750
lea rdx, str.ZwProtectVirtualMemory_failed
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140002ee0
lea rdx, [0x1400030c0]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rdi, qword [rsp + 0x1408]
mov rcx, qword [rsp + 0x13e0]
xor rcx, rsp
call fcn.1400035a0
add rsp, 0x13f0
pop rbx
ret
call qword [rsp + 0x30]
mov rcx, qword [rsp + 0x30]
xor edx, edx
mov r8d, 0x8000
call qword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x14000172f
lea rdx, str.Failed_to_get_Zw_functions_addresses
jmp 0x14000156d