Function at 0x140049f64
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 0x14004a1d5
mov rbx, qword [rdx + 0x38]
mov rcx, qword [rdx + 0x40]
cmp rbx, rcx
je 0x14004a13c
lea r15, [rbx + 0x10]
xor esi, esi
mov rax, qword [rbx + 8]
cmp rax, 0x10000
jae 0x140049fd1
add rbx, 0x10
add r15, 0x10
jmp 0x14004a133
lea rdx, [rax - 0x10000]
mov eax, dword [r12 + 0x58]
cmp rdx, rax
jae 0x14004a196
mov r14, qword [r12 + 0x60]
add r14, rdx
mov edx, dword [r14]
sub edx, 0x44657445
je 0x14004a095
sub edx, 0xe
je 0x14004a04d
cmp edx, 0x2f03f31b
jne 0x140049fc4
lea rdx, [r14 + 4]
mov rcx, r8
call fcn.1400497f8
mov rdi, qword [rax + 8]
mov r8d, dword [r14 + 0x34]
lea rdx, [r14 + 0x38]
mov rcx, rdi
call fcn.14000b620
test rax, rax
je 0x14004a157
sub rax, rdi
mov qword [r14 + 0x68], rax
mov edx, 0x68
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_SystemFunction036]
jmp 0x14004a10b
lea rdx, [r14 + 0x18]
mov rcx, r8
call fcn.1400497f8
mov rdi, qword [rax + 8]
mov r8d, dword [r14 + 0x48]
lea rdx, [r14 + 0x4c]
mov rcx, rdi
call fcn.14000b620
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.14004941c
mov edx, 0x80
jmp 0x14004a100
lea rdx, [r14 + 0x18]
mov rcx, r8
call fcn.1400497f8
mov rdi, qword [rax + 8]
lea rcx, [r14 + 0x48]
call fcn.140004990
xor eax, 0x530cff3
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.14000468c
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.14004941c
mov edx, 0x78
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_SystemFunction036]
xor esi, esi
lea rcx, [rbp + 0x50]
call fcn.140005924
mov r8, qword [r13 + 0x40]
sub r8, r15
mov rdx, r15
mov rcx, rbx
call fcn.14005fdc0
add qword [r13 + 0x40], 0xfffffffffffffff0
mov rcx, qword [r13 + 0x40]
mov r8, qword [rbp + 0x40]
cmp rbx, rcx
jne 0x140049fb8
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, [0x14008ec40]
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, [0x14008ec40]
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, [0x14008ec40]
lea rcx, [rbp - 0x48]
call sub.msvcrt.dll__CxxThrowException
int3