Function at 0x10005956c
Capabilities:
Generate random numbers via winapi

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov qword [rax + 8], rcx
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x170
mov rax, qword [rsp + 0x1c8]
xor r12d, r12d
xor r13d, r13d
and qword [rax], r12
mov rax, qword [rsp + 0x1d0]
and qword [rsp + 0x78], r12
and qword [rax], r12
and qword [rsp + 0x30], r12
and qword [rsp + 0x40], r12
mov rbp, r9
mov r15, rcx
mov rsi, r8
mov r14, rdx
lea r9d, [r13 + 1]
lea rcx, [rsp + 0x40]
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x58], r12
mov dword [rsp + 0x20], 0xf0000000
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
lea edi, [r13 + 2]
test eax, eax
jne 0x100059607
call sub.KERNEL32.dll_GetLastError
mov ecx, eax
call fcn.1000b7bec
mov edx, 0x9a5013e
jmp 0x100059634
mov rcx, qword [rsp + 0x40]
lea r9, [rsp + 0x30]
mov r8d, 0x2000001
mov edx, edi
call qword [sym.imp.ADVAPI32.dll_CryptGenKey]
test eax, eax
jne 0x100059645
call sub.KERNEL32.dll_GetLastError
mov ecx, eax
call fcn.1000b7bec
mov edx, 0x9b1013e
mov r8d, eax
xor r9d, r9d
xor ecx, ecx
mov ebx, eax
call fcn.1000b51b8
jmp 0x100059647
xor ebx, ebx
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x100059657
call qword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
test ebx, ebx
je 0x100059668
mov r8d, ebx
mov edx, 0xb5f013e
jmp 0x100059c56
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x90]
lea r9, [rsp + 0x50]
mov r8d, edi
mov edx, edi
mov qword [rsp + 0x20], rax
call fcn.1000b8360
test eax, eax
jne 0x1000596b7
call sub.KERNEL32.dll_GetLastError
mov ecx, eax
call fcn.1000b7bec
xor r9d, r9d
mov edx, 0xb69013e
mov r8d, eax
xor ecx, ecx
mov ebx, eax
call fcn.1000b51b8
mov r13, qword [rsp + 0x50]
jmp 0x100059c78
mov r13, qword [rsp + 0x50]
lea r8, [rsp + 0x58]
mov edx, dword [r13 + 0x18]
mov rcx, qword [r13 + 0x20]
lea r9, [r13 + 0x18]
call fcn.1000bdf30
mov ebx, eax
test eax, eax
je 0x1000596f4
xor r9d, r9d
mov r8d, eax
mov edx, 0xb7e013e
xor ecx, ecx
call fcn.1000b51b8
mov r12, qword [rsp + 0x58]
jmp 0x100059c78
mov eax, dword [r13 + 0x18]
cmp eax, 0xa0000
jbe 0x10005970b
mov ebx, 0x80070216
mov edx, 0xb2f013e
jmp 0x100059728
lea edx, [rax + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r12, rax
test rax, rax
jne 0x10005973c
mov ebx, 0x8007000e
mov edx, 0xb35013e
mov r8d, ebx
xor r9d, r9d
xor ecx, ecx
call fcn.1000b51b8
mov r12, qword [rsp + 0x58]
jmp 0x10005976b
mov r8d, dword [r13 + 0x18]
mov rdx, qword [rsp + 0x58]
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov r11d, dword [r13 + 0x18]
mov ecx, 1
mov byte [r11 + r12], cl
add dword [r13 + 0x18], ecx
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_LocalFree]
xor ebx, ebx
test ebx, ebx
je 0x10005977c
mov r8d, ebx
mov edx, 0xb81013e
jmp 0x100059c56
lea rcx, [rsp + 0xa0]
xor edx, edx
mov r8d, reloc.certcli.dll_Ordinal_208
mov qword [r13 + 0x20], r12
call sub.msvcrt.dll_memset
mov rcx, qword [rsp + 0x40]
and dword [rsp + 0xa0], 0
mov ebx, 4
lea r8, [rsp + 0x48]
mov edx, ebx
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x1000597d8
call sub.KERNEL32.dll_GetLastError
mov ecx, eax
call fcn.1000b7bec
xor r9d, r9d
mov edx, 0xb09013e
mov r8d, eax
xor ecx, ecx
call fcn.1000b51b8
jmp 0x100059801
cmp dword [rsi], ebx
jne 0x1000597ea
mov rax, qword [rsi + 8]
test rax, rax
je 0x1000597ea
mov cl, byte [rax + 3]
jmp 0x1000597ee
mov cl, byte [rsp + 0x4b]
test cl, cl
movzx eax, cl
mov edx, 0x3a
cmove eax, edx
and al, 0x7f
mov byte [rsp + 0x4b], al
movdqu xmm0, xmmword [rbp]
lea rax, [rsp + 0x48]
lea rcx, [rsp + 0x80]
mov qword [rsp + 0xb0], rax
lea rax, [0x100016388]
mov dword [rsp + 0xa8], ebx
movdqu xmmword [rsp + 0xd0], xmm0
mov qword [rsp + 0xb8], rax
call qword [sym.imp.KERNEL32.dll_GetSystemTime]
movzx ecx, word [rsp + 0x80]
xor r11d, r11d
mov qword [rsp + 0x60], r11
mov qword [rsp + 0x68], r11
mov word [rsp + 0x60], cx
lea eax, [r11 + 0xc]
lea r8d, [r11 + 1]
lea edx, [r11 + 6]
mov word [rsp + 0x68], ax
movzx eax, word [rsp + 0x82]
mov word [rsp + 0x66], r8w
sub ax, di
cmp ax, bx
ja 0x10005988c
mov ax, r8w
mov word [rsp + 0x62], ax
jmp 0x100059893
mov eax, edx
mov word [rsp + 0x62], dx
cmp ax, word [rsp + 0x82]
jbe 0x1000598a6
sub cx, r8w
mov word [rsp + 0x60], cx
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
jne 0x1000598d3
call sub.KERNEL32.dll_GetLastError
mov ecx, eax
call fcn.1000b7bec
mov edx, 0xbb9013e
jmp 0x100059c51
mov rax, qword [rsp + 0xe0]
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0xe0]
mov qword [rsp + 0xe8], rax
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x30]
test r15, r15
jne 0x100059a48
mov r11d, 0xfff6
add word [rsp + 0x30], r11w
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea ebx, [r15 + 0x1d]
lea esi, [rbx - 1]
lea edi, [rbx + 1]
lea ebp, [rbx - 0x19]
test eax, eax
jne 0x1000599aa
lea r13d, [r15 + 6]
lea r15d, [rbx - 0x1b]
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x57
jne 0x10005999d
movzx eax, word [rsp + 0x32]
cmp ax, r15w
jne 0x100059963
cmp word [rsp + 0x36], bx
jbe 0x10005995a
mov word [rsp + 0x36], bx
jmp 0x100059986
jne 0x10005999d
mov word [rsp + 0x36], si
jmp 0x100059986
cmp ax, 9
je 0x10005997a
cmp ax, bp
je 0x10005997a
cmp ax, r13w
je 0x10005997a
cmp ax, 0xb
jne 0x10005999d
cmp word [rsp + 0x36], di
jbe 0x10005999d
mov word [rsp + 0x36], di
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x100059937
mov r13, qword [rsp + 0x50]
mov r15, qword [rsp + 0x1a0]
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0xe8]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
add word [rsp + 0x30], 0xa
jmp 0x100059a2c
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x57
jne 0x100059b98
movzx eax, word [rsp + 0x32]
mov ecx, 2
cmp ax, cx
jne 0x1000599fd
cmp word [rsp + 0x36], bx
jbe 0x1000599f0
mov word [rsp + 0x36], bx
jmp 0x100059a2c
jne 0x100059b98
mov word [rsp + 0x36], si
jmp 0x100059a2c
cmp ax, 9
je 0x100059a1c
cmp ax, bp
je 0x100059a1c
mov ecx, 6
cmp ax, cx
je 0x100059a1c
cmp ax, 0xb
jne 0x100059b98
cmp word [rsp + 0x36], di
jbe 0x100059b98
mov word [rsp + 0x36], di
lea rdx, [rsp + 0xe8]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x1000599c5
jmp 0x100059b98
mov r11d, 0xfffe
add word [rsp + 0x30], r11w
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov ebx, 0x1d
lea esi, [rbx - 1]
lea edi, [rbx + 1]
lea ebp, [rbx - 0x19]
test eax, eax
jne 0x100059ae7
lea r13d, [rbx - 0x17]
lea r15d, [rbx - 0x1b]
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x57
jne 0x100059ada
movzx eax, word [rsp + 0x32]
cmp ax, r15w
jne 0x100059aa0
cmp word [rsp + 0x36], bx
jbe 0x100059a97
mov word [rsp + 0x36], bx
jmp 0x100059ac3
jne 0x100059ada
mov word [rsp + 0x36], si
jmp 0x100059ac3
cmp ax, 9
je 0x100059ab7
cmp ax, bp
je 0x100059ab7
cmp ax, r13w
je 0x100059ab7
cmp ax, 0xb
jne 0x100059ada
cmp word [rsp + 0x36], di
jbe 0x100059ada
mov word [rsp + 0x36], di
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x100059a74
mov r13, qword [rsp + 0x50]
mov r15, qword [rsp + 0x1a0]
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0xe8]
call qword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
mov r11d, 0xffff
lea rdx, [rsp + 0xe8]
add word [rsp + 0x30], r11w
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
jne 0x100059b98
lea r13d, [rax + 6]
lea r15d, [rax + 2]
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x57
jne 0x100059b8b
movzx eax, word [rsp + 0x32]
cmp ax, r15w
jne 0x100059b51
cmp word [rsp + 0x36], bx
jbe 0x100059b48
mov word [rsp + 0x36], bx
jmp 0x100059b74
jne 0x100059b8b
mov word [rsp + 0x36], si
jmp 0x100059b74
cmp ax, 9
je 0x100059b68
cmp ax, bp
je 0x100059b68
cmp ax, r13w
je 0x100059b68
cmp ax, 0xb
jne 0x100059b8b
cmp word [rsp + 0x36], di
jbe 0x100059b8b
mov word [rsp + 0x36], di
lea rdx, [rsp + 0xe8]
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
test eax, eax
je 0x100059b25
mov r13, qword [rsp + 0x50]
mov r15, qword [rsp + 0x1a0]
mov rax, qword [rsp + 0x1c0]
lea rcx, [rsp + reloc.certcli.dll_Ordinal_256]
mov rdx, r13
mov r8d, 0x30
movdqu xmm0, xmmword [rax]
movdqu xmmword [rsp + 0xf0], xmm0
call sub.msvcrt.dll_memcpy
test r14, r14
je 0x100059bd2
mov rdx, qword [r14 + 0x18]
add rdx, 0x60
jmp 0x100059bda
lea rdx, [rsp + reloc.certcli.dll_Ordinal_256]
mov rcx, qword [rsp + 0x40]
lea rax, [rsp + 0x70]
test r15, r15
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x78]
lea r9, [0x100016388]
lea r8, [rsp + 0xa0]
cmovne rcx, r15
mov qword [rsp + 0x20], rax
call fcn.1000593b0
mov ebx, eax
test eax, eax
je 0x100059c1b
mov edx, 0xbdb013e
jmp 0x100059c53
mov r8d, dword [rsp + 0x70]
mov rdx, qword [rsp + 0x78]
mov ecx, 1
call qword [sym.imp.CRYPT32.dll_CertCreateCertificateContext]
mov rcx, qword [rsp + 0x1d0]
mov qword [rcx], rax
test rax, rax
jne 0x100059c62
call sub.KERNEL32.dll_GetLastError
mov ecx, eax
call fcn.1000b7bec
mov edx, 0xbe5013e
mov ebx, eax
mov r8d, eax
xor r9d, r9d
xor ecx, ecx
call fcn.1000b51b8
jmp 0x100059c78
mov rax, qword [rsp + 0x40]
mov rcx, qword [rsp + 0x1c8]
and qword [rsp + 0x40], 0
mov qword [rcx], rax
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x100059c8a
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x100059c9a
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r13, r13
je 0x100059ca8
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LocalFree]
test r12, r12
je 0x100059cb6
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea r11, [rsp + 0x170]
mov eax, ebx
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret