Function at 0x140051110
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
test rdx, rdx
je 0x1400515bf
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x160
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov r15, rdx
mov r12, rcx
xor r13d, r13d
mov ebp, r13d
mov dword [rax + 0x10], r13d
test rdx, rdx
je 0x14005159f
mov r14, rdx
mov eax, 0xffffffff
cmp r14, rax
cmova r14d, eax
mov edx, r14d
mov rcx, r12
call sub.ADVAPI32.dll_SystemFunction036
test al, al
jne 0x140051572
mov dword [rsp + 0x20], 4
mov r9d, 0x7d
lea r8, str.D:JenkinsworkspaceN_SentryNativeSDKexternalcrashpad_third_partymini_chromiummini_chromium_base_rand_util.cc
lea rdx, str.void___cdecl_base::RandBytes_void__unsigned___int64_
lea rcx, [rsp + 0x58]
call fcn.14004fa70
mov rdi, rax
or ebp, 1
mov dword [rsp + 0x198], ebp
mov esi, r13d
mov rcx, qword [rax]
movsxd rdx, dword [rcx + 4]
mov rbx, qword [rdx + rax + 0x28]
cmp rbx, 0x16
jl 0x1400511ca
add rbx, 0xffffffffffffffeb
jmp 0x1400511cd
mov rbx, r13
mov rdx, rdi
lea rcx, [rsp + 0x30]
call fcn.1400033a0
nop
cmp byte [rsp + 0x38], 0
jne 0x1400511ec
mov esi, 4
jmp 0x14005130e
mov rdx, qword [rdi]
movsxd rax, dword [rdx + 4]
mov ecx, dword [rax + rdi + 0x18]
and ecx, 0x1c0
cmp ecx, 0x40
je 0x140051272
test rbx, rbx
jle 0x140051272
nop word [rax + rax]
mov rax, qword [rdi]
movsxd rcx, dword [rax + 4]
mov r8, qword [rdi + rcx + 0x48]
movzx r9d, byte [rdi + rcx + 0x58]
mov rax, qword [r8 + 0x40]
cmp qword [rax], 0
je 0x140051251
mov rcx, qword [r8 + 0x58]
mov eax, dword [rcx]
test eax, eax
jle 0x140051251
dec eax
mov dword [rcx], eax
mov rcx, qword [r8 + 0x40]
mov rdx, qword [rcx]
lea rax, [rdx + 1]
mov qword [rcx], rax
mov byte [rdx], r9b
movzx eax, r9b
jmp 0x14005125e
mov rax, qword [r8]
movzx edx, r9b
mov rcx, r8
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x1400512fd
dec rbx
test rbx, rbx
jg 0x140051210
mov rdx, qword [rdi]
movsxd rax, dword [rdx + 4]
mov rcx, qword [rax + rdi + 0x48]
mov rax, qword [rcx]
mov r8d, 0x15
lea rdx, str.Check_failed:_success
call qword [rax + 0x48]
cmp rax, 0x15
jne 0x1400512fd
test rbx, rbx
jle 0x140051302
nop dword [rax]
mov rax, qword [rdi]
movsxd rcx, dword [rax + 4]
mov r8, qword [rcx + rdi + 0x48]
movzx r9d, byte [rcx + rdi + 0x58]
mov rax, qword [r8 + 0x40]
cmp qword [rax], 0
je 0x1400512e1
mov rcx, qword [r8 + 0x58]
mov eax, dword [rcx]
test eax, eax
jle 0x1400512e1
dec eax
mov dword [rcx], eax
mov rcx, qword [r8 + 0x40]
mov rdx, qword [rcx]
lea rax, [rdx + 1]
mov qword [rcx], rax
mov byte [rdx], r9b
movzx eax, r9b
jmp 0x1400512ee
mov rax, qword [r8]
movzx edx, r9b
mov rcx, r8
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x1400512fd
dec rbx
test rbx, rbx
jg 0x1400512a0
jmp 0x140051302
mov esi, 4
mov rax, qword [rdi]
movsxd rcx, dword [rax + 4]
mov qword [rcx + rdi + 0x28], r13
mov rax, qword [rdi]
movsxd rcx, dword [rax + 4]
add rcx, rdi
mov eax, dword [rcx + 0x10]
or eax, esi
mov edx, eax
or edx, 4
cmp qword [rcx + 0x48], 0
cmovne edx, eax
xor r8d, r8d
call fcn.140007b20
nop
mov rbx, qword [rsp + 0x30]
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
cmp dword [rcx + rbx + 0x10], 0
jne 0x14005137a
test byte [rcx + rbx + 0x18], 2
je 0x14005137a
mov rcx, qword [rcx + rbx + 0x48]
mov rax, qword [rcx]
call qword [rax + 0x68]
cmp eax, 0xffffffff
jne 0x140051375
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov edx, dword [rcx + 0x10]
or edx, 4
xor r8d, r8d
call fcn.140007b20
mov rbx, qword [rsp + 0x30]
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
mov rcx, qword [rcx + rbx + 0x48]
test rcx, rcx
je 0x140051392
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov esi, r13d
mov rax, qword [rdi]
movsxd rcx, dword [rax + 4]
mov rbx, qword [rcx + rdi + 0x28]
cmp rbx, 3
jl 0x1400513ad
add rbx, 0xfffffffffffffffe
jmp 0x1400513b0
mov rbx, r13
mov rdx, rdi
lea rcx, [rsp + 0x40]
call fcn.1400033a0
nop
cmp byte [rsp + 0x48], 0
jne 0x1400513cf
mov esi, 4
jmp 0x1400514ee
mov rdx, qword [rdi]
movsxd rax, dword [rdx + 4]
mov ecx, dword [rax + rdi + 0x18]
and ecx, 0x1c0
cmp ecx, 0x40
je 0x140051452
test rbx, rbx
jle 0x140051452
nop word [rax + rax]
mov rax, qword [rdi]
movsxd rcx, dword [rax + 4]
mov r8, qword [rdi + rcx + 0x48]
movzx r9d, byte [rdi + rcx + 0x58]
mov rax, qword [r8 + 0x40]
cmp qword [rax], 0
je 0x140051431
mov rcx, qword [r8 + 0x58]
mov eax, dword [rcx]
test eax, eax
jle 0x140051431
dec eax
mov dword [rcx], eax
mov rcx, qword [r8 + 0x40]
mov rdx, qword [rcx]
lea rax, [rdx + 1]
mov qword [rcx], rax
mov byte [rdx], r9b
movzx eax, r9b
jmp 0x14005143e
mov rax, qword [r8]
movzx edx, r9b
mov rcx, r8
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x1400514dd
dec rbx
test rbx, rbx
jg 0x1400513f0
mov rdx, qword [rdi]
movsxd rax, dword [rdx + 4]
mov rcx, qword [rax + rdi + 0x48]
mov rax, qword [rcx]
mov r8d, 2
lea rdx, [0x14009bef0]
call qword [rax + 0x48]
cmp rax, 2
jne 0x1400514dd
test rbx, rbx
jle 0x1400514e2
nop dword [rax]
mov rax, qword [rdi]
movsxd rcx, dword [rax + 4]
mov r8, qword [rdi + rcx + 0x48]
movzx r9d, byte [rdi + rcx + 0x58]
mov rax, qword [r8 + 0x40]
cmp qword [rax], 0
je 0x1400514c1
mov rcx, qword [r8 + 0x58]
mov eax, dword [rcx]
test eax, eax
jle 0x1400514c1
dec eax
mov dword [rcx], eax
mov rcx, qword [r8 + 0x40]
mov rdx, qword [rcx]
lea rax, [rdx + 1]
mov qword [rcx], rax
mov byte [rdx], r9b
movzx eax, r9b
jmp 0x1400514ce
mov rax, qword [r8]
movzx edx, r9b
mov rcx, r8
call qword [rax + 0x18]
cmp eax, 0xffffffff
je 0x1400514dd
dec rbx
test rbx, rbx
jg 0x140051480
jmp 0x1400514e2
mov esi, 4
mov rax, qword [rdi]
movsxd rcx, dword [rax + 4]
mov qword [rcx + rdi + 0x28], r13
mov rax, qword [rdi]
movsxd rcx, dword [rax + 4]
add rcx, rdi
mov eax, dword [rcx + 0x10]
or eax, esi
mov edx, eax
or edx, 4
cmp qword [rcx + 0x48], 0
cmovne edx, eax
xor r8d, r8d
call fcn.140007b20
nop
mov rbx, qword [rsp + 0x40]
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
cmp dword [rcx + rbx + 0x10], 0
jne 0x14005155a
test byte [rcx + rbx + 0x18], 2
je 0x14005155a
mov rcx, qword [rcx + rbx + 0x48]
mov rax, qword [rcx]
call qword [rax + 0x68]
cmp eax, 0xffffffff
jne 0x140051555
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
add rcx, rbx
mov edx, dword [rcx + 0x10]
or edx, 4
xor r8d, r8d
call fcn.140007b20
mov rbx, qword [rsp + 0x40]
mov rax, qword [rbx]
movsxd rcx, dword [rax + 4]
mov rcx, qword [rcx + rbx + 0x48]
test rcx, rcx
je 0x140051572
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
test bpl, 1
je 0x140051585
and ebp, 0xfffffffe
lea rcx, [rsp + 0x58]
call fcn.14004fcb0
mov eax, r14d
sub r15, rax
mov r14, r15
add r12, rax
test r15, r15
mov eax, 0xffffffff
jne 0x140051162
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret