Function at 0x140148c50
Capabilities:
Generate random numbers via winapi

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x98
mov rax, qword [0x1403486d0]
xor rax, rsp
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x100]
xor ebx, ebx
mov edi, 0xc0000001
mov dword [rsp + 0x50], r8d
mov rbp, rcx
mov qword [rsp + 0x60], rdx
mov rcx, qword [rcx + 0x18]
xor r12b, r12b
mov qword [rsp + 0x78], rax
mov r13, r9
mov dword [rsp + 0x40], ebx
mov r15d, edi
mov qword [rsp + 0x58], rbx
mov esi, edi
mov dword [rsp + 0x44], ebx
mov dword [rsp + 0x4c], ebx
test rcx, rcx
je 0x140148ce5
lea rax, [rsp + 0x4c]
mov dword [rsp + 0x28], ebx
lea r9d, [rbx + 4]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x44]
lea rdx, str.Block_Length
call sub.ncrypt.dll_NCryptGetProperty
mov esi, eax
test eax, eax
jns 0x140148d30
lea rcx, str.failed_to_get_block_length__x_
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
lea rcx, [0x14029df90]
mov rbx, rax
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
mov dword [rsp + 0x30], esi
lea r9, str.D:BWA61422F5C_3951_0_securityWin2_201_srcrootOSX_sec_securitydSecKeybagSupport.c
mov rdx, rax
mov qword [rsp + 0x28], rbx
lea r8, str.CWrapKeyWithNCryptKeyStorage::GetBlockLength
mov dword [rsp + 0x20], 0xe3
mov ecx, 3
call fcn.140109c60
xor ebx, ebx
mov rcx, qword [rbp + 0x18]
mov r14d, dword [rsp + 0x44]
test rcx, rcx
je 0x14014905e
lea rax, [rsp + 0x70]
mov dword [rsp + 0x28], ebx
mov r9d, 8
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x58]
lea rdx, str.Modified
call sub.ncrypt.dll_NCryptGetProperty
mov r15d, eax
test eax, eax
js 0x14014905e
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], ebx
mov r8d, 8
lea rdx, [rsp + 0x58]
mov rcx, rbp
call fcn.1401481b0
mov r15, rax
test rax, rax
jne 0x140148ddf
lea rcx, str.hash_error
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
lea rcx, [0x14029df90]
mov rbx, rax
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
mov qword [rsp + 0x28], rbx
lea r9, str.D:BWA61422F5C_3951_0_securityWin2_201_srcrootOSX_sec_securitydSecKeybagSupport.c
mov rdx, rax
mov dword [rsp + 0x20], 0x174
lea r8, str.CWrapKeyWithNCryptKeyStorage::GetIV
lea ecx, [r15 + 3]
call fcn.140109c60
jmp 0x1401490a8
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r8, r14
xor edx, edx
mov rcx, rax
mov rsi, rax
call sub.VCRUNTIME140.dll_memset
xor r8b, r8b
test r14d, r14d
je 0x140148e30
xor eax, eax
nop dword [rax]
nop word [rax + rax]
xor edx, edx
div dword [rsp + 0x48]
mov ecx, edx
movzx edx, r8b
inc r8b
movzx eax, byte [rcx + r15]
mov byte [rdx + rsi], al
movzx eax, r8b
cmp eax, r14d
jb 0x140148e10
mov rcx, r15
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp + 0x18]
test rcx, rcx
je 0x140148ffe
mov r9d, r14d
mov dword [rsp + 0x20], 0
mov r8, rsi
lea rdx, [0x1402b8080]
call sub.ncrypt.dll_NCryptSetProperty
mov edi, eax
test eax, eax
js 0x140148ffe
cmp qword [rbp + 0x18], 0
je 0x140148fce
mov r14, qword [rsp + 0x78]
mov rcx, r13
mov ebx, dword [r14]
call qword [sym.imp.CoreFoundation.dll_CFDataGetMutableBytePtr]
mov r8d, dword [rsp + 0x50]
lea rcx, [rsp + 0x40]
mov rdx, qword [rsp + 0x60]
xor r9d, r9d
mov dword [rsp + 0x38], 2
mov qword [rsp + 0x30], rcx
mov rcx, qword [rbp + 0x18]
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
call sub.ncrypt.dll_NCryptEncrypt
mov edi, eax
test eax, eax
js 0x140148fce
mov rcx, qword [rbp + 0x48]
test rcx, rcx
je 0x140148f9e
xor r9d, r9d
lea rdx, [rsp + 0x80]
lea r8d, [r9 + 8]
call sub.bcrypt.dll_BCryptGenRandom
mov edi, eax
test eax, eax
js 0x140148f9e
mov ebp, dword [rsp + 0x40]
mov rcx, r13
add ebp, 8
call qword [sym.imp.CoreFoundation.dll_CFDataGetLength]
mov rcx, r13
cmp rax, rbp
jge 0x140148f61
call qword [sym.imp.CoreFoundation.dll_CFDataGetLength]
lea rcx, str.Insufficient_destination_buffer___d:_d_
mov rdi, rax
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
lea rcx, [0x14029df90]
mov rbx, rax
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
mov qword [rsp + 0x38], rbp
lea r9, str.D:BWA61422F5C_3951_0_securityWin2_201_srcrootOSX_sec_securitydSecKeybagSupport.c
mov qword [rsp + 0x30], rdi
lea r8, str.CWrapKeyWithNCryptKeyStorage::wrapkey
mov qword [rsp + 0x28], rbx
mov rdx, rax
mov ecx, 3
mov dword [rsp + 0x20], 0x12d
call fcn.140109c60
jmp 0x140149047
mov eax, dword [rsp + 0x40]
lea r8, [rsp + 0x80]
mov r9d, 8
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x60]
mov qword [rsp + 0x68], 8
call qword [sym.imp.CoreFoundation.dll_CFDataReplaceBytes]
mov eax, dword [rsp + 0x40]
mov r12b, 1
add eax, 8
mov dword [r14], eax
jmp 0x140149047
lea rcx, str.failed_to_generate_rng__x_
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
lea rcx, [0x14029df90]
mov rbx, rax
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
mov dword [rsp + 0x30], edi
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0x126
jmp 0x14014902c
lea rcx, str.failed_to_wrap__x_
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
lea rcx, [0x14029df90]
mov rbx, rax
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
mov dword [rsp + 0x30], edi
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0x11e
jmp 0x14014902c
lea rcx, str.failed_to_set_initialization_vector__x_
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
lea rcx, [0x14029df90]
mov rbx, rax
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
mov dword [rsp + 0x30], edi
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0x118
lea r9, str.D:BWA61422F5C_3951_0_securityWin2_201_srcrootOSX_sec_securitydSecKeybagSupport.c
mov rdx, rax
lea r8, str.CWrapKeyWithNCryptKeyStorage::wrapkey
mov ecx, 3
call fcn.140109c60
test rsi, rsi
je 0x1401490ed
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x1401490ed
lea rcx, str.failed_to_get_proterty_info__x_
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
lea rcx, [0x14029df90]
mov rbx, rax
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
mov dword [rsp + 0x30], r15d
lea r9, str.D:BWA61422F5C_3951_0_securityWin2_201_srcrootOSX_sec_securitydSecKeybagSupport.c
mov rdx, rax
mov qword [rsp + 0x28], rbx
lea r8, str.CWrapKeyWithNCryptKeyStorage::GetIV
mov dword [rsp + 0x20], 0x16c
mov ecx, 3
call fcn.140109c60
lea rcx, str.failed_to_get_initialization_vector
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
lea rcx, [0x14029df90]
mov rbx, rax
call qword [sym.imp.CoreFoundation.dll___CFStringMakeConstantString]
mov qword [rsp + 0x28], rbx
lea r9, str.D:BWA61422F5C_3951_0_securityWin2_201_srcrootOSX_sec_securitydSecKeybagSupport.c
mov rdx, rax
mov dword [rsp + 0x20], VarUI4FromDisp
lea r8, str.CWrapKeyWithNCryptKeyStorage::wrapkey
mov ecx, 3
call fcn.140109c60
movzx eax, r12b
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.1400e6b50
add rsp, 0x98
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret