Function at 0x180053590
Capabilities:
Generate random numbers via rtlgenrandom

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x30
mov rdi, rdx
mov ebx, ecx
mov rax, qword [0x1800cb028]
xor rax, rsp
mov qword [rsp + 0x28], rax
lea rcx, [0x1800cb6c0]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rsi, qword [0x1800cb5a8]
test rsi, rsi
jne 0x1800538f5
lea rcx, [0x1800cb6c0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, 0x918
call fcn.1800022d0
mov rsi, rax
test rax, rax
je 0x18005398e
lea rcx, [rsi + 0x18]
mov word [rsi + 0xd0], 0
xorps xmm0, xmm0
movups xmmword [rsi], xmm0
mov qword [rsi + 0x10], 0
movups xmmword [rsi + 0x48], xmm0
movups xmmword [rsi + 0x58], xmm0
movups xmmword [rsi + 0x68], xmm0
mov al, byte [0x1800cb5b0]
xor al, 1
mov byte [rsi + 0x78], al
test rdi, rdi
je 0x1800538e2
mov eax, dword [rdi + 0x10]
mov edx, eax
and edx, 3
cmp edx, 1
je 0x180053911
cmp edx, 2
je 0x1800539ad
shr eax, 2
and eax, 1
mov edx, dword [rdi + 8]
mov dword [rsi + 0x98], edx
mov edx, dword [rdi + 0xc]
mov dword [rsi + 0x9c], edx
mov dword [rcx + 0x28], eax
mov edx, 0x1388
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
je 0x180053975
xorps xmm0, xmm0
movups xmmword [rsi + 0x80], xmm0
mov byte [rsi + 0x79], bl
test rdi, rdi
je 0x18005368f
mov rax, qword [rdi]
test rax, rax
jne 0x18005369a
mov rax, qword [0x1800cb038]
shr rax, 3
mov qword [rsi + 0x90], rax
mov qword [rsi + 0xa0], 0
xor r8d, r8d
mov r10d, 0x10
mov r9d, 0x1ffff
mov r8d, r8d
lea rcx, [r8 + r8*2]
shl rcx, 4
movups xmmword [rsi + rcx + 0xa8], xmm0
mov qword [rsi + rcx + 0xb8], r10
mov dword [rsi + rcx + 0xcc], 0
mov r11d, 0x1000
lea rax, [r11 - 0x10]
xor edx, edx
div r10
inc eax
dec eax
mov edx, eax
shr edx, 5
mov edi, eax
and edi, 0x1f
cmp edi, 1
sbb edx, 0xffffffff
mov r14, r10
imul r14, rax
mov rdi, r11
sub rdi, r14
lea r15d, [rdx*4 + 0x10]
mov r14d, edi
cmp r14, r15
jb 0x1800536f2
mov r12, r11
shl r12, 6
add r12, r11
mov r15, r14
shl r15, 0xc
cmp r12, r15
jae 0x180053767
cmp r14, r10
ja 0x180053759
cmp edx, 3
ja 0x180053767
lea r14, [r11 + 0x1000]
cmp r11, 0xfb001
mov r11, r14
jb 0x1800536e7
jmp 0x18005391e
cmp edx, 3
ja 0x180053767
imul r14, r11, 0x62
cmp r14, r15
jb 0x180053741
shr r11d, 0xc
mov byte [rsi + rcx + 0xd2], r11b
mov dword [rsi + rcx + 0xc0], eax
mov dword [rsi + rcx + 0xc4], edx
mov dword [rsi + rcx + 0xc8], edi
mov eax, 0x1ffff
xor edx, edx
div r10d
mov eax, r10d
sub eax, edx
add eax, r9d
xor edx, edx
div r10d
mov word [rsi + rcx + 0xd0], ax
cmp r10, 0xf00
je 0x1800537f2
lea rax, [r10 + 1]
cmp rax, 8
jbe 0x180053929
cmp rax, 0x1f0
ja 0x1800537d6
and r10, 0xfffffffffffffff0
add r10, 0x10
inc r8d
jmp 0x1800536bb
cmp rax, 0xf00
ja 0x180053962
and r10, 0xffffffffffffff00
add r10, 0x100
jmp 0x1800537ce
lea rdi, [0x1800cb540]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test bl, bl
je 0x1800538c3
mov r12d, dword [rsi + 0x40]
xor eax, eax
test r12d, r12d
setne al
lea r15, [rax*8 + 0x40]
lea rbx, [rdi + rax*8]
add rbx, 0x40
lea r14, [rsp + 0x20]
mov ebp, 0xffffffff
mov rcx, r14
mov edx, 8
call sub.ADVAPI32.dll_SystemFunction036
test al, al
je 0x1800539b4
xor ecx, ecx
test r12d, r12d
setne cl
mov rax, qword [rsp + 0x20]
and rax, 0xfffffffffffffffe
or rax, rcx
je 0x180053830
mov rcx, qword [r15 + rdi]
test rcx, rcx
je 0x18005388c
xor edx, edx
cmp qword [rcx + 0x10], rax
setb dl
cmova edx, ebp
cmp edx, 0xffffffff
jne 0x18005387a
mov rcx, qword [rcx]
jmp 0x18005385f
test edx, edx
je 0x1800539cd
mov rcx, qword [rcx + 8]
and rcx, 0xfffffffffffffffe
jmp 0x18005385f
mov qword [rsi + 0x10], rax
mov rcx, rbx
mov rdx, rsi
call fcn.18000b710
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.180062020
mov rax, rsi
add rsp, 0x30
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov rax, qword [0x1800cb570]
lea rcx, [rax + 1]
mov qword [0x1800cb570], rcx
mov qword [rsi + 0x10], rax
lea rcx, [0x1800cb578]
jmp 0x180053893
mov dword [rsi + 0x98], 0
xor edx, edx
xor eax, eax
jmp 0x180053659
mov rax, qword [rsi]
mov qword [0x1800cb5a8], rax
lea rcx, [0x1800cb6c0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1800535f2
mov al, 1
mov byte [rsi + 0x78], al
mov eax, dword [rdi + 0x10]
jmp 0x180053647
mov r11d, 0xfc000
jmp 0x180053767
test r10, r10
je 0x18005395b
bsr rcx, r10
xor rcx, 0x3f
neg cl
mov r10d, 1
shl r10, cl
cmp r10, 0x11
mov ecx, 0x10
cmovb r10, rcx
cmp rax, 2
cmovb r10, rcx
jmp 0x1800537ce
mov ecx, 0x40
jmp 0x180053936
add r10d, 0x1000
and r10d, 0x1ff000
jmp 0x1800537ce
lea rax, str.MOZ_RELEASE_ASSERT_mLock.Init_doLock__
mov qword [sym.mozglue.dll_gMozCrashReason], rax
int3
lea rcx, str._jemalloc_
lea rdx, str.:__malloc__Error_initializing_arena_n
call fcn.180066f70
mov rsi, qword [0x1800cb568]
jmp 0x1800538a4
xor eax, eax
jmp 0x180053913
lea rax, str.MOZ_RELEASE_ASSERT_maybeRandomId.isSome___
mov qword [sym.mozglue.dll_gMozCrashReason], rax
int3
mov r12d, dword [rsi + 0x40]
jmp 0x180053830