Function at 0x55f310
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, 0x4a8
movaps xmmword [rsp + 0x490], xmm6
mov rdi, rdx
mov rsi, rcx
mov rbp, qword [rdx]
mov r12, qword [rdx + 0x20]
movzx eax, byte [0x0083c1b8]
cmp al, 2
jne 0x55f798
mov rbx, qword [r12 + 0x10]
mov rdx, qword [r12 + 0x18]
mov r14, rdx
sub r14, rbx
jb 0x55feac
mov rax, qword [r12 + 8]
cmp rdx, rax
ja 0x55febb
add rbx, qword [r12]
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x1f0], r8
mov qword [rsp + 0x1f8], r9
mov qword [rsp + 0x200], 0
lea rax, [rsp + 0x60]
mov qword [rsp + 0xa0], rax
mov byte [rsp + 0xa8], 0
lea rcx, [rsp + 0x110]
lea rdx, [rsp + 0x1f0]
lea r8, [rsp + 0xa0]
call sym.ring::io::der::nested::hd5df6f766dda9609
mov rax, qword [rsp + 0x110]
mov r13, qword [rsp + 0x118]
test rax, rax
je 0x55f75b
mov rcx, qword [rsp + 0x200]
lea r15, str.InvalidEncodingTooSmall_home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_limb.rs
cmp rcx, qword [rsp + 0x1f8]
jne 0x55f768
mov qword [rsp + 0x50], rbp
mov ebp, 0xf
test r13, r13
je 0x55f76d
movzx ecx, byte [rax]
mov edx, ecx
not dl
test dl, 0x1f
je 0x55f76d
cmp r13, 2
jb 0x55f76d
movzx edx, byte [rax + 1]
test dl, dl
js 0x55f7ae
mov r8d, 2
lea r9, [r8 + rdx]
cmp r9, r13
ja 0x55f76d
cmp cl, 0x30
jne 0x55f76d
mov qword [rsp + 0x40], r9
add rax, r8
mov qword [rsp + 0x110], rax
mov qword [rsp + 0x118], rdx
mov qword [rsp + 0x120], 0
lea rcx, [rsp + 0x110]
call sym.ring::io::der::nonnegative_integer::hf6e4f6f78e579065
mov ebp, 0xf
lea r15, str.InvalidEncodingTooSmall_home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_limb.rs
test rax, rax
je 0x55f76d
cmp rdx, 1
jne 0x55f76d
cmp byte [rax], 1
jne 0x55f800
mov rdx, qword [rsp + 0x120]
mov rax, qword [rsp + 0x118]
cmp rdx, rax
jae 0x55f76d
mov r9, qword [rsp + 0x110]
movzx ecx, byte [r9 + rdx]
mov r8d, ecx
not r8b
test r8b, 0x1f
je 0x55f76d
lea r8, [rdx + 1]
cmp r8, rax
jae 0x55f76d
lea r11, [rdx + 2]
movzx r8d, byte [r9 + rdx + 1]
test r8b, r8b
js 0x55f811
add r8, r11
jb 0x55f76d
cmp r8, rax
ja 0x55f76d
mov qword [rsp + 0x120], r8
cmp cl, 4
jne 0x55f76d
mov qword [rsp + 0x58], r11
cmp r8, rax
jae 0x55f5c9
cmp byte [r9 + r8], 0xa0
jne 0x55f5c9
lea rcx, [r8 + 1]
cmp rcx, rax
jae 0x55fc2a
lea rcx, [r8 + 2]
mov r10, r9
mov qword [rsp + 0x48], r8
movzx r8d, byte [r9 + r8 + 1]
test r8b, r8b
js 0x55f891
add r8, rcx
jb 0x55fc2a
cmp r8, rax
ja 0x55fc2a
mov qword [rsp + 0x120], r8
mov rax, qword [r12 + 0x20]
mov rdx, r14
sub rdx, rax
jb 0x55ff02
sub r8, rcx
mov ebp, 0xe
lea r15, str.WrongAlgorithmVersionNotSupportedInconsistentComponentsUnexpectedError
cmp r8, rdx
jne 0x55f76d
mov r14, r10
add rcx, r10
add rbx, rax
mov rdx, rbx
call sub.msvcrt.dll_memcmp
mov r9, r14
test eax, eax
mov r8, qword [rsp + 0x48]
jne 0x55f76d
lea rcx, [rsp + 0x110]
mov rbx, r9
mov r14, r8
call sym.ring::io::der::nested::h5c79d553fff8fcfb
lea r15, str.InvalidEncodingTooSmall_home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_limb.rs
mov ebp, 0xf
test rax, rax
je 0x55f76d
mov r8, qword [rsp + 0x120]
lea r15, str.InvalidEncodingTooSmall_home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_limb.rs
cmp r8, qword [rsp + 0x118]
mov r8, qword [rsp + 0x40]
jne 0x55f76d
cmp r8, r13
jne 0x55f76d
mov r9, r14
mov qword [rsp + 0x40], rax
mov r14, rdx
mov rdx, qword [rsp + 0x58]
sub r9, rdx
lea r15, str.InvalidComponentTooLarge
mov ebp, 0x10
mov rax, qword [rsp + 0x50]
cmp qword [rax + 0x20], r9
jne 0x55f76d
mov rcx, rbx
add rcx, rdx
mov rbx, rcx
mov r12, r9
mov rdx, r9
call qword [rax]
test al, al
jne 0x55f76d
xorps xmm6, xmm6
movaps xmmword [rsp + 0x130], xmm6
movaps xmmword [rsp + 0x120], xmm6
movaps xmmword [rsp + 0x110], xmm6
cmp r12, 0x31
jae 0x55feda
lea rcx, [rsp + 0x110]
mov rdx, rbx
mov r8, r12
call sym.memcpy
mov r12, qword [rsp + 0x110]
mov r13, qword [rsp + 0x118]
movaps xmm0, xmmword [rsp + 0x120]
movups xmmword [rsp + 0x78], xmm0
movaps xmm0, xmmword [rsp + 0x130]
movups xmmword [rsp + 0x88], xmm0
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x70], r13
mov rax, qword [rax + 0x18]
movups xmmword [rsp + 0xf8], xmm6
movups xmmword [rsp + 0xe8], xmm6
movups xmmword [rsp + 0xd8], xmm6
movups xmmword [rsp + 0xc8], xmm6
movups xmmword [rsp + 0xb8], xmm6
movups xmmword [rsp + 0xa8], xmm6
mov byte [rsp + 0x108], 0
mov qword [rsp + 0xa0], rax
cmp rax, 0x62
jae 0x55feee
lea rcx, [rsp + 0xa8]
lea rbx, [rsp + 0x60]
mov rdx, rax
mov r8, rbx
mov rax, qword [rsp + 0x50]
call qword [rax + 0x10]
test al, al
je 0x55f8f4
mov ebp, 0xf
lea r15, [0x007a0f47]
jmp 0x55f76d
mov rbp, qword [rsp + 0x120]
mov r15, r13
jmp 0x55f76d
mov ebp, 0xf
mov qword [rsi + 8], r15
mov qword [rsi + 0x10], rbp
mov qword [rsi], 0
movaps xmm6, xmmword [rsp + 0x490]
add rsp, 0x4a8
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rbx, r9
mov r14, r8
call sym._ZN4spin4once17Once_LT_T_C_R_GT_18try_call_once_slow17h41c288e9043557b3E.llvm.6565491696558394929
mov r8, r14
mov r9, rbx
jmp 0x55f347
cmp rdx, 0x81
je 0x55f7e3
cmp edx, 0x82
jne 0x55f76d
cmp r13, 4
jb 0x55f76d
movzx edx, word [rax + 2]
rol dx, 8
movzx edx, dx
cmp edx, 0x100
jb 0x55f76d
mov r8d, 4
jmp 0x55f43c
cmp r13, 2
jbe 0x55f76d
movzx edx, byte [rax + 2]
test dl, dl
jns 0x55f76d
mov r8d, 3
jmp 0x55f43c
mov ebp, 0x13
lea r15, [0x007a0f1e]
jmp 0x55f76d
cmp r8, 0x81
je 0x55f86e
cmp r8d, 0x82
jne 0x55f76d
cmp r11, rax
jae 0x55f76d
lea r8, [rdx + 3]
cmp r8, rax
jae 0x55f76d
mov r10, r9
movzx r8d, word [r9 + rdx + 2]
rol r8w, 8
movzx r9d, r8w
cmp r9d, 0x100
jb 0x55f76d
mov r8, r9
add rdx, 4
mov r11, rdx
mov r9, r10
jmp 0x55f501
cmp r11, rax
jae 0x55f76d
movzx r8d, byte [r9 + r11]
test r8b, r8b
jns 0x55f76d
add rdx, 3
mov r11, rdx
jmp 0x55f501
cmp r8, 0x81
je 0x55fc17
cmp r8d, 0x82
jne 0x55fc2a
cmp rcx, rax
jae 0x55fc2a
mov rcx, qword [rsp + 0x48]
add rcx, 3
cmp rcx, rax
jae 0x55fc2a
mov rcx, qword [rsp + 0x48]
movzx ecx, word [r10 + rcx + 2]
rol cx, 8
movzx r8d, cx
cmp r8d, 0x100
jb 0x55fc2a
mov rcx, qword [rsp + 0x48]
add rcx, 4
jmp 0x55f565
lea rax, [rsp + 0x78]
movups xmm0, xmmword [rsp + 0x100]
movaps xmmword [rsp + 0x270], xmm0
movups xmm0, xmmword [rsp + 0xf0]
movaps xmmword [rsp + 0x260], xmm0
movups xmm0, xmmword [rsp + 0xe0]
movaps xmmword [rsp + 0x250], xmm0
movups xmm0, xmmword [rsp + 0xa0]
movups xmm1, xmmword [rsp + 0xb0]
movups xmm2, xmmword [rsp + 0xc0]
movups xmm3, xmmword [rsp + 0xd0]
movaps xmmword [rsp + 0x240], xmm3
movaps xmmword [rsp + 0x230], xmm2
movaps xmmword [rsp + 0x220], xmm1
movaps xmmword [rsp + 0x210], xmm0
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rax + 0x10]
movaps xmmword [rsp + 0x1f0], xmm0
movaps xmmword [rsp + 0x200], xmm1
lea rcx, [rsp + 0x128]
lea rdx, [rsp + 0x1f0]
mov r8d, 0x90
call sym.memcpy
mov rcx, qword [rsp + 0x148]
cmp rcx, 0x62
jae 0x55ff14
mov ebp, 0x16
lea r15, [0x007a0f31]
cmp rcx, r14
jne 0x55f76d
lea rdx, [rsp + 0x150]
mov rcx, qword [rsp + 0x40]
mov r8, r14
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x55f76d
lea r14, [rsp + 0x400]
lea rdx, [rsp + 0x1f0]
mov r8d, 0x90
mov rcx, r14
call sym.memcpy
lea rcx, [rsp + 0x370]
mov r8d, 0x90
mov rdx, r14
call sym.memcpy
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x308], rax
mov qword [rsp + 0x310], r12
mov qword [rsp + 0x318], r13
movups xmm0, xmmword [rsp + 0x370]
movups xmm1, xmmword [rsp + 0x380]
movups xmmword [rsp + 0x320], xmm0
movups xmmword [rsp + 0x330], xmm1
mov rax, qword [rax + 0x20]
cmp rax, 0x31
jae 0x55ff51
mov rcx, qword [rdi + 0x10]
mov r9, qword [rcx]
mov rcx, qword [r9 + 0x18]
cmp rcx, 7
jae 0x55ff65
lea rdx, [rcx*8]
cmp rdx, rax
jne 0x55ff25
lea rdx, [rsp + 0x310]
sub r9, 0xffffffffffffff80
xorps xmm6, xmm6
movaps xmmword [rsp + 0x130], xmm6
movaps xmmword [rsp + 0x120], xmm6
movaps xmmword [rsp + 0x110], xmm6
mov qword [rsp + 0x30], rcx
lea r8, [rsp + 0x110]
mov qword [rsp + 0x28], r8
mov qword [rsp + 0x20], rcx
mov rcx, rdx
mov rdx, rax
xor r8d, r8d
call sym.ring::limb::parse_big_endian_in_range_and_pad_consttime::ha2394c2c103af5cc
test al, al
jne 0x55ff25
movaps xmm0, xmmword [rsp + 0x110]
movaps xmm1, xmmword [rsp + 0x120]
movaps xmm2, xmmword [rsp + 0x130]
movaps xmmword [rsp + 0x360], xmm2
movaps xmmword [rsp + 0x350], xmm1
movaps xmmword [rsp + 0x340], xmm0
mov r8, qword [rdi + 8]
mov rax, qword [r8]
mov rax, qword [rax + 8]
movaps xmmword [rsp + 0x130], xmm6
movaps xmmword [rsp + 0x120], xmm6
movaps xmmword [rsp + 0x110], xmm6
add r8, 0x10
lea rcx, [rsp + 0x110]
lea rdx, [rsp + 0x340]
call rax
movaps xmm0, xmmword [rsp + 0x110]
movaps xmm1, xmmword [rsp + 0x120]
movaps xmm2, xmmword [rsp + 0x130]
movaps xmmword [rsp + 0x2f0], xmm2
movaps xmmword [rsp + 0x2e0], xmm1
movaps xmmword [rsp + 0x2d0], xmm0
mov rax, qword [rdi]
mov r13, qword [rdi + 0x18]
movaps xmmword [rsp + 0x90], xmm6
movaps xmmword [rsp + 0x80], xmm6
movaps xmmword [rsp + 0x70], xmm6
movaps xmmword [rsp + 0x60], xmm6
mov rax, qword [rax + 0x20]
mov qword [rsp + 0x40], rax
cmp rax, 0x41
jae 0x55ff76
cmp qword [rsp + 0x40], 0
je 0x55fc36
mov r14d, 0xffffffff
mov r15, qword [rsp + 0x40]
jmp 0x55fbc6
add rbx, r12
sub r15, r12
je 0x55fc36
cmp r15, r14
mov r12d, 0xffffffff
cmovb r12, r15
xor ecx, ecx
mov rdx, rbx
mov r8d, r12d
mov r9d, 2
call sub.bcrypt.dll_BCryptGenRandom
cmp eax, 0xbfffffff
jbe 0x55fbbe
mov ebp, eax
mov rcx, rbx
mov edx, r12d
call sub.advapi32.dll_SystemFunction036
test al, al
jne 0x55fbbe
test ebp, 0x7fffffff
je 0x55fc36
lea rax, str.RNG_failed
mov ecx, 0xa
jmp 0x55fecd
cmp rcx, rax
jae 0x55fc2a
movzx r8d, byte [r10 + rcx]
test r8b, r8b
js 0x55fe9e
lea r15, str.InvalidEncodingTooSmall_home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_limb.rs
jmp 0x55f76d
movups xmm0, xmmword [r13 + 0x30]
movups xmm1, xmmword [r13 + 0x40]
movups xmm2, xmmword [r13 + 0x50]
movups xmm3, xmmword [r13 + 0x60]
movups xmmword [rsp + 0x228], xmm3
movups xmmword [rsp + 0x218], xmm2
movups xmmword [rsp + 0x208], xmm1
movups xmmword [rsp + 0x1f8], xmm0
xorps xmm0, 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
movups xmmword [rsp + 0x2b0], xmm0
mov qword [rsp + 0x1f0], r13
mov qword [rsp + 0x238], 0
mov qword [rsp + 0x2c0], 0
lea rcx, [rsp + 0x1f0]
lea rdx, [rsp + 0x60]
mov r8, qword [rsp + 0x40]
call sym.ring::digest::Context::update::ha2823350c14423ef
mov rax, qword [rsp + 0x50]
mov r8, qword [rax + 0x20]
cmp r8, 0x31
jae 0x55ff8c
lea rbx, [rsp + 0x1f0]
mov rcx, rbx
lea rdx, [rsp + 0x310]
call sym.ring::digest::Context::update::ha2823350c14423ef
lea rcx, [rsp + 0x110]
mov r8d, 0xd8
mov rdx, rbx
call sym.memcpy
mov rax, qword [rsp + 0x110]
mov r9, qword [rax + 0x20]
movups xmm0, xmmword [rsp + 0x230]
movaps xmmword [rsp + 0x440], xmm0
movups xmm0, xmmword [rsp + 0x1f0]
movups xmm1, xmmword [rsp + 0x200]
movups xmm2, xmmword [rsp + 0x210]
movups xmm3, xmmword [rsp + 0x220]
movaps xmmword [rsp + 0x430], xmm3
movaps xmmword [rsp + 0x420], xmm2
movaps xmmword [rsp + 0x410], xmm1
movaps xmmword [rsp + 0x400], xmm0
cmp r9, 0x81
jae 0x55ffa3
lea r8, [rsp + 0x160]
mov rax, qword [rsp + 0x1e0]
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0xa0]
lea rdx, [rsp + 0x400]
call sym._ZN4ring6digest12BlockContext6finish17hd326bef02713bf4cE.llvm.8554358814637175261
mov rdx, qword [rsp + 0xa0]
mov rax, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0xb0]
test rdx, rdx
je 0x55fecd
movups xmm0, xmmword [rsp + 0xb8]
movups xmm1, xmmword [rsp + 0xc8]
movups xmm2, xmmword [rsp + 0xd8]
movups xmmword [rsi + 0x38], xmm2
movups xmmword [rsi + 0x28], xmm1
movups xmmword [rsi + 0x18], xmm0
movups xmm0, xmmword [rsp + 0x3f0]
movups xmmword [rsi + 0xe0], xmm0
movups xmm0, xmmword [rsp + 0x3e0]
movups xmmword [rsi + 0xd0], xmm0
movups xmm0, xmmword [rsp + 0x3d0]
movups xmmword [rsi + 0xc0], xmm0
movups xmm0, xmmword [rsp + 0x390]
movups xmm1, xmmword [rsp + 0x3a0]
movups xmm2, xmmword [rsp + 0x3b0]
movups xmm3, xmmword [rsp + 0x3c0]
movups xmmword [rsi + 0xb0], xmm3
movups xmmword [rsi + 0xa0], xmm2
movups xmmword [rsi + 0x90], xmm1
movups xmmword [rsi + 0x80], xmm0
movaps xmm0, xmmword [rsp + 0x2d0]
movaps xmm1, xmmword [rsp + 0x2e0]
movaps xmm2, xmmword [rsp + 0x2f0]
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 0x55f77c
mov rcx, qword [rsp + 0x48]
add rcx, 3
jmp 0x55f565
lea r8, str._home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_pkcs8.rs
mov rcx, rbx
call sym.core::slice::index::slice_index_order_fail::hb6f495100651f9f8
lea r8, str._home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_pkcs8.rs
mov rcx, rdx
mov rdx, rax
call sym.core::slice::index::slice_end_index_len_fail::h829dac2b01cd87d1
mov qword [rsi + 8], rax
mov qword [rsi + 0x10], rcx
jmp 0x55f775
lea r8, str._home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_ec_keys.rs
mov edx, 0x30
mov rcx, r12
call sym.core::slice::index::slice_end_index_len_fail::h829dac2b01cd87d1
lea r8, str._home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_ec_keys.rs
mov edx, 0x61
mov rcx, rax
call sym.core::slice::index::slice_end_index_len_fail::h829dac2b01cd87d1
lea r8, str._home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_pkcs8.rs
mov rcx, rax
mov rdx, r14
call sym.core::slice::index::slice_start_index_len_fail::h5f4d386d5ac67311
lea r8, str._home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_ec_keys.rs
mov edx, 0x61
call sym.core::slice::index::slice_end_index_len_fail::h829dac2b01cd87d1
lea rax, str._home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_ec_suite_b_private_key.rs
mov qword [rsp + 0x20], rax
lea rcx, str.called__Result::unwrap____on_an__Err__value
lea r9, [0x007a0040]
lea r8, [rsp + 0x110]
mov edx, 0x2b
call sym.core::result::unwrap_failed::h9b9528a0a4171737
lea r8, str._home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_ec_keys.rs
mov edx, 0x30
mov rcx, rax
call sym.core::slice::index::slice_end_index_len_fail::h829dac2b01cd87d1
lea r8, str._home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_ec_suite_b_ops.rs
mov edx, 6
call sym.core::slice::index::slice_end_index_len_fail::h829dac2b01cd87d1
lea r8, [0x007a02a0]
mov edx, 0x40
mov rcx, qword [rsp + 0x40]
call sym.core::slice::index::slice_end_index_len_fail::h829dac2b01cd87d1
lea rax, str._home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_ec_keys.rs
mov edx, 0x30
mov rcx, r8
mov r8, rax
call sym.core::slice::index::slice_end_index_len_fail::h829dac2b01cd87d1
lea r8, str._home_slixe_.cargo_registry_src_index.crates.io_6f17d22bba15001f_ring_0.17.8_src_digest.rs
mov edx, pe_nt_image_headers64
mov rcx, r9
call sym.core::slice::index::slice_end_index_len_fail::h829dac2b01cd87d1
int3