Function at 0x50d4a0
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xdc
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], 0
push ebx
test eax, eax
je 0x50d6f3
push eax
push dword [ebp + 8]
call sub.ADVAPI32.dll_SystemFunction036
test al, al
jne 0x50d6e2
push esi
push edi
push 4
push 0x7d
push str..._.._.._third_party_mini_chromium_mini_chromium_base_rand_util.cc
push str.void___cdecl_base::RandBytes_void__unsigned_int_
lea ecx, [ebp - 0xdc]
mov dword [ebp - 0xc], 1
call fcn.0050c270
mov ebx, eax
mov ecx, dword [ebx]
mov ecx, dword [ecx + 4]
mov edi, dword [ecx + ebx + 0x24]
mov esi, dword [ecx + ebx + 0x20]
test edi, edi
jl 0x50d51b
jg 0x50d513
test esi, esi
je 0x50d51b
test edi, edi
jl 0x50d51b
jg 0x50d513
cmp esi, 0x15
jbe 0x50d51b
sub esi, 0x15
sbb edi, 0
jmp 0x50d529
xorps xmm0, xmm0
movlpd qword [ebp - 8], xmm0
mov edi, dword [ebp - 4]
mov esi, dword [ebp - 8]
push ebx
lea ecx, [ebp - 8]
call fcn.00431fb0
cmp byte [ebp - 4], 0
jne 0x50d542
mov edx, 4
jmp 0x50d65c
mov ecx, dword [ebx]
mov eax, dword [ecx + 4]
mov eax, dword [eax + ebx + 0x14]
and eax, 0x1c0
cmp eax, 0x40
je 0x50d5bb
test edi, edi
jl 0x50d5bb
jg 0x50d560
test esi, esi
je 0x50d5bb
nop
mov eax, dword [ebx]
mov eax, dword [eax + 4]
mov ecx, dword [eax + ebx + 0x38]
mov al, byte [eax + ebx + 0x40]
mov byte [ebp + 0xf], al
mov eax, dword [ecx + 0x20]
cmp dword [eax], 0
je 0x50d598
mov edx, dword [ecx + 0x30]
mov eax, dword [edx]
test eax, eax
jle 0x50d598
dec eax
mov dword [edx], eax
mov ecx, dword [ecx + 0x20]
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ecx], eax
mov al, byte [ebp + 0xf]
mov byte [edx], al
movzx eax, al
jmp 0x50d5a4
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
movzx eax, byte [ebp + 0xf]
push eax
call edx
cmp eax, 0xffffffff
je 0x50d61d
add esi, 0xffffffff
adc edi, 0xffffffff
test edi, edi
jg 0x50d560
jl 0x50d5b9
test esi, esi
jne 0x50d560
mov ecx, dword [ebx]
mov eax, dword [ecx + 4]
push 0
push 0x15
push str.Check_failed:_success
mov ecx, dword [eax + ebx + 0x38]
mov eax, dword [ecx]
mov eax, dword [eax + 0x24]
call eax
cmp eax, 0x15
jne 0x50d61d
test edx, edx
jne 0x50d61d
test edi, edi
jl 0x50d645
jg 0x50d5e5
test esi, esi
je 0x50d645
mov eax, dword [ebx]
mov eax, dword [eax + 4]
mov ecx, dword [eax + ebx + 0x38]
mov al, byte [eax + ebx + 0x40]
mov byte [ebp + 0xf], al
mov eax, dword [ecx + 0x20]
cmp dword [eax], 0
je 0x50d624
mov edx, dword [ecx + 0x30]
mov eax, dword [edx]
test eax, eax
jle 0x50d624
dec eax
mov dword [edx], eax
mov ecx, dword [ecx + 0x20]
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ecx], eax
mov al, byte [ebp + 0xf]
mov byte [edx], al
movzx eax, al
jmp 0x50d630
mov edx, 4
jmp 0x50d647
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
movzx eax, byte [ebp + 0xf]
push eax
call edx
cmp eax, 0xffffffff
je 0x50d61d
add esi, 0xffffffff
adc edi, 0xffffffff
test edi, edi
jg 0x50d5e5
jl 0x50d645
test esi, esi
jne 0x50d5e5
xor edx, edx
mov eax, dword [ebx]
mov eax, dword [eax + 4]
mov dword [eax + ebx + 0x20], 0
mov dword [eax + ebx + 0x24], 0
mov eax, dword [ebx]
xor esi, esi
mov ecx, dword [eax + 4]
mov eax, 4
add ecx, ebx
cmp dword [ecx + 0x38], esi
cmovne eax, esi
or eax, dword [ecx + 0xc]
or eax, edx
and eax, 0x17
mov dword [ecx + 0xc], eax
mov ecx, dword [ecx + 0x10]
and ecx, eax
jne 0x50d6f8
mov esi, dword [ebp - 8]
mov eax, dword [esi]
mov eax, dword [eax + 4]
cmp dword [eax + esi + 0xc], ecx
jne 0x50d6c0
test byte [eax + esi + 0x14], 2
je 0x50d6c0
mov ecx, dword [eax + esi + 0x38]
mov eax, dword [ecx]
call dword [eax + 0x34]
cmp eax, 0xffffffff
jne 0x50d6c0
mov eax, dword [esi]
mov ecx, dword [eax + 4]
mov eax, dword [ecx + esi + 0xc]
and eax, 0x13
or eax, 4
mov dword [ecx + esi + 0xc], eax
mov ecx, dword [ecx + esi + 0x10]
and ecx, eax
jne 0x50d733
mov eax, dword [esi]
pop edi
mov eax, dword [eax + 4]
mov ecx, dword [eax + esi + 0x38]
pop esi
test ecx, ecx
je 0x50d6d4
mov eax, dword [ecx]
call dword [eax + 8]
push 0x596970
push ebx
call fcn.00439550
add esp, 8
test byte [ebp - 0xc], 1
je 0x50d6f3
lea ecx, [ebp - 0xdc]
call fcn.0050c3e0
pop ebx
mov esp, ebp
pop ebp
ret
test cl, 4
je 0x50d704
mov esi, str.ios_base::badbit_set
jmp 0x50d714
test cl, 2
mov esi, str.ios_base::failbit_set
mov eax, str.ios_base::eofbit_set
cmove esi, eax
lea eax, [ebp - 0x14]
push 1
push eax
call fcn.00422410
add esp, 8
lea ecx, [ebp - 0x34]
push eax
push esi
call fcn.00415ef0
mov ecx, eax
call fcn.004d1340
test cl, 4
je 0x50d73f
mov esi, str.ios_base::badbit_set
jmp 0x50d74f
test cl, 2
mov esi, str.ios_base::failbit_set
mov eax, str.ios_base::eofbit_set
cmove esi, eax
lea eax, [ebp - 8]
push 1
push eax
call fcn.00422410
add esp, 8
lea ecx, [ebp - 0x24]
push eax
push esi
call fcn.00415ef0
mov ecx, eax
call fcn.004d1340
int3