Function at 0x140176d90
Capabilities:
Generate random numbers via winapi

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x100
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x158], rbx
mov rax, qword [0x1403644c8]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov rdi, r8
mov rbx, rdx
mov r15, rcx
mov qword [rsp + 0x40], rcx
mov rsi, qword [rdx + 0x10]
cmp qword [rdx + 0x18], 8
jb 0x140176de3
mov rbx, qword [rdx]
movabs rax, 0x7ffffffffffffffe
cmp rsi, 8
jae 0x140176e08
movups xmm0, xmmword [rbx]
movups xmmword [rsp + 0x48], xmm0
mov r13d, 7
mov r14, qword [rsp + 0x48]
jmp 0x140176e3f
mov r13, rsi
or r13, 7
cmp r13, rax
cmova r13, rax
lea rdx, [r13 + 1]
lea rcx, [rsp + 0x48]
call fcn.140086a90
mov r14, rax
mov qword [rsp + 0x48], rax
lea r8, [rsi*2 + 2]
mov rdx, rbx
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov rcx, rsi
mov qword [rbp - 0x79], r13
mov qword [rsp + 0x58], rcx
movups xmm0, xmmword [str.0123456789abcdef]
movups xmmword [rbp - 0x19], xmm0
movups xmm1, xmmword [0x1402a4378]
movups xmmword [rbp - 9], xmm1
movzx eax, word [0x1402a4388]
mov word [rbp + 7], ax
movups xmm0, xmmword [str.123456789abcdef]
movups xmmword [rbp + 0xf], xmm0
xor ebx, ebx
lea r8d, [rbx + 0x20]
mov r12d, ebx
lea rax, [0x14028b1b8]
test rsi, rsi
je 0x140177016
lea rax, [rsp + 0x48]
cmp r13, 8
cmovae rax, r14
cmp word [rax + r12*2], 0x25
jne 0x140177000
cmp r8d, 0x20
jne 0x140176fb5
mov dword [rsp + 0x20], 0xf0000040
lea r9d, [r8 - 0x1f]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x140176f4d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 0x80090016
jne 0x140176f49
mov dword [rsp + 0x20], 0xf0000048
mov r9d, 1
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140176f0a
xor esi, esi
mov ebx, esi
jmp 0x140176f4f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 0x8009000f
jne 0x140176f49
mov dword [rsp + 0x20], 0xf0000040
mov r9d, 1
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140176f41
xor esi, esi
mov ebx, esi
jmp 0x140176f4f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test ebx, ebx
jne 0x140176f82
xor esi, esi
lea r8, [rbp + 0xf]
mov edx, reloc.WS2_32.dll_recv
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x140176f6f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
xor edx, edx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
test ebx, ebx
je 0x140176fa2
jmp 0x140176f84
xor esi, esi
test rdi, rdi
je 0x1401771f2
mov dword [rdi], ebx
test ebx, ebx
setne al
mov byte [rdi + 4], al
lea rax, [0x14028b1b8]
mov qword [rdi + 8], rax
test rdi, rdi
je 0x140176fb0
cmp dword [rdi], 0
jne 0x140177058
xor ebx, ebx
mov r8d, ebx
mov eax, r8d
test r8d, r8d
jns 0x140176fc1
lea eax, [r8 + 1]
sar eax, 1
cdqe
movsx eax, byte [rbp + rax + 0xf]
mov ecx, r8d
and ecx, 1
shl ecx, 2
sar eax, cl
inc r8d
lea rcx, [rsp + 0x48]
cmp r13, 8
cmovae rcx, r14
and eax, 0xf
movzx eax, word [rbp + rax*2 - 0x19]
mov word [rcx + r12*2], ax
mov r13, qword [rbp - 0x79]
mov rcx, qword [rsp + 0x58]
mov r14, qword [rsp + 0x48]
inc r12
cmp r12, rcx
jb 0x140176e90
mov rsi, rcx
lea rax, [0x14028b1b8]
test rdi, rdi
je 0x140177025
mov dword [rdi], ebx
mov byte [rdi + 4], 0
mov qword [rdi + 8], rax
mov qword [r15 + 0x10], rbx
mov qword [r15 + 0x18], rbx
lea rdi, [rsp + 0x48]
cmp r13, 8
cmovae rdi, r14
cmp rsi, 8
jae 0x140177147
movups xmm0, xmmword [rdi]
movups xmmword [r15], xmm0
mov qword [r15 + 0x18], 7
jmp 0x140177185
mov qword [r15 + 0x10], rsi
mov qword [r15 + 0x18], 7
mov word [r15], si
mov qword [rbp - 9], rsi
mov qword [rbp - 1], reloc.WS2_32.dll_ntohs
mov byte [rbp - 0x19], 0
xor r8d, r8d
lea rdx, [0x14027ae48]
lea rcx, [rbp - 0x19]
call fcn.140086e00
nop
mov rsi, qword [rbp - 9]
test rsi, rsi
je 0x1401770c4
lea rdi, [rbp - 0x19]
cmp qword [rbp - 1], 0x10
cmovae rdi, qword [rbp - 0x19]
lea rbx, [rbp - 0x19]
cmovae rbx, qword [rbp - 0x19]
call fcn.1401744f0
mov r9, rax
lea rdx, [rsi + rdi]
mov r8, r15
mov rcx, rbx
call fcn.1401739f0
nop
mov rdx, qword [rbp - 1]
cmp rdx, 0x10
jb 0x140177103
inc rdx
mov rcx, qword [rbp - 0x19]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1401770fd
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1401770fd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140082ab0
nop
cmp r13, 8
jb 0x140177142
lea rdx, [r13*2 + 2]
mov rax, r14
cmp rdx, 0x1000
jb 0x140177139
add rdx, 0x27
mov r14, qword [r14 - 8]
sub rax, r14
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140177139
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, r14
call fcn.140082ab0
nop
jmp 0x1401771c8
mov rbx, rsi
or rbx, 7
movabs rax, 0x7ffffffffffffffe
cmp rbx, rax
cmova rbx, rax
lea rdx, [rbx + 1]
mov rcx, r15
call fcn.140086a90
mov qword [r15], rax
lea r8, [rsi*2 + 2]
mov rdx, rdi
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov qword [r15 + 0x18], rbx
mov qword [r15 + 0x10], rsi
cmp r13, 8
jb 0x1401771c8
lea rdx, [r13*2 + 2]
mov rax, r14
cmp rdx, 0x1000
jb 0x1401771bf
add rdx, 0x27
mov r14, qword [r14 - 8]
sub rax, r14
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1401771bf
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
mov rcx, r14
call fcn.140082ab0
nop
mov rax, r15
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.1400e39a0
mov rbx, qword [rsp + 0x158]
add rsp, 0x100
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.140173560
nop
mov r8, rax
lea r9, str.boost::filesystem::unique_path
mov edx, ebx
lea rcx, [rbp - 0x69]
call fcn.140173930
lea rdx, [0x14035ae58]
lea rcx, [rbp - 0x69]
call sub.VCRUNTIME140.dll__CxxThrowException
int3