Function at 0x14002952c
Capabilities:
Generate random numbers via winapi

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x170
lea rbp, [rsp + 0x30]
mov qword [rbp + 0xb8], 0xfffffffffffffffe
mov qword [rbp + 0x190], rbx
mov rax, qword [0x140078790]
xor rax, rbp
mov qword [rbp + 0x138], rax
mov r13, rdx
mov rdi, rcx
xor r8d, r8d
lea rdx, str.CCryptBlob_T_::Obfuscate
lea rcx, [rbp + 0xc0]
call fcn.14002de00
nop
lea rsi, vtable.CCryptBlob_struct__CRYPTOAPI_BLOB__class__heap_allocator_.0
mov qword [rbp + 0x48], rsi
mov ebx, 8
mov dword [rbp + 0x50], ebx
mov ecx, ebx
call fcn.1400331f0
xor r15d, r15d
test rax, rax
jne 0x1400295b0
mov ecx, 0x8007000e
call fcn.140032390
mov qword [rbp + 0x58], rax
mov r8d, dword [rbp + 0x50]
xor edx, edx
mov rcx, rax
call fcn.140034b00
nop
mov qword [rbp + 0x10], r15
mov dword [rsp + 0x20], 0xf0000000
mov r9d, 1
lea r8, str.Microsoft_Enhanced_Cryptographic_Provider_v1.0
xor edx, edx
lea rcx, [rbp + 0x10]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1400295f3
call fcn.140007048
jmp 0x1400295f6
mov eax, r15d
test eax, eax
jns 0x140029601
mov ecx, eax
call fcn.140032390
mov r8, qword [rbp + 0x58]
mov edx, ebx
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x14002961a
call fcn.140007048
mov qword [rbp + 0x30], rsi
mov qword [rbp + 0x40], r15
mov rax, rdi
lea rcx, [rdi + 8]
neg rax
sbb rdx, rdx
and rdx, rcx
lea rcx, [rbp + 0x30]
call fcn.14001779c
nop
mov rbx, r15
mov qword [rbp + 0x78], rbx
cmp dword [rdi + 8], 0x400
ja 0x140029684
mov ecx, dword [rdi + 8]
call fcn.140011244
test al, al
je 0x140029684
mov eax, dword [rdi + 8]
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x14002966e
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.140033c40
sub rsp, rcx
lea r14, [rsp + 0x30]
jmp 0x1400296a8
mov ecx, dword [rdi + 8]
add rcx, 0x10
call fcn.140037abc
test rax, rax
jne 0x14002969a
mov r14, r15
jmp 0x1400296a8
mov qword [rax], r15
mov rbx, rax
mov qword [rbp + 0x78], rax
lea r14, [rax + 0x10]
test r14, r14
jne 0x1400296b7
mov ecx, 0x8007000e
call fcn.140032390
mov r12, qword [rdi + 0x10]
mov esi, dword [rdi + 8]
mov dword [rbp + 0x20], esi
mov r8d, 8
mov rdx, qword [rbp + 0x58]
lea rcx, [rbp + 0x28]
call fcn.1400346b0
mov dword [rbp + 0x1c], r15d
test esi, esi
jle 0x1400297ff
mov r10d, dword [rbp + 0x28]
mov dword [rbp + 4], r10d
mov r11d, dword [rbp + 0x2c]
mov dword [rbp + 8], r11d
xor r9d, r9d
mov dword [rbp + 0x18], r9d
xor r8d, r8d
mov dword [rbp], r8d
cmp r8d, 0x20
jge 0x140029768
mov edx, r11d
sar edx, 5
mov eax, r11d
shl eax, 4
xor edx, eax
add edx, r11d
mov eax, r9d
and eax, 3
mov ecx, dword [r13 + rax*4]
add ecx, r9d
xor edx, ecx
add r10d, edx
mov dword [rbp + 4], r10d
add r9d, 0x9e3779b9
mov dword [rbp + 0x18], r9d
mov ecx, r10d
sar ecx, 5
mov eax, r10d
shl eax, 4
xor ecx, eax
add ecx, r10d
mov eax, r9d
shr rax, 0xb
and eax, 3
mov eax, dword [r13 + rax*4]
add eax, r9d
xor ecx, eax
add r11d, ecx
mov dword [rbp + 8], r11d
inc r8d
jmp 0x1400296fa
mov r8d, 4
lea rdx, [rbp + 4]
lea rcx, [rbp + 0x130]
call fcn.1400346b0
mov r8d, 4
lea rdx, [rbp + 8]
lea rcx, [rbp + 0x134]
call fcn.1400346b0
mov r9d, esi
mov ecx, 8
cmp esi, ecx
cmovg r9d, ecx
xor r8d, r8d
mov dword [rbp], r8d
cmp r8d, r9d
jge 0x1400297d7
movsxd rdx, r15d
movsxd rax, r8d
movzx ecx, byte [rbp + rax + 0x130]
movzx eax, byte [rdx + r12]
xor ecx, eax
mov byte [rdx + r14], cl
inc r8d
mov dword [rbp], r8d
inc r15d
mov dword [rbp + 0x1c], r15d
jmp 0x1400297a9
sub esi, r9d
mov dword [rbp + 0x20], esi
test esi, esi
jle 0x1400297fa
movsxd rdx, r15d
add rdx, 0xfffffffffffffff8
add rdx, r14
mov r8d, 8
lea rcx, [rbp + 0x28]
call fcn.1400346b0
jmp 0x1400296d8
mov eax, dword [rdi + 8]
mov dword [rbp + 0xa8], eax
mov qword [rbp + 0xb0], r14
xor r14d, r14d
mov dword [rbp + 0x60], r14d
mov qword [rbp + 0x68], r14
mov dword [rbp + 0x70], r14d
mov dword [rbp + 0x98], r14d
xor eax, eax
mov qword [rbp + 0xa0], rax
mov esi, r14d
mov dword [rbp + 0x24], r14d
cmp esi, 2
jae 0x140029851
lea rdx, [rbp + 0x98]
lea rcx, [rbp + 0x60]
call fcn.140016448
inc esi
mov dword [rbp + 0x24], esi
jmp 0x140029835
cmp dword [rbp + 0x60], r14d
jbe 0x140029866
mov rcx, qword [rbp + 0x68]
test rcx, rcx
je 0x140029866
add rcx, 0xfffffffffffffff8
jmp 0x140029869
mov rcx, r14
lea rax, [rcx + 8]
neg rcx
sbb rdx, rdx
and rdx, rax
mov esi, 0x19
mov r8d, esi
lea rcx, [rbp + 0x48]
call fcn.14001a3d0
cmp dword [rbp + 0x60], 1
jbe 0x1400298a0
mov rcx, qword [rbp + 0x68]
lea rax, [rcx + 0x10]
test rax, rax
je 0x1400298a0
add rcx, 8
jmp 0x1400298a3
mov rcx, r14
lea rax, [rcx + 8]
neg rcx
sbb rdx, rdx
and rdx, rax
lea rcx, [rbp + 0xa8]
sub rcx, 8
mov r8, rsi
call fcn.14001a3d0
mov rcx, qword [rbp + 0x40]
test rcx, rcx
je 0x1400298d1
call fcn.140009660
mov qword [rbp + 0x40], r14
mov dword [rbp + 0x38], r14d
lea rdx, [rbp + 0x38]
lea rcx, [rbp + 0x60]
call fcn.14001a508
mov esi, 0x18
mov r8d, esi
xor edx, edx
lea rcx, [rbp + 0x80]
call fcn.140034b00
mov dword [rbp + 0x80], 4
lea rdx, [rbp + 0x38]
lea rcx, [rbp + 0x80]
call fcn.140007fb0
nop
mov rcx, qword [rdi + 0x10]
test rcx, rcx
je 0x140029925
call fcn.140009660
mov qword [rdi + 0x10], r14
lea rax, [rdi + 8]
mov dword [rax], r14d
neg rdi
sbb rdx, rdx
and rdx, rax
lea rcx, [rbp + 0x80]
call fcn.14001a624
nop
mov rcx, qword [rbp + 0x90]
test rcx, rcx
je 0x140029957
call fcn.140009660
mov qword [rbp + 0x90], r14
mov dword [rbp + 0x88], r14d
lea rdi, [rbp + 0x80]
xor eax, eax
mov rcx, rsi
rep stosb byte [rdi], al
lea rcx, [rbp + 0x60]
call fcn.1400174d8
nop
test rbx, rbx
je 0x140029993
mov rcx, rbx
mov rbx, qword [rbx]
mov qword [rbp + 0x78], rbx
call fcn.140037ab4
jmp 0x14002997d
lea rdi, vtable.CCryptBlob_struct__CRYPTOAPI_BLOB__class__heap_allocator_.0
mov qword [rbp + 0x30], rdi
mov rcx, qword [rbp + 0x40]
test rcx, rcx
je 0x1400299ac
call fcn.140009660
mov qword [rbp + 0x40], r14
mov dword [rbp + 0x38], r14d
mov rcx, qword [rbp + 0x10]
test rcx, rcx
je 0x1400299d4
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test eax, eax
jne 0x1400299d0
call fcn.140007048
jmp 0x1400299d4
mov qword [rbp + 0x10], r14
mov qword [rbp + 0x48], rdi
mov rcx, qword [rbp + 0x58]
test rcx, rcx
je 0x1400299e6
call fcn.140009660
mov qword [rbp + 0x58], r14
mov dword [rbp + 0x50], r14d
lea rcx, [rbp + 0xc0]
call fcn.14002e7a8
mov rcx, qword [rbp + 0x138]
xor rcx, rbp
call fcn.140033cb0
mov rbx, qword [rbp + 0x190]
lea rsp, [rbp + 0x140]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret