Function at 0x140040eb0
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 [0x1400f5980]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov ebx, 0xffffff53
test rcx, rcx
je 0x140041192
mov ebp, r8d
mov r14, rdx
mov rsi, rcx
test rdx, rdx
jne 0x140040ef4
test ebp, ebp
jne 0x140041192
mov qword [rsi + 8], r9
mov qword [rsi + 0x10], 0
mov byte [rsi + 0x18], 0
xor edi, edi
test ebp, ebp
sete bl
xor ecx, ecx
call fcn.140041e10
test eax, eax
je 0x140040f22
mov ebx, 0xffffff2f
mov al, 3
jmp 0x14004118f
mov dil, bl
shl edi, 4
or edi, 0x24
mov ecx, 0x80
call fcn.14003fcc0
mov qword [rsi + 0x10], rax
test rax, rax
je 0x14004111d
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 0x140041101
mov rcx, qword [rsi]
lea r8, [rsp + 0x40]
mov edx, edi
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x140041101
mov rcx, qword [rsi]
xor r15d, r15d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
lea eax, [rdi - 4]
mov dl, 1
mov ecx, 4
mov r8d, 4
xor ebx, ebx
jmp 0x140040fc1
add r15, 4
cmp r8d, 4
cmovae r8d, ecx
mov ebx, 3
xor edx, edx
cmp r15, rax
jae 0x140041105
mov r9d, r8d
mov r8d, eax
sub r8d, r15d
nop word [rax + rax]
test r9d, r9d
je 0x140040fa5
mov r10d, r9d
lea r9, [rsp + r10]
add r9, 0x40
movzx r9d, byte [r9 + r15]
xor r9b, byte [rsp + r15 + 0x40]
cmp r10d, 1
je 0x140041030
lea r11, [rsp + r15]
add r11, 0x40
movzx r12d, byte [r10 + r11 + 1]
xor r12b, byte [rsp + r15 + 0x41]
or r9b, r12b
cmp r10, 2
je 0x140041030
movzx r12d, byte [r10 + r11 + 2]
xor r12b, byte [rsp + r15 + 0x42]
or r9b, r12b
cmp r10, 3
je 0x140041030
movzx r10d, byte [r10 + r11 + 3]
xor r10b, byte [rsp + r15 + 0x43]
or r9b, r10b
nop
test r9b, r9b
je 0x140040fa5
add r15, 4
cmp r8d, 4
mov r9d, 4
cmovb r9d, r8d
add r8d, 0xfffffffc
cmp r15, rax
jb 0x140040fd0
test dl, 1
je 0x140041105
lea r9, [rsp + 0x44]
mov rcx, qword [rsi + 8]
mov r15, qword [rsi + 0x10]
xorps xmm0, xmm0
movups xmmword [r15 + 0x60], xmm0
movups xmmword [r15 + 0x50], xmm0
movups xmmword [r15 + 0x40], xmm0
movups xmmword [r15 + 0x30], xmm0
movups xmmword [r15 + 0x20], xmm0
movups xmmword [r15 + 0x10], xmm0
movups xmmword [r15], xmm0
mov qword [r15 + 0x70], 0
mov qword [r15 + 0x78], rcx
lea r12, [r15 + 4]
mov dword [rsp + 0x30], ebp
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], eax
mov rcx, r15
mov rdx, r12
mov r8b, 4
call fcn.140042480
mov ebx, 1
test eax, eax
jne 0x140041105
lea rdx, [r15 + 0x3b]
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0x37
mov rcx, r15
xor r8d, r8d
mov r9, r12
call fcn.140042480
test eax, eax
jne 0x140041105
mov dword [r15], 1
xor ebx, ebx
jmp 0x140041126
mov byte [rsi + 0x18], 2
mov rcx, qword [rsi + 0x10]
test rcx, rcx
je 0x140041113
call fcn.14003fce0
mov qword [rsi + 0x10], 0
jmp 0x140041126
mov byte [rsi + 0x18], 2
mov ebx, 0xffffff83
xor eax, eax
nop dword [rax + rax]
mov byte [rsp + rax + 0x40], 0
inc rax
cmp eax, 4
jne 0x140041130
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 0x140041140
test ebx, ebx
je 0x140041184
cmp ebx, 1
je 0x140041188
cmp ebx, 3
je 0x140040f16
jmp 0x14004118d
mov al, 1
jmp 0x14004118f
mov ebx, 0xffffff39
mov al, 2
mov byte [rsi + 0x18], al
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.14009adb0
mov eax, ebx
add rsp, 0x80
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret