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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x568
movaps xmmword [rsp + 0x550], xmm6
mov rdi, rdx
mov rsi, rcx
mov r12, qword [rdx]
mov r15, qword [rdx + 0x20]
movzx eax, byte [0x1401bb110]
cmp al, 2
jne 0x14003bc43
mov rbx, qword [r15 + 0x10]
mov rax, qword [r15 + 0x18]
mov r14, rax
sub r14, rbx
jb 0x14003c47b
cmp rax, qword [r15 + 8]
ja 0x14003c47b
add rbx, qword [r15]
mov qword [rsp + 0x310], rbx
mov qword [rsp + 0x318], r14
lea rax, [rsp + 0x310]
mov qword [rsp + 0x200], rax
mov word [rsp + 0x208], 0x100
lea rcx, [rsp + 0xb0]
lea rax, [rsp + 0x200]
mov rdx, r8
mov r8, r9
mov r9, rax
call fcn.140034330
mov rax, qword [rsp + 0xb0]
test rax, rax
je 0x14003bbd3
mov qword [rsp + 0x40], r12
mov r12, qword [rsp + 0xb8]
lea r13, [0x140143c97]
mov ebp, 0xf
test r12, r12
je 0x14003bbe3
movzx ecx, byte [rax]
mov edx, ecx
not dl
test dl, 0x1f
je 0x14003bbe3
cmp r12, 1
je 0x14003bbe3
movzx edx, byte [rax + 1]
test dl, dl
js 0x14003bc0e
mov r8d, 2
lea r9, [rdx + r8]
cmp r9, r12
ja 0x14003bbe3
cmp cl, 0x30
jne 0x14003bbe3
mov qword [rsp + 0x48], r9
add rax, r8
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xb8], rdx
mov qword [rsp + 0xc0], 0
lea rcx, [rsp + 0xb0]
call fcn.14003a1d0
mov ebp, 0xf
lea r13, [0x140143c97]
test rax, rax
je 0x14003bbe3
cmp rdx, 1
jne 0x14003bbe3
cmp byte [rax], 1
jne 0x14003bc76
mov rax, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0xc0]
cmp rdx, rax
jae 0x14003bbe3
mov r9, qword [rsp + 0xb0]
movzx ecx, byte [r9 + rdx]
mov r8d, ecx
not r8b
test r8b, 0x1f
je 0x14003bbe3
lea r8, [rdx + 1]
cmp r8, rax
jae 0x14003bbe3
lea r10, [rdx + 2]
movzx r8d, byte [r9 + rdx + 1]
test r8b, r8b
js 0x14003bc87
mov rdx, r10
add rdx, r8
jb 0x14003bbe3
cmp rdx, rax
ja 0x14003bbe3
mov qword [rsp + 0xc0], rdx
cmp cl, 4
jne 0x14003bbe3
mov qword [rsp + 0xa8], r10
mov qword [rsp + 0x58], r8
cmp rdx, rax
mov qword [rsp + 0x50], r9
jae 0x14003bb4f
cmp byte [r9 + rdx], 0xa0
jne 0x14003bb4f
lea rcx, [rdx + 1]
cmp rcx, rax
jae 0x14003c20a
lea rcx, [rdx + 2]
movzx r8d, byte [r9 + rdx + 1]
test r8b, r8b
js 0x14003c11d
mov rdx, rcx
add rdx, r8
jb 0x14003c20a
cmp rdx, rax
ja 0x14003c20a
mov qword [rsp + 0xc0], rdx
mov rax, qword [r15 + 0x20]
sub r14, rax
jb 0x14003c47b
mov ebp, 0xe
lea r13, [0x1401437ad]
cmp r8, r14
jne 0x14003bbe3
add rcx, qword [rsp + 0x50]
add rbx, rax
mov rdx, rbx
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x14003bbe3
lea rcx, [rsp + 0xb0]
call fcn.14003a0a0
lea r13, [0x140143c97]
mov ebp, 0xf
test rax, rax
je 0x14003bbe3
mov rcx, qword [rsp + 0xc0]
lea r13, [0x140143c97]
cmp rcx, qword [rsp + 0xb8]
jne 0x14003bbe3
mov qword [rsp + 0xa0], rax
cmp qword [rsp + 0x48], r12
jne 0x14003bbe3
mov rax, qword [rsp + 0x40]
mov r15, qword [rsp + 0x58]
cmp qword [rax + 0x20], r15
jne 0x14003bbc5
mov rbx, rdx
mov rcx, qword [rsp + 0x50]
add rcx, qword [rsp + 0xa8]
mov r14, rcx
mov rdx, r15
call qword [rax]
test al, al
je 0x14003bd04
lea r13, [0x140143ca6]
mov ebp, 0x10
jmp 0x14003bbe3
mov r13, qword [rsp + 0xb8]
mov rbp, qword [rsp + 0xc0]
mov qword [rsi + 8], r13
mov qword [rsi + 0x10], rbp
mov qword [rsi], 0
movaps xmm6, xmmword [rsp + 0x550]
add rsp, 0x568
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp rdx, 0x81
je 0x14003bc59
cmp edx, 0x82
jne 0x14003bbe3
cmp r12, 4
jb 0x14003bbe3
movzx edx, word [rax + 2]
rol dx, 8
movzx edx, dx
cmp edx, 0x100
jb 0x14003bbe3
mov r8d, 4
jmp 0x14003b9cf
mov rbx, r9
mov r14, r8
call fcn.1400d0810
mov r8, r14
mov r9, rbx
jmp 0x14003b907
cmp r12, 2
jbe 0x14003bbe3
movzx edx, byte [rax + 2]
test dl, dl
jns 0x14003bbe3
mov r8d, 3
jmp 0x14003b9cf
mov ebp, 0x13
lea r13, [0x14014379a]
jmp 0x14003bbe3
cmp r8, 0x81
je 0x14003bcd5
cmp r8d, 0x82
jne 0x14003bbe3
cmp r10, rax
jae 0x14003bbe3
lea r8, [rdx + 3]
cmp r8, rax
jae 0x14003bbe3
movzx r8d, word [r9 + rdx + 2]
rol r8w, 8
movzx r8d, r8w
cmp r8d, 0x100
jb 0x14003bbe3
add rdx, 4
jmp 0x14003bcf0
cmp r10, rax
jae 0x14003bbe3
movzx r8d, byte [r9 + r10]
test r8b, r8b
jns 0x14003bbe3
add rdx, 3
mov r10, rdx
mov rdx, r10
add rdx, r8
jae 0x14003baa0
jmp 0x14003bbe3
xorps xmm6, xmm6
movaps xmmword [rsp + 0xd0], xmm6
movaps xmmword [rsp + 0xc0], xmm6
movaps xmmword [rsp + 0xb0], xmm6
cmp r15d, 0x31
jae 0x14003c47b
lea rcx, [rsp + 0xb0]
mov rdx, r14
mov r8, qword [rsp + 0x58]
call sub.msvcrt.dll_memcpy
movaps xmm0, xmmword [rsp + 0xb0]
movaps xmm1, xmmword [rsp + 0xc0]
movaps xmm2, xmmword [rsp + 0xd0]
movaps xmmword [rsp + 0x210], xmm2
movups xmmword [rsp + 0x78], xmm1
movups xmmword [rsp + 0x88], xmm2
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x60], rax
movups xmmword [rsp + 0x68], xmm0
mov rdx, qword [rax + 0x18]
movups xmmword [rsp + 0x1e8], xmm6
movups xmmword [rsp + 0x1d8], xmm6
movups xmmword [rsp + 0x1c8], xmm6
movups xmmword [rsp + 0x1b8], xmm6
movups xmmword [rsp + 0x1a8], xmm6
movups xmmword [rsp + 0x198], xmm6
mov byte [rsp + 0x1f8], 0
mov qword [rsp + 0x190], rdx
cmp rdx, 0x61
ja 0x14003c47b
lea rcx, [rsp + 0x198]
lea r8, [rsp + 0x60]
mov rax, qword [rsp + 0x40]
call qword [rax + 0x10]
test al, al
jne 0x14003c1d2
lea rax, [rsp + 0x78]
movups xmm0, xmmword [rsp + 0x1f0]
movaps xmmword [rsp + 0x280], xmm0
movups xmm0, xmmword [rsp + 0x1e0]
movaps xmmword [rsp + 0x270], xmm0
movups xmm0, xmmword [rsp + 0x1d0]
movaps xmmword [rsp + 0x260], xmm0
movups xmm0, xmmword [rsp + 0x190]
movups xmm1, xmmword [rsp + 0x1a0]
movups xmm2, xmmword [rsp + 0x1b0]
movups xmm3, xmmword [rsp + 0x1c0]
movaps xmmword [rsp + 0x250], xmm3
movaps xmmword [rsp + 0x240], xmm2
movaps xmmword [rsp + 0x230], xmm1
movaps xmmword [rsp + 0x220], xmm0
mov r14, qword [rsp + 0x60]
mov r12, qword [rsp + 0x68]
mov r15, qword [rsp + 0x70]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movaps xmmword [rsp + 0x210], xmm1
movaps xmmword [rsp + 0x200], xmm0
lea rcx, [rsp + 0x430]
lea rdx, [rsp + 0x200]
mov r8d, 0x90
call sub.msvcrt.dll_memcpy
mov qword [rsp + 0x40], r14
test r14, r14
je 0x14003c1d2
lea r14, [rsp + 0x310]
lea rdx, [rsp + 0x430]
mov r8d, 0x90
mov rcx, r14
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0xb0], rax
mov qword [rsp + 0xb8], r12
mov qword [rsp + 0xc0], r15
lea rcx, [rsp + 0xc8]
mov r8d, 0x90
mov rdx, r14
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0xe8]
cmp rax, 0x62
jae 0x14003c47b
lea r13, str.InconsistentComponents0Q
mov ebp, 0x16
cmp rbx, rax
jne 0x14003bbe3
lea rdx, [rsp + 0xf0]
mov rcx, qword [rsp + 0xa0]
mov r8, rbx
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x14003bbe3
lea r14, [rsp + 0x4c0]
lea rdx, [rsp + 0x310]
mov r8d, 0x90
mov rcx, r14
call sub.msvcrt.dll_memcpy
lea rcx, [rsp + 0x3a0]
mov r8d, 0x90
mov rdx, r14
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x190], rax
mov qword [rsp + 0x198], r12
mov qword [rsp + 0x1a0], r15
movups xmm0, xmmword [rsp + 0x3a0]
movups xmm1, xmmword [rsp + 0x3b0]
movups xmmword [rsp + 0x1a8], xmm0
movups xmmword [rsp + 0x1b8], xmm1
mov rdx, qword [rax + 0x20]
cmp rdx, 0x31
jae 0x14003c47b
mov rax, qword [rdi + 0x10]
mov r9, qword [rax]
mov rax, qword [r9 + 0x18]
cmp rax, 6
ja 0x14003c47b
lea rcx, [rax*8]
cmp rcx, rdx
jne 0x14003c47b
lea r8, [rsp + 0x198]
sub r9, 0xffffffffffffff80
xorps xmm6, xmm6
movaps xmmword [rsp + 0xd0], xmm6
movaps xmmword [rsp + 0xc0], xmm6
movaps xmmword [rsp + 0xb0], xmm6
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0xb0]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
mov rcx, r8
xor r8d, r8d
call fcn.140039970
test al, al
jne 0x14003c47b
movaps xmm0, xmmword [rsp + 0xb0]
movaps xmm1, xmmword [rsp + 0xc0]
movaps xmm2, xmmword [rsp + 0xd0]
movaps xmmword [rsp + 0x300], xmm2
movaps xmmword [rsp + 0x2f0], xmm1
movaps xmmword [rsp + 0x2e0], xmm0
mov r8, qword [rdi + 8]
mov rax, qword [r8]
mov rax, qword [rax + 8]
movaps xmmword [rsp + 0xd0], xmm6
movaps xmmword [rsp + 0xc0], xmm6
movaps xmmword [rsp + 0xb0], xmm6
add r8, 0x10
lea rcx, [rsp + 0xb0]
lea rdx, [rsp + 0x2e0]
call rax
movaps xmm0, xmmword [rsp + 0xb0]
movaps xmm1, xmmword [rsp + 0xc0]
movaps xmm2, xmmword [rsp + 0xd0]
movaps xmmword [rsp + 0x80], xmm2
movaps xmmword [rsp + 0x70], xmm1
movaps xmmword [rsp + 0x60], xmm0
mov rax, qword [rdi]
mov r15, qword [rdi + 0x18]
movaps xmmword [rsp + 0x4f0], xmm6
movaps xmmword [rsp + 0x4e0], xmm6
movaps xmmword [rsp + 0x4d0], xmm6
movaps xmmword [rsp + 0x4c0], xmm6
mov rax, qword [rax + 0x20]
mov qword [rsp + 0x48], rax
cmp rax, 0x40
ja 0x14003c47b
cmp qword [rsp + 0x48], 0
je 0x14003c216
mov r13d, 0xffffffff
mov rbx, qword [rsp + 0x48]
jmp 0x14003c181
cmp r8, 0x81
je 0x14003c1e3
cmp r8d, 0x82
jne 0x14003c20a
cmp rcx, rax
jae 0x14003c20a
lea rcx, [rdx + 3]
cmp rcx, rax
jae 0x14003c20a
mov rcx, qword [rsp + 0x50]
movzx ecx, word [rcx + rdx + 2]
rol cx, 8
movzx r8d, cx
cmp r8d, 0x100
jb 0x14003c20a
add rdx, 4
jmp 0x14003c1fb
add r14, r12
sub rbx, r12
je 0x14003c216
cmp rbx, r13
mov r12d, 0xffffffff
cmovb r12, rbx
xor ecx, ecx
mov rdx, r14
mov r8d, r12d
mov r9d, 2
call sub.bcrypt.dll_BCryptGenRandom
cmp eax, 0xbfffffff
jbe 0x14003c175
mov ebp, eax
mov rcx, r14
mov edx, r12d
call sub.ADVAPI32.dll_SystemFunction036
test al, al
jne 0x14003c175
test ebp, 0x7fffffff
je 0x14003c216
lea rax, str.RNG_failed
mov ecx, 0xa
jmp 0x14003c47d
lea r13, [0x140143c88]
mov ebp, 0xf
jmp 0x14003bbe3
cmp rcx, rax
jae 0x14003c20a
mov r8, qword [rsp + 0x50]
movzx r8d, byte [r8 + rcx]
test r8b, r8b
jns 0x14003c20a
add rdx, 3
mov rcx, rdx
mov rdx, rcx
add rdx, r8
jae 0x14003bb04
lea r13, [0x140143c97]
jmp 0x14003bbe3
movups xmm0, xmmword [r15 + 0x30]
movups xmm1, xmmword [r15 + 0x40]
movups xmm2, xmmword [r15 + 0x50]
movups xmm3, xmmword [r15 + 0x60]
movups xmmword [rsp + 0x238], xmm3
movups xmmword [rsp + 0x228], xmm2
movups xmmword [rsp + 0x218], xmm1
movups xmmword [rsp + 0x208], xmm0
xorps xmm0, xmm0
movups xmmword [rsp + 0x250], xmm0
movups xmmword [rsp + 0x260], xmm0
movups xmmword [rsp + 0x270], xmm0
movups xmmword [rsp + 0x280], xmm0
movups xmmword [rsp + 0x290], xmm0
movups xmmword [rsp + 0x2a0], xmm0
movups xmmword [rsp + 0x2b0], xmm0
movups xmmword [rsp + 0x2c0], xmm0
mov qword [rsp + 0x200], r15
mov qword [rsp + 0x248], 0
mov qword [rsp + 0x2d0], 0
lea rcx, [rsp + 0x200]
lea rdx, [rsp + 0x4c0]
mov r8, qword [rsp + 0x48]
call fcn.14003cc30
mov rax, qword [rsp + 0x40]
mov r8, qword [rax + 0x20]
cmp r8, 0x31
jae 0x14003c47b
lea rbx, [rsp + 0x200]
mov rcx, rbx
lea rdx, [rsp + 0x198]
call fcn.14003cc30
lea rcx, [rsp + 0xb0]
mov r8d, 0xd8
mov rdx, rbx
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0xb0]
mov r9, qword [rax + 0x20]
movups xmm0, xmmword [rsp + 0x240]
movaps xmmword [rsp + 0x350], xmm0
movups xmm0, xmmword [rsp + 0x200]
movups xmm1, xmmword [rsp + 0x210]
movups xmm2, xmmword [rsp + 0x220]
movups xmm3, xmmword [rsp + 0x230]
movaps xmmword [rsp + 0x340], xmm3
movaps xmmword [rsp + 0x330], xmm2
movaps xmmword [rsp + 0x320], xmm1
movaps xmmword [rsp + 0x310], xmm0
cmp r9, 0x81
jae 0x14003c47b
lea r8, [rsp + 0x100]
mov rax, qword [rsp + 0x180]
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x430]
lea rdx, [rsp + 0x310]
call fcn.14003ceb0
mov rdx, qword [rsp + 0x430]
mov rax, qword [rsp + 0x438]
mov rcx, qword [rsp + 0x440]
test rdx, rdx
je 0x14003c47d
movups xmm0, xmmword [rsp + 0x448]
movups xmm1, xmmword [rsp + 0x458]
movups xmm2, xmmword [rsp + 0x468]
movups xmmword [rsi + 0x38], xmm2
movups xmmword [rsi + 0x28], xmm1
movups xmmword [rsi + 0x18], xmm0
movups xmm0, xmmword [rsp + 0x420]
movups xmmword [rsi + 0xe0], xmm0
movups xmm0, xmmword [rsp + 0x410]
movups xmmword [rsi + 0xd0], xmm0
movups xmm0, xmmword [rsp + 0x400]
movups xmmword [rsi + 0xc0], xmm0
movups xmm0, xmmword [rsp + 0x3c0]
movups xmm1, xmmword [rsp + 0x3d0]
movups xmm2, xmmword [rsp + 0x3e0]
movups xmm3, xmmword [rsp + 0x3f0]
movups xmmword [rsi + 0xb0], xmm3
movups xmmword [rsi + 0xa0], xmm2
movups xmmword [rsi + 0x90], xmm1
movups xmmword [rsi + 0x80], xmm0
movaps xmm0, xmmword [rsp + 0x60]
movaps xmm1, xmmword [rsp + 0x70]
movaps xmm2, xmmword [rsp + 0x80]
movups xmmword [rsi + 0x60], xmm1
movups xmmword [rsi + 0x70], xmm2
movups xmmword [rsi + 0x50], xmm0
mov qword [rsi], rdx
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rcx
mov qword [rsi + 0x48], rdi
jmp 0x14003bbf2
ud2
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rcx
jmp 0x14003bbeb