Function at 0x14004a290
Capabilities:
Generate random numbers via rtlgenrandom
Generate random numbers via winapi

Disassembly:
push rsi
push rdi
sub rsp, 0xa8
mov eax, dword [0x140182314]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
movzx eax, byte [rax + 0x50]
test eax, eax
je 0x14004a2c3
cmp eax, 1
je 0x14004a2f0
xor eax, eax
jmp 0x14004a526
mov eax, dword [0x140182314]
mov rcx, qword gs:[0x58]
mov rsi, qword [rcx + rax*8]
lea rcx, [rsi + 0x48]
lea rdx, [0x14004a5e0]
call fcn.1400d4720
mov byte [rsi + 0x50], 1
xorps xmm0, xmm0
movaps xmmword [rsp + 0x90], xmm0
movaps xmmword [rsp + 0x80], xmm0
lea rdx, [rsp + 0x80]
xor ecx, ecx
mov r8d, 0x20
mov r9d, 2
call qword [sym.imp.bcrypt.dll_BCryptGenRandom]
cmp eax, 0xc0000000
jb 0x14004a34e
mov esi, eax
lea rdi, [rsp + 0x80]
mov rcx, rdi
mov edx, 0x20
call qword [sym.imp.advapi32.dll_SystemFunction036]
test al, al
jne 0x14004a34e
and esi, 0x7fffffff
jne 0x14004a53f
movaps xmm0, xmmword [rsp + 0x80]
movaps xmm1, xmmword [rsp + 0x90]
movaps xmmword [rsp + 0x30], xmm1
movaps xmmword [rsp + 0x20], xmm0
mov rax, qword [0x1401822d8]
test rax, rax
je 0x14004a39e
test eax, 0x4000
jne 0x14004a3aa
mov rsi, qword [rsp + 0x20]
movaps xmm0, xmmword [rsp + 0x20]
movaps xmm1, xmmword [rsp + 0x30]
movaps xmmword [rsp + 0x50], xmm0
movaps xmmword [rsp + 0x60], xmm1
xorps xmm0, xmm0
movaps xmmword [rsp + 0x70], xmm0
jmp 0x14004a3c5
call fcn.140110f30
test eax, 0x4000
je 0x14004a37b
lea r8, [0x14014ccd0]
lea rcx, [rsp + 0x50]
lea rdx, [rsp + 0x20]
call fcn.14004a610
mov rsi, qword [rsp + 0x50]
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x40], rax
movups xmm0, xmmword [rsp + 0x58]
movups xmm1, xmmword [rsp + 0x68]
movaps xmmword [rsp + 0x30], xmm1
movaps xmmword [rsp + 0x20], xmm0
movzx eax, byte [0x140182310]
mov edx, 0x170
xor ecx, ecx
call fcn.1400df910
test rax, rax
je 0x14004a530
mov qword [rax], 1
mov qword [rax + 8], 1
xorps xmm0, xmm0
movaps xmmword [rax + 0x10], xmm0
movaps xmmword [rax + 0x20], xmm0
movaps xmmword [rax + 0x30], xmm0
movaps xmmword [rax + 0x40], xmm0
movaps xmmword [rax + 0x50], xmm0
movaps xmmword [rax + 0x60], xmm0
movaps xmmword [rax + 0x70], xmm0
movaps xmmword [rax + 0x80], xmm0
movaps xmmword [rax + 0x90], xmm0
movaps xmmword [rax + 0xa0], xmm0
movaps xmmword [rax + 0xb0], xmm0
movaps xmmword [rax + 0xc0], xmm0
movaps xmmword [rax + 0xd0], xmm0
movaps xmmword [rax + 0xe0], xmm0
movaps xmmword [rax + 0xf0], xmm0
movaps xmmword [rax + 0x100], xmm0
mov qword [rax + 0x110], 0x40
mov qword [rax + 0x120], rsi
movaps xmm0, xmmword [rsp + 0x20]
movaps xmm1, xmmword [rsp + 0x30]
movups xmmword [rax + 0x128], xmm0
movups xmmword [rax + 0x138], xmm1
mov rcx, qword [rsp + 0x40]
mov qword [rax + 0x148], rcx
mov qword [rax + 0x150], 0x10000
mov qword [rax + 0x158], 0x10000
mov qword [rax + 0x160], 0
mov ecx, dword [0x140182314]
mov rdx, qword gs:[0x58]
mov rcx, qword [rdx + rcx*8]
mov r8, qword [rcx + 0x48]
mov qword [rcx + 0x48], rax
test r8, r8
je 0x14004a51f
dec qword [r8]
jne 0x14004a503
dec qword [r8 + 8]
jne 0x14004a503
mov rcx, qword [0x140182260]
xor edx, edx
call qword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [0x140182314]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
lea rax, [rax + 0x48]
jmp 0x14004a526
lea rax, [rcx + 0x48]
add rsp, 0xa8
pop rdi
pop rsi
ret
mov ecx, 0x10
mov edx, 0x170
call fcn.1401082c0
movzx eax, byte [0x140182310]
mov edx, 4
xor ecx, ecx
call fcn.1400df910
test rax, rax
jne 0x14004a566
mov ecx, 4
mov edx, 4
call fcn.1401082c0
mov dword [rax], esi
mov qword [rsp + 0x80], rax
lea rax, [0x14013d360]
mov qword [rsp + 0x88], rax
mov qword [rsp + 0x20], rdi
lea rax, [0x14004c8b0]
mov qword [rsp + 0x28], rax
lea rax, str.could_not_initialize_thread_rng:
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], 1
mov qword [rsp + 0x70], 0
lea rax, [rsp + 0x20]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], 1
lea rdx, str.C:UsersUser.cargo_registry_srcindex.crates.io_6f17d22bba15001f_rand_0.8.5_src_rngs_thread.rs
lea rcx, [rsp + 0x50]
call fcn.140108560
int3