Function at 0x14002b0a0
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, 0x518
movaps xmmword [rsp + 0x500], xmm6
mov rdi, rdx
mov rsi, rcx
mov r12, qword [rdx]
mov r14, qword [rdx + 0x20]
movzx eax, byte [0x140254140]
cmp al, 2
jne 0x14002b421
mov rbx, qword [r14 + 0x10]
mov rax, qword [r14 + 0x18]
mov r15, rax
sub r15, rbx
jb 0x14002bc8c
cmp rax, qword [r14 + 8]
ja 0x14002bc8c
add rbx, qword [r14]
mov qword [rsp + 0x350], rbx
mov qword [rsp + 0x358], r15
lea rax, [rsp + 0x350]
mov qword [rsp + 0x1e0], rax
mov byte [rsp + 0x1e8], 0
lea rcx, [rsp + 0x90]
lea rax, [rsp + 0x1e0]
mov rdx, r8
mov r8, r9
mov r9, rax
call fcn.140034390
mov rax, qword [rsp + 0x90]
test rax, rax
je 0x14002b3b1
mov qword [rsp + 0x40], r12
mov r12, qword [rsp + 0x98]
lea r13, str.InvalidEncodingWrongAlgorithmVersionNotSupportedInconsistentComponentsUnexpectedErrorInvalidComponentTooSmallPublicKeyIsMissingTooLarge
mov ebp, 0xf
test r12, r12
je 0x14002b3c1
cmp r12, 1
je 0x14002b3c1
movzx ecx, byte [rax]
mov edx, ecx
and dl, 0x1f
cmp dl, 0x1f
je 0x14002b3c1
movzx edx, byte [rax + 1]
test dl, dl
js 0x14002b3ec
mov r8d, 2
cmp cl, 0x30
jne 0x14002b3c1
lea rcx, [rdx + r8]
cmp r12, rcx
jb 0x14002b3c1
mov qword [rsp + 0x50], rcx
add rax, r8
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x98], rdx
mov qword [rsp + 0xa0], 0
lea rcx, [rsp + 0x90]
call fcn.140034ef0
mov ebp, 0xf
lea r10, str.InvalidEncodingWrongAlgorithmVersionNotSupportedInconsistentComponentsUnexpectedErrorInvalidComponentTooSmallPublicKeyIsMissingTooLarge
test rax, rax
je 0x14002b4b2
cmp rdx, 1
jne 0x14002b4b2
cmp byte [rax], 1
jne 0x14002b454
mov rax, qword [rsp + 0x98]
mov rdx, qword [rsp + 0xa0]
cmp rdx, rax
jae 0x14002b4b2
mov r9, qword [rsp + 0x90]
movzx ecx, byte [r9 + rdx]
mov r8d, ecx
not r8b
test r8b, 0x1f
je 0x14002b4b2
lea r8, [rdx + 1]
cmp r8, rax
jae 0x14002b4b2
lea r11, [rdx + 2]
movzx r8d, byte [r9 + rdx + 1]
test r8b, r8b
js 0x14002b465
add r8, r11
jb 0x14002b4b2
cmp rax, r8
jb 0x14002b4b2
mov qword [rsp + 0xa0], r8
cmp cl, 4
jne 0x14002b4b2
mov qword [rsp + 0x168], r11
cmp r8, rax
jae 0x14002b331
cmp byte [r9 + r8], 0xa0
jne 0x14002b331
lea rcx, [r8 + 1]
cmp rcx, rax
jae 0x14002b4b2
lea rcx, [r8 + 2]
mov rdx, r9
mov qword [rsp + 0x48], r8
movzx r8d, byte [r9 + r8 + 1]
test r8b, r8b
js 0x14002b8c7
add r8, rcx
jb 0x14002b9aa
cmp rax, r8
jb 0x14002b9aa
mov qword [rsp + 0xa0], r8
mov rax, qword [r14 + 0x20]
sub r15, rax
jb 0x14002bc8c
sub r8, rcx
mov ebp, 0xe
lea r13, [0x1401d2477]
cmp r8, r15
jne 0x14002b3c1
mov r14, rdx
add rcx, rdx
add rbx, rax
mov rdx, rbx
call sub.msvcrt.dll_memcmp
mov r9, r14
test eax, eax
lea r10, str.InvalidEncodingWrongAlgorithmVersionNotSupportedInconsistentComponentsUnexpectedErrorInvalidComponentTooSmallPublicKeyIsMissingTooLarge
mov r8, qword [rsp + 0x48]
jne 0x14002b3c1
lea rcx, [rsp + 0x90]
mov rbx, r9
mov r13, r10
mov r15, r8
call fcn.1400351e0
mov ebp, 0xf
test rax, rax
je 0x14002b3c1
mov r8, qword [rsp + 0xa0]
lea r13, str.InvalidEncodingWrongAlgorithmVersionNotSupportedInconsistentComponentsUnexpectedErrorInvalidComponentTooSmallPublicKeyIsMissingTooLarge
cmp r8, qword [rsp + 0x98]
jne 0x14002b3c1
cmp qword [rsp + 0x50], r12
jne 0x14002b3c1
mov r14, rbx
mov rbx, rax
mov r12, rdx
mov rdx, qword [rsp + 0x168]
sub r15, rdx
mov rax, qword [rsp + 0x40]
cmp qword [rax + 0x20], r15
jne 0x14002b3a3
add r14, rdx
mov rcx, r14
mov rdx, r15
call qword [rax]
test al, al
je 0x14002b4cc
lea r13, [0x1401d24bd]
mov ebp, 0x10
jmp 0x14002b3c1
mov r13, qword [rsp + 0x98]
mov rbp, qword [rsp + 0xa0]
mov qword [rsi + 8], r13
mov qword [rsi + 0x10], rbp
mov qword [rsi], 0
movaps xmm6, xmmword [rsp + 0x500]
add rsp, 0x518
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp rdx, 0x81
je 0x14002b437
cmp edx, 0x82
jne 0x14002b3c1
cmp r12, 4
jb 0x14002b3c1
movzx edx, word [rax + 2]
rol dx, 8
movzx edx, dx
cmp edx, 0x100
jb 0x14002b3c1
mov r8d, 4
jmp 0x14002b19e
mov rbx, r9
mov r15, r8
call fcn.14002f330
mov r8, r15
mov r9, rbx
jmp 0x14002b0d7
cmp r12, 2
jbe 0x14002b3c1
movzx edx, byte [rax + 2]
test dl, dl
jns 0x14002b3c1
mov r8d, 3
jmp 0x14002b19e
mov ebp, 0x13
lea r13, [0x1401d2485]
jmp 0x14002b3c1
cmp r8, 0x81
je 0x14002b4a3
cmp r8d, 0x82
jne 0x14002b4b2
cmp r11, rax
jae 0x14002b4b2
lea r8, [rdx + 3]
cmp r8, rax
jae 0x14002b4b2
movzx r8d, word [r9 + rdx + 2]
rol r8w, 8
movzx r8d, r8w
cmp r8d, 0x100
jb 0x14002b4b2
add rdx, 4
jmp 0x14002b4be
cmp r11, rax
jae 0x14002b4b2
movzx r8d, byte [r9 + r11]
test r8b, r8b
js 0x14002b4ba
mov r13, r10
jmp 0x14002b3c1
add rdx, 3
mov r11, rdx
add r8, r11
jae 0x14002b26c
jmp 0x14002b4b2
mov rcx, r15
xorps xmm6, xmm6
movaps xmmword [rsp + 0xb0], xmm6
movaps xmmword [rsp + 0xa0], xmm6
movaps xmmword [rsp + 0x90], xmm6
cmp r15, 0x31
jae 0x14002bc8c
lea rcx, [rsp + 0x90]
mov rdx, r14
mov r8, r15
call sub.msvcrt.dll_memcpy
movaps xmm0, xmmword [rsp + 0x90]
movaps xmm1, xmmword [rsp + 0xa0]
movaps xmm2, xmmword [rsp + 0xb0]
movaps xmmword [rsp + 0x1f0], xmm2
movups xmmword [rsp + 0x70], xmm1
movups xmmword [rsp + 0x80], xmm2
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
movups xmmword [rsp + 0x60], xmm0
mov rdx, qword [rax + 0x18]
movups xmmword [rsp + 0x1c8], xmm6
movups xmmword [rsp + 0x1b8], xmm6
movups xmmword [rsp + 0x1a8], xmm6
movups xmmword [rsp + 0x198], xmm6
movups xmmword [rsp + 0x188], xmm6
movups xmmword [rsp + 0x178], xmm6
mov byte [rsp + 0x1d8], 0
mov qword [rsp + 0x170], rdx
cmp rdx, 0x62
jae 0x14002bc8c
lea rcx, [rsp + 0x178]
lea r8, [rsp + 0x58]
mov rax, qword [rsp + 0x40]
call qword [rax + 0x10]
test al, al
jne 0x14002b986
lea rax, [rsp + 0x70]
movups xmm0, xmmword [rsp + 0x1d0]
movaps xmmword [rsp + 0x260], xmm0
movups xmm0, xmmword [rsp + 0x1c0]
movaps xmmword [rsp + 0x250], xmm0
movups xmm0, xmmword [rsp + 0x1b0]
movaps xmmword [rsp + 0x240], xmm0
movups xmm0, xmmword [rsp + 0x170]
movups xmm1, xmmword [rsp + 0x180]
movups xmm2, xmmword [rsp + 0x190]
movups xmm3, xmmword [rsp + 0x1a0]
movaps xmmword [rsp + 0x230], xmm3
movaps xmmword [rsp + 0x220], xmm2
movaps xmmword [rsp + 0x210], xmm1
movaps xmmword [rsp + 0x200], xmm0
mov r13, qword [rsp + 0x58]
mov r15, qword [rsp + 0x60]
mov r14, qword [rsp + 0x68]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movaps xmmword [rsp + 0x1f0], xmm1
movaps xmmword [rsp + 0x1e0], xmm0
lea rcx, [rsp + 0x350]
lea rdx, [rsp + 0x1e0]
mov r8d, 0x90
call sub.msvcrt.dll_memcpy
mov qword [rsp + 0x40], r13
test r13, r13
je 0x14002b986
lea rcx, [rsp + 0xa8]
lea rdx, [rsp + 0x350]
mov r8d, 0x90
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x98], r15
mov qword [rsp + 0xa0], r14
mov rax, qword [rsp + 0xc8]
cmp rax, 0x62
jae 0x14002bc8c
lea r13, [0x1401d2498]
mov ebp, 0x16
cmp r12, rax
jne 0x14002b3c1
lea rdx, [rsp + 0xd0]
mov rcx, rbx
mov r8, r12
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x14002b3c1
lea rbx, [rsp + 0x470]
mov r8d, 0x90
mov rcx, rbx
lea rdx, [rsp + 0xa8]
call sub.msvcrt.dll_memcpy
lea rcx, [rsp + 0x3e0]
mov r8d, 0x90
mov rdx, rbx
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x68], r14
movups xmm0, xmmword [rsp + 0x3e0]
movups xmm1, xmmword [rsp + 0x3f0]
movups xmmword [rsp + 0x70], xmm0
movups xmmword [rsp + 0x80], xmm1
mov rdx, qword [rax + 0x20]
cmp rdx, 0x31
jae 0x14002bc8c
mov rax, qword [rdi + 0x10]
mov r9, qword [rax]
mov rax, qword [r9 + 0x18]
cmp rax, 7
jae 0x14002bc8c
lea rcx, [rax*8]
cmp rcx, rdx
jne 0x14002bc8c
lea r8, [rsp + 0x60]
sub r9, 0xffffffffffffff80
xorps xmm6, xmm6
movaps xmmword [rsp + 0xb0], xmm6
movaps xmmword [rsp + 0xa0], xmm6
movaps xmmword [rsp + 0x90], xmm6
mov qword [rsp + 0x30], rax
lea rcx, [rsp + 0x90]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
mov rcx, r8
xor r8d, r8d
call fcn.140035eb0
test al, al
jne 0x14002bc8c
movaps xmm0, xmmword [rsp + 0x90]
movaps xmm1, xmmword [rsp + 0xa0]
movaps xmm2, xmmword [rsp + 0xb0]
movaps xmmword [rsp + 0x340], xmm2
movaps xmmword [rsp + 0x330], xmm1
movaps xmmword [rsp + 0x320], xmm0
mov r8, qword [rdi + 8]
mov rax, qword [r8]
mov rax, qword [rax + 8]
movaps xmmword [rsp + 0xb0], xmm6
movaps xmmword [rsp + 0xa0], xmm6
movaps xmmword [rsp + 0x90], xmm6
add r8, 0x10
lea rcx, [rsp + 0x90]
lea rdx, [rsp + 0x320]
call rax
movaps xmm0, xmmword [rsp + 0x90]
movaps xmm1, xmmword [rsp + 0xa0]
movaps xmm2, xmmword [rsp + 0xb0]
movaps xmmword [rsp + 0x2e0], xmm2
movaps xmmword [rsp + 0x2d0], xmm1
movaps xmmword [rsp + 0x2c0], xmm0
mov rax, qword [rdi]
mov r13, qword [rdi + 0x18]
movaps xmmword [rsp + 0x1a0], xmm6
movaps xmmword [rsp + 0x190], xmm6
movaps xmmword [rsp + 0x180], xmm6
movaps xmmword [rsp + 0x170], xmm6
mov rax, qword [rax + 0x20]
mov qword [rsp + 0x50], rax
cmp rax, 0x41
jae 0x14002bc8c
cmp qword [rsp + 0x50], 0
je 0x14002b9b6
lea r15, [rsp + 0x170]
mov r14d, 0xffffffff
mov rbx, qword [rsp + 0x50]
jmp 0x14002b935
cmp r8, 0x81
je 0x14002b997
cmp r8d, 0x82
jne 0x14002b9aa
cmp rcx, rax
jae 0x14002b9aa
mov rcx, qword [rsp + 0x48]
add rcx, 3
cmp rcx, rax
jae 0x14002b9aa
mov rcx, qword [rsp + 0x48]
movzx ecx, word [rdx + rcx + 2]
rol cx, 8
movzx r8d, cx
cmp r8d, 0x100
jb 0x14002b9aa
mov rcx, qword [rsp + 0x48]
add rcx, 4
jmp 0x14002b2ca
add r15, r12
sub rbx, r12
je 0x14002b9b6
cmp rbx, r14
mov r12d, 0xffffffff
cmovb r12, rbx
xor ecx, ecx
mov rdx, r15
mov r8d, r12d
mov r9d, 2
call sub.bcrypt.dll_BCryptGenRandom
cmp eax, 0xbfffffff
jbe 0x14002b929
mov ebp, eax
mov rcx, r15
mov edx, r12d
call sub.ADVAPI32.dll_SystemFunction036
test al, al
jne 0x14002b929
test ebp, 0x7fffffff
je 0x14002b9b6
mov eax, 0xa
lea rcx, str.RNG_failed
jmp 0x14002bc8e
lea r13, [0x1401d24ae]
mov ebp, 0xf
jmp 0x14002b3c1
cmp rcx, rax
jae 0x14002b9aa
movzx r8d, byte [rdx + rcx]
test r8b, r8b
js 0x14002bc7e
lea r13, str.InvalidEncodingWrongAlgorithmVersionNotSupportedInconsistentComponentsUnexpectedErrorInvalidComponentTooSmallPublicKeyIsMissingTooLarge
jmp 0x14002b3c1
movups xmm0, xmmword [r13 + 0x30]
movups xmm1, xmmword [r13 + 0x40]
movups xmm2, xmmword [r13 + 0x50]
movups xmm3, xmmword [r13 + 0x60]
movups xmmword [rsp + 0x218], xmm3
movups xmmword [rsp + 0x208], xmm2
movups xmmword [rsp + 0x1f8], xmm1
movups xmmword [rsp + 0x1e8], xmm0
xorps xmm0, xmm0
movups xmmword [rsp + 0x230], xmm0
movups xmmword [rsp + 0x240], 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
mov qword [rsp + 0x1e0], r13
mov qword [rsp + 0x228], 0
mov qword [rsp + 0x2b0], 0
lea rcx, [rsp + 0x1e0]
lea rdx, [rsp + 0x170]
mov r8, qword [rsp + 0x50]
call fcn.140036be0
mov rax, qword [rsp + 0x40]
mov r8, qword [rax + 0x20]
cmp r8, 0x31
jae 0x14002bc8c
lea rbx, [rsp + 0x1e0]
mov rcx, rbx
lea rdx, [rsp + 0x60]
call fcn.140036be0
lea rcx, [rsp + 0x90]
mov r8d, 0xd8
mov rdx, rbx
call sub.msvcrt.dll_memcpy
mov rax, qword [rsp + 0x90]
mov r9, qword [rax + 0x20]
movups xmm0, xmmword [rsp + 0x220]
movaps xmmword [rsp + 0x390], xmm0
movups xmm0, xmmword [rsp + 0x1e0]
movups xmm1, xmmword [rsp + 0x1f0]
movups xmm2, xmmword [rsp + 0x200]
movups xmm3, xmmword [rsp + 0x210]
movaps xmmword [rsp + 0x380], xmm3
movaps xmmword [rsp + 0x370], xmm2
movaps xmmword [rsp + 0x360], xmm1
movaps xmmword [rsp + 0x350], xmm0
cmp r9, 0x81
jae 0x14002bc8c
lea r8, [rsp + 0xe0]
mov rax, qword [rsp + 0x160]
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x470]
lea rdx, [rsp + 0x350]
call fcn.140036a40
mov rdx, qword [rsp + 0x470]
mov rcx, qword [rsp + 0x478]
mov rax, qword [rsp + 0x480]
movups xmm0, xmmword [rsp + 0x488]
movaps xmmword [rsp + 0x2f0], xmm0
movups xmm0, xmmword [rsp + 0x498]
movaps xmmword [rsp + 0x300], xmm0
movups xmm0, xmmword [rsp + 0x4a8]
movaps xmmword [rsp + 0x310], xmm0
test rdx, rdx
je 0x14002bc8e
movaps xmm0, xmmword [rsp + 0x2f0]
movaps xmm1, xmmword [rsp + 0x300]
movaps xmm2, xmmword [rsp + 0x310]
movaps xmmword [rsp + 0xb0], xmm2
movaps xmmword [rsp + 0xa0], xmm1
movaps xmmword [rsp + 0x90], xmm0
mov qword [rsi], rdx
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rax
movaps xmm0, xmmword [rsp + 0x90]
movaps xmm1, xmmword [rsp + 0xa0]
movaps xmm2, xmmword [rsp + 0xb0]
movups xmmword [rsi + 0x18], xmm0
movups xmmword [rsi + 0x28], xmm1
movups xmmword [rsi + 0x38], xmm2
mov qword [rsi + 0x48], rdi
movaps xmm0, xmmword [rsp + 0x2c0]
movaps xmm1, xmmword [rsp + 0x2d0]
movaps xmm2, xmmword [rsp + 0x2e0]
movups xmmword [rsi + 0x50], xmm0
movups xmmword [rsi + 0x60], xmm1
movups xmmword [rsi + 0x70], xmm2
movups xmm0, xmmword [rsp + 0x400]
movups xmm1, xmmword [rsp + 0x410]
movups xmm2, xmmword [rsp + 0x420]
movups xmm3, xmmword [rsp + 0x430]
movups xmmword [rsi + 0x80], xmm0
movups xmmword [rsi + 0x90], xmm1
movups xmmword [rsi + 0xa0], xmm2
movups xmmword [rsi + 0xb0], xmm3
movups xmm0, xmmword [rsp + 0x440]
movups xmmword [rsi + 0xc0], xmm0
movups xmm0, xmmword [rsp + 0x450]
movups xmmword [rsi + 0xd0], xmm0
movups xmm0, xmmword [rsp + 0x460]
movups xmmword [rsi + 0xe0], xmm0
jmp 0x14002b3d0
mov rcx, qword [rsp + 0x48]
add rcx, 3
jmp 0x14002b2ca
ud2
mov qword [rsi + 8], rcx
mov qword [rsi + 0x10], rax
jmp 0x14002b3c9