Function at 0x14004a090
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov qword [rbp - 0x50], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov r12, r8
mov r13, rdx
mov r8, rcx
cmp byte [r12 + 0x20], 2
jb 0x14004a301
mov rbx, qword [rdx + 0x38]
mov rcx, qword [rdx + 0x40]
cmp rbx, rcx
je 0x14004a268
lea r15, [rbx + 0x10]
xor esi, esi
mov rax, qword [rbx + 8]
cmp rax, 0x10000
jae 0x14004a0fd
add rbx, 0x10
add r15, 0x10
jmp 0x14004a25f
lea rdx, [rax - 0x10000]
mov eax, dword [r12 + 0x58]
cmp rdx, rax
jae 0x14004a2c2
mov r14, qword [r12 + 0x60]
add r14, rdx
mov edx, dword [r14]
sub edx, 0x44657445
je 0x14004a1c1
sub edx, 0xe
je 0x14004a179
cmp edx, 0x2f03f31b
jne 0x14004a0f0
lea rdx, [r14 + 4]
mov rcx, r8
call fcn.140049908
mov rdi, qword [rax + 8]
mov r8d, dword [r14 + 0x34]
lea rdx, [r14 + 0x38]
mov rcx, rdi
call fcn.14000b668
test rax, rax
je 0x14004a283
sub rax, rdi
mov qword [r14 + 0x68], rax
mov edx, 0x68
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_SystemFunction036]
jmp 0x14004a237
lea rdx, [r14 + 0x18]
mov rcx, r8
call fcn.140049908
mov rdi, qword [rax + 8]
mov r8d, dword [r14 + 0x48]
lea rdx, [r14 + 0x4c]
mov rcx, rdi
call fcn.14000b668
mov qword [rsp + 0x28], r12
mov rdx, qword [r14 + 0x10]
mov qword [rsp + 0x20], rdx
mov r9, qword [r14 + 8]
lea r8, [r14 + 0x18]
mov rdx, rax
mov rcx, rdi
call fcn.14004952c
mov edx, 0x80
jmp 0x14004a22c
lea rdx, [r14 + 0x18]
mov rcx, r8
call fcn.140049908
mov rdi, qword [rax + 8]
lea rcx, [r14 + 0x48]
call fcn.1400049c0
xor eax, 0x66d29210
and qword [rbp + 0x58], 0
mov byte [rsp + 0x28], 1
and qword [rsp + 0x20], 0
lea r9, [rbp + 0x58]
mov edx, eax
mov rcx, rdi
call fcn.1400046bc
mov rdx, qword [rbp + 0x58]
xor ecx, ecx
test eax, eax
cmovs rdx, rcx
mov qword [rsp + 0x28], r12
mov rax, qword [r14 + 0x10]
mov qword [rsp + 0x20], rax
mov r9, qword [r14 + 8]
lea r8, [r14 + 0x18]
mov rcx, rdi
call fcn.14004952c
mov edx, 0x78
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_SystemFunction036]
xor esi, esi
lea rcx, [rbp + 0x50]
call fcn.140005954
mov r8, qword [r13 + 0x40]
sub r8, r15
mov rdx, r15
mov rcx, rbx
call fcn.1400600c0
add qword [r13 + 0x40], 0xfffffffffffffff0
mov rcx, qword [r13 + 0x40]
mov r8, qword [rbp + 0x40]
cmp rbx, rcx
jne 0x14004a0e4
mov rbx, qword [rsp + 0xc8]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rax, vtable.std::exception.0
mov qword [rbp - 0x48], rax
xor eax, eax
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rax
lea rax, method.std::bad_alloc.virtual_0
mov qword [rbp - 0x48], rax
mov dword [rbp - 0x30], 0xd0001416
mov dword [rbp - 0x2c], 6
lea rdx, [0x14008f100]
lea rcx, [rbp - 0x48]
call sub.msvcrt.dll__CxxThrowException
int3
lea rax, vtable.std::exception.0
mov qword [rbp - 0x28], rax
xor eax, eax
mov qword [rbp - 0x20], rax
mov qword [rbp - 0x18], rax
lea rax, method.std::bad_alloc.virtual_0
mov qword [rbp - 0x28], rax
mov dword [rbp - 0x10], 0xd0001416
mov dword [rbp - 0xc], 0x84
lea rdx, [0x14008f100]
lea rcx, [rbp - 0x28]
call sub.msvcrt.dll__CxxThrowException
int3
lea rax, vtable.std::exception.0
mov qword [rbp - 0x48], rax
xor eax, eax
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x38], rax
lea rax, method.std::bad_alloc.virtual_0
mov qword [rbp - 0x48], rax
mov dword [rbp - 0x30], 0xd0001416
mov dword [rbp - 0x2c], 0x84
lea rdx, [0x14008f100]
lea rcx, [rbp - 0x48]
call sub.msvcrt.dll__CxxThrowException
int3