Function at 0x140046800
Capabilities:
Generate random numbers via winapi

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x80
mov rax, qword [0x1400fe980]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov ebx, 0xffffff53
test rcx, rcx
je 0x140046af2
mov rsi, rcx
test rdx, rdx
jne 0x14004683f
test r8d, r8d
jne 0x140046af2
mov r15, rdx
mov qword [rsi + 8], r9
mov qword [rsi + 0x10], 0
mov byte [rsi + 0x18], 0
xor edi, edi
mov ebp, r8d
test r8d, r8d
sete bl
xor ecx, ecx
call fcn.140047790
test eax, eax
je 0x140046874
mov ebx, 0xffffff2f
mov al, 3
jmp 0x140046aef
mov dil, bl
shl edi, 4
or edi, 0x24
mov ecx, 0x80
call fcn.1400455f0
mov qword [rsi + 0x10], rax
test rax, rax
je 0x140046a7e
mov dword [rsp + 0x20], 0xf0000000
mov ebx, 1
mov rcx, rsi
xor edx, edx
xor r8d, r8d
mov r9d, 1
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140046a62
mov rcx, qword [rsi]
lea r8, [rsp + 0x40]
mov edx, edi
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x140046a62
mov rcx, qword [rsi]
xor r14d, r14d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea eax, [rdi - 4]
mov r9b, 1
mov r8d, 4
mov r10d, 4
xor ebx, ebx
mov rcx, r15
mov edx, ebp
jmp 0x14004691b
add r14, 4
cmp r10d, 4
cmovae r10d, r8d
mov ebx, 3
xor r9d, r9d
cmp r14, rax
jae 0x140046a66
mov r11d, r10d
mov r10d, eax
sub r10d, r14d
nop word cs:[rax + rax]
test r11d, r11d
je 0x1400468fe
mov r15d, r11d
lea r11, [rsp + r15]
add r11, 0x40
movzx r11d, byte [r11 + r14]
xor r11b, byte [rsp + r14 + 0x40]
cmp r15d, 1
je 0x140046990
lea r12, [rsp + r14]
add r12, 0x40
movzx ebp, byte [r15 + r12 + 1]
xor bpl, byte [rsp + r14 + 0x41]
or r11b, bpl
cmp r15, 2
je 0x140046990
movzx ebp, byte [r15 + r12 + 2]
xor bpl, byte [rsp + r14 + 0x42]
or r11b, bpl
cmp r15, 3
je 0x140046990
movzx ebp, byte [r15 + r12 + 3]
xor bpl, byte [rsp + r14 + 0x43]
or r11b, bpl
nop
test r11b, r11b
je 0x1400468fe
add r14, 4
cmp r10d, 4
mov r11d, 4
cmovb r11d, r10d
add r10d, 0xfffffffc
cmp r14, rax
jb 0x140046930
test r9b, 1
je 0x140046a66
lea r9, [rsp + 0x44]
mov r8, qword [rsi + 8]
mov r14, qword [rsi + 0x10]
xorps xmm0, xmm0
movups xmmword [r14 + 0x60], xmm0
movups xmmword [r14 + 0x50], xmm0
movups xmmword [r14 + 0x40], xmm0
movups xmmword [r14 + 0x30], xmm0
movups xmmword [r14 + 0x20], xmm0
movups xmmword [r14 + 0x10], xmm0
movups xmmword [r14], xmm0
mov qword [r14 + 0x70], 0
mov qword [r14 + 0x78], r8
lea r15, [r14 + 4]
mov dword [rsp + 0x30], edx
mov qword [rsp + 0x28], rcx
mov dword [rsp + 0x20], eax
mov rcx, r14
mov rdx, r15
mov r8b, 4
call fcn.140047e00
mov ebx, 1
test eax, eax
jne 0x140046a66
lea rdx, [r14 + 0x3b]
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x37
mov rcx, r14
xor r8d, r8d
mov r9, r15
call fcn.140047e00
test eax, eax
jne 0x140046a66
mov dword [r14], 1
xor ebx, ebx
jmp 0x140046a87
mov byte [rsi + 0x18], 2
mov rcx, qword [rsi + 0x10]
test rcx, rcx
je 0x140046a74
call fcn.140045610
mov qword [rsi + 0x10], 0
jmp 0x140046a87
mov byte [rsi + 0x18], 2
mov ebx, 0xffffff83
xor eax, eax
nop dword [rax]
mov byte [rsp + rax + 0x40], 0
inc rax
cmp eax, 4
jne 0x140046a90
mov ecx, edi
nop
mov byte [rsp + rax + 0x40], 0
mov byte [rsp + rax + 0x41], 0
mov byte [rsp + rax + 0x42], 0
mov byte [rsp + rax + 0x43], 0
mov byte [rsp + rax + 0x44], 0
mov byte [rsp + rax + 0x45], 0
mov byte [rsp + rax + 0x46], 0
mov byte [rsp + rax + 0x47], 0
add rax, 8
cmp ecx, eax
jne 0x140046aa0
test ebx, ebx
je 0x140046aed
cmp ebx, 1
je 0x140046ae4
cmp ebx, 3
je 0x140046868
jmp 0x140046ae9
mov ebx, 0xffffff39
mov al, 2
jmp 0x140046aef
mov al, 1
mov byte [rsi + 0x18], al
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1400a1150
mov eax, ebx
add rsp, 0x80
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret