Function at 0x140063020
Capabilities:
Generate random numbers via rtlgenrandom
Generate random numbers via winapi
Get thread local storage value
Set thread local storage value

Disassembly:
push rsi
push rdi
push rbx
sub rsp, 0xf0
mov esi, dword [0x1401420b8]
test esi, esi
je 0x1400632a3
dec esi
mov ecx, esi
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
ja 0x140063298
je 0x1400630e0
xorps xmm0, xmm0
movaps xmmword [rsp + 0x30], xmm0
movaps xmmword [rsp + 0x20], xmm0
lea rdx, [rsp + 0x20]
xor ecx, ecx
mov r8d, 0x20
mov r9d, 2
call sub.bcrypt.dll_BCryptGenRandom
cmp eax, 0xc0000000
jb 0x140063099
mov edi, eax
lea rbx, [rsp + 0x20]
mov rcx, rbx
mov edx, 0x20
call sub.advapi32.dll_SystemFunction036
test al, al
je 0x1400632ec
movaps xmm0, xmmword [rsp + 0x20]
movaps xmm1, xmmword [rsp + 0x30]
movaps xmmword [rsp + 0x50], xmm1
movaps xmmword [rsp + 0x40], xmm0
mov rax, qword [0x1401aa140]
test rax, rax
je 0x1400632c4
and eax, 0x4000
xor ecx, ecx
lea rdi, [rsp + 0x80]
or rax, rcx
je 0x1400630e7
lea rdx, [rsp + 0x40]
mov rcx, rdi
call fcn.140065660
jmp 0x14006310c
xor eax, eax
jmp 0x140063298
movaps xmm0, xmmword [rsp + 0x40]
movaps xmm1, xmmword [rsp + 0x50]
movaps xmmword [rsp + 0x80], xmm0
movaps xmmword [rsp + 0x90], xmm1
xorps xmm0, xmm0
movaps xmmword [rsp + 0xa0], xmm0
movaps xmm0, xmmword [rdi]
movaps xmm1, xmmword [rdi + 0x10]
movaps xmm2, xmmword [rdi + 0x20]
movaps xmmword [rsp + 0x40], xmm0
movaps xmmword [rsp + 0x50], xmm1
movaps xmmword [rsp + 0x60], xmm2
movups xmmword [rsp + 0xc0], xmm0
movups xmmword [rsp + 0xd0], xmm1
movups xmmword [rsp + 0xe0], xmm2
movzx eax, byte [0x1401aa178]
mov edx, 0x170
xor ecx, ecx
call fcn.14011ab20
test rax, rax
je 0x1400632ce
mov rdi, rax
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
movups xmm0, xmmword [rsp + 0xb8]
movups xmm1, xmmword [rsp + 0xc8]
movups xmm2, xmmword [rsp + 0xd8]
movups xmmword [rax + 0x118], xmm0
movups xmmword [rax + 0x128], xmm1
movups xmmword [rax + 0x138], xmm2
mov rax, qword [rsp + 0xe8]
mov qword [rdi + 0x148], rax
mov qword [rdi + 0x150], 0x10000
mov qword [rdi + 0x158], 0x10000
mov qword [rdi + 0x160], 0
movzx eax, byte [0x1401aa178]
mov edx, 0x10
xor ecx, ecx
call fcn.14011ab20
test rax, rax
je 0x1400632dd
mov qword [rax], rdi
mov dword [rax + 8], esi
mov ecx, esi
mov rbx, rax
call sub.kernel32.dll_TlsGetValue
mov rdi, rax
mov ecx, esi
mov rsi, rbx
mov rdx, rbx
call sub.kernel32.dll_TlsSetValue
test rdi, rdi
je 0x140063295
mov rax, qword [rdi]
dec qword [rax]
jne 0x140063283
mov rcx, qword [rdi]
call fcn.140063390
call sub.kernel32.dll_GetProcessHeap
mov rcx, rax
xor edx, edx
mov r8, rdi
call sub.kernel32.dll_HeapFree
mov rax, rsi
add rsp, 0xf0
pop rbx
pop rdi
pop rsi
ret
lea rcx, [0x1401420a0]
call fcn.1400edca0
mov esi, eax
mov ecx, esi
call sub.kernel32.dll_TlsGetValue
cmp rax, 1
jbe 0x14006304b
jmp 0x140063298
call fcn.14011b4a0
jmp 0x1400630bd
mov ecx, 0x10
mov edx, 0x170
call fcn.140006e69
mov ecx, 8
mov edx, 0x10
call fcn.140006e69
movzx eax, byte [0x1401aa178]
mov edx, 4
xor ecx, ecx
call fcn.14011ab20
test rax, rax
jne 0x140063313
mov ecx, 4
mov edx, 4
call fcn.140006e69
and edi, 0x7fffffff
mov dword [rax], edi
mov qword [rsp + 0x20], rax
lea rax, [0x140180c50]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x40], rbx
lea rax, [0x1400656c0]
mov qword [rsp + 0x48], rax
lea rax, str.could_not_initialize_thread_rng:
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], 1
mov qword [rsp + 0x90], 0
lea rax, [rsp + 0x40]
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x88], 1
lea rdx, str.C:UsersUser.cargo_registry_srcindex.crates.io_6f17d22bba15001f_rand_0.8.5_src_rngs_thread.rs
lea rcx, [rsp + 0x70]
call fcn.140009c00
int3