Function at 0x140014440
Capabilities:
Check if file exists
Create directory
Generate random numbers via winapi
Get file attributes
Query environment variable

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x9f8]
sub rsp, 0xaf8
mov rax, qword [0x14016e028]
xor rax, rsp
mov qword [rbp + 0x9e0], rax
lea rax, [rbp + 0x20]
mov qword [rsp + 0x40], rcx
mov qword [rbp + 0x10], rax
xor r14d, r14d
lea rax, [0x1401430b0]
mov qword [rbp - 0x28], r8
mov qword [rsp + 0x48], rax
xor ecx, ecx
lea rax, [rbp + 0x10]
mov dword [rbp + 0x18], r14d
mov qword [rsp + 0x70], rax
mov r12, r9
mov rsi, r8
mov dword [rbp + 0x1c], 0x80
mov rbx, rdx
call fcn.14013e7e8
movzx r9d, byte [rbx + 0x10]
lea rdx, [rsp + 0x48]
mov r8, qword [rbx]
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], r14
mov dword [rsp + 0x68], r14d
call fcn.140023bc0
movzx r9d, byte [rbx + 0x11]
lea rdx, [rsp + 0x48]
mov r8, qword [rbx + 8]
call fcn.140023bc0
cmp dword [rsp + 0x68], 1
lea rax, [0x140143060]
mov qword [rsp + 0x48], rax
jne 0x140014506
mov rcx, qword [rsp + 0x50]
call fcn.14013e7e8
cmp byte [rbp + 0xa60], r14b
je 0x140014736
lea rax, [rbp + 0x10]
mov word [rsp + 0x58], 0x106
mov edx, 2
mov qword [rsp + 0x48], rax
lea rcx, [rsp + 0x48]
call fcn.140015bb0
test al, al
jne 0x140014736
lea rax, [rbp + 0xb0]
mov dword [rbp + 0xac], 0x80
mov qword [rbp + 0xa0], rax
lea rdi, [rbp + 0x9c0]
lea rax, [0x1401497e8]
mov dword [rbp + 0xa8], r14d
mov qword [rbp + 0x9c0], rax
lea rax, str.TEMP
mov qword [rbp + 0x9c8], rax
lea rax, str.USERPROFILE
mov qword [rbp + 0x9d0], rax
nop word [rax + rax]
mov rbx, qword [rdi]
lea rax, [rbp + 0x1c0]
mov edx, 0x400
mov qword [rbp + 0x1b0], rax
mov eax, edx
mov dword [rbp + 0x1b8], r14d
mov dword [rbp + 0x1bc], edx
mov ecx, edx
cmp rcx, rax
jae 0x1400145de
mov r9d, 2
lea rdx, [rbp + 0x1c0]
mov r8, rax
lea rcx, [rbp + 0x1b0]
call fcn.14001d070
mov edx, dword [rbp + 0x1bc]
mov r8d, edx
mov rcx, rbx
mov rdx, qword [rbp + 0x1b0]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov eax, eax
test rax, rax
je 0x14001466d
mov edx, dword [rbp + 0x1bc]
cmp rax, rdx
ja 0x1400145b5
mov r8, qword [rbp + 0x1b0]
lea rcx, [rbp + 0xa0]
mov qword [rsp + 0x20], rcx
mov r9d, eax
lea rcx, [rbp - 0x50]
mov dword [rbp + 0x1b8], eax
call fcn.140018b80
cmp dword [rbp - 0x50], r14d
lea rax, [rbp + 0x1c0]
mov rcx, qword [rbp + 0x1b0]
sete bl
cmp rcx, rax
je 0x140014648
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
test bl, bl
je 0x140014686
lea rcx, [rbp + 0xa0]
call fcn.1400157c0
lea r8, [rbp + 0xa0]
lea rcx, [rbp + 0x9c0]
call fcn.140016210
jmp 0x1400146b4
mov rcx, qword [rbp + 0x1b0]
lea rax, [rbp + 0x1c0]
cmp rcx, rax
je 0x140014686
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add rdi, 8
lea rax, [rbp + 0x9d8]
cmp rdi, rax
jne 0x140014590
lea r8, [0x14014981f]
lea rdx, str.C:Temp
lea rcx, [rbp + 0xa0]
call fcn.140008430
lea rax, [rbp + 0x10]
mov byte [rsp + 0x59], 1
mov qword [rbp + 0x9c0], rax
lea r9, [rbp - 0x20]
lea rax, [rsp + 0x48]
mov byte [rsp + 0x58], 1
mov qword [rsp + 0x28], rax
lea r8, [rbp + 0x9c0]
lea rax, [rbp - 0x50]
mov word [rbp - 0x40], 0x101
mov edx, 2
mov qword [rsp + 0x20], rax
lea rcx, [rbp + 0xa0]
mov word [rbp - 0x10], 0x101
mov word [rbp + 0x9d0], 0x106
call fcn.140015100
lea rdx, [rbp + 0xa0]
lea rcx, [rbp + 0x10]
call fcn.140018d40
mov rcx, qword [rbp + 0xa0]
lea rax, [rbp + 0xb0]
cmp rcx, rax
je 0x140014736
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rax, [rbp + 0x10]
cmp r12, rax
je 0x1400147ce
mov ebx, dword [rbp + 0x18]
mov edi, dword [r12 + 8]
cmp rdi, rbx
jb 0x140014767
test rbx, rbx
je 0x1400147c9
mov rdx, qword [rbp + 0x10]
mov r8d, ebx
mov rcx, qword [r12]
call sub.VCRUNTIME140.dll_memmove
jmp 0x1400147c9
mov eax, dword [r12 + 0xc]
cmp rax, rbx
jae 0x140014791
lea rdx, [r12 + 0x10]
mov dword [r12 + 8], r14d
mov r9d, 1
mov r8, rbx
mov rcx, r12
mov rdi, r14
call fcn.14001d070
jmp 0x1400147a6
test rdi, rdi
je 0x1400147a6
mov rdx, qword [rbp + 0x10]
mov r8, rdi
mov rcx, qword [r12]
call sub.VCRUNTIME140.dll_memmove
mov rax, qword [rbp + 0x10]
mov rcx, qword [r12]
mov r8d, dword [rbp + 0x18]
add rcx, rdi
add r8, rax
lea rdx, [rax + rdi]
cmp rdx, r8
je 0x1400147c9
sub r8, rdx
call sub.VCRUNTIME140.dll_memcpy
mov dword [r12 + 8], ebx
mov eax, dword [r12 + 8]
cmp eax, dword [r12 + 0xc]
jb 0x1400147f5
lea rdx, [r12 + 0x10]
mov r9d, 1
xor r8d, r8d
mov rcx, r12
call fcn.14001d070
mov eax, dword [r12 + 8]
mov ecx, eax
lea rbx, [0x14016e048]
mov rax, qword [r12]
mov r13d, 0x80
mov byte [rcx + rax], r14b
mov r15d, dword [rbp + 0x18]
mov edi, r14d
mov ecx, dword [rbp + 0xa70]
test r15d, r15d
je 0x1400148bc
mov rax, qword [rbp + 0x10]
mov esi, edi
cmp byte [rsi + rax], 0x25
jne 0x14001489d
mov r9d, 1
mov dword [rsp + 0x20], 0xf0000000
xor r8d, r8d
lea rcx, [rbp - 0x30]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
je 0x140014bb8
mov rbx, qword [rbp - 0x30]
lea r8, [rbp - 0x70]
mov rcx, rbx
mov edx, 4
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x140014bc5
mov r14d, dword [rbp - 0x70]
test rbx, rbx
je 0x140014885
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, r14d
lea rcx, str.0123456789abcdef
and eax, 0xf
movzx ecx, byte [rax + rcx]
mov rax, qword [r12]
mov byte [rsi + rax], cl
inc edi
cmp edi, r15d
jne 0x140014822
mov ecx, dword [rbp + 0xa70]
lea rbx, [0x14016e048]
mov rsi, qword [rbp - 0x28]
xor r14d, r14d
mov rax, qword [r12]
mov byte [rsp + 0x59], 1
test ecx, ecx
je 0x140014a79
cmp ecx, 1
je 0x1400149e7
cmp byte [rax], 0
je 0x1400148e7
mov qword [rsp + 0x48], rax
mov byte [rsp + 0x58], 3
jmp 0x1400148ec
mov byte [rsp + 0x58], 1
lea rax, [rbp + 0xb0]
mov dword [rbp + 0xa8], r14d
lea r8, [rbp + 0xa0]
mov qword [rbp + 0xa0], rax
lea rdx, [rsp + 0x48]
mov dword [rbp + 0xac], 0x80
lea rcx, [rbp]
call fcn.140016a70
cmp dword [rbp], 0
mov rcx, qword [rbp + 0xa0]
je 0x140014938
movaps xmm0, xmmword [rbp]
movdqa xmmword [rbp - 0x80], xmm0
jmp 0x14001499b
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x14001498c
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [rax - 2]
cmp ecx, 1
jbe 0x14001496f
mov edx, eax
lea rcx, [rbp - 0x80]
call fcn.14001c470
mov rcx, qword [rbp + 0xa0]
lea rdx, [rbp + 0xb0]
cmp rcx, rdx
jmp 0x1400149a5
lea rax, [0x14016e058]
mov dword [rbp - 0x20], 2
mov qword [rbp - 0x18], rax
movaps xmm0, xmmword [rbp - 0x20]
movdqa xmmword [rbp - 0x80], xmm0
jmp 0x140014994
mov dword [rbp - 0x80], r14d
mov qword [rbp - 0x78], rbx
mov rcx, qword [rbp + 0xa0]
lea rax, [rbp + 0xb0]
cmp rcx, rax
je 0x1400149ad
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, qword [rbp - 0x78]
mov rcx, qword [0x14016e060]
movaps xmm1, xmmword [rbp - 0x80]
cmp qword [rax + 8], rcx
jne 0x1400149cc
cmp dword [rbp - 0x80], 2
je 0x140014b6c
cmp dword [rbp - 0x80], 0
je 0x140014b4d
mov rbx, qword [rsp + 0x40]
movaps xmm0, xmmword [rbp - 0x80]
movups xmmword [rbx], xmm0
jmp 0x140014b7f
cmp byte [rax], 0
je 0x1400149f8
mov qword [rsp + 0x48], rax
mov byte [rsp + 0x58], 3
jmp 0x1400149fd
mov byte [rsp + 0x58], 1
mov dword [rsp + 0x28], r14d
lea rdx, [rsp + 0x48]
mov r9d, 1
mov dword [rsp + 0x20], 3
mov r8, rsi
lea rcx, [rbp + 0x9c0]
call fcn.140018900
movaps xmm1, xmmword [rbp + 0x9c0]
movd ecx, xmm1
test ecx, ecx
je 0x140014b6c
movdqa xmm0, xmm1
psrldq xmm0, 8
movq rax, xmm0
mov rdx, qword [rax + 8]
mov rax, qword [0x14016e060]
cmp rdx, rax
jne 0x140014a6c
cmp ecx, 0x11
je 0x140014b4d
cmp rdx, rax
jne 0x140014a6c
cmp ecx, 0xd
je 0x140014b4d
mov rbx, qword [rsp + 0x40]
movups xmmword [rbx], xmm1
jmp 0x140014b7f
cmp byte [rax], 0
je 0x140014a8a
mov qword [rsp + 0x48], rax
mov byte [rsp + 0x58], 3
jmp 0x140014a8f
mov byte [rsp + 0x58], 1
lea rax, [rbp + 0xb0]
mov dword [rbp + 0xa8], r14d
lea r8, [rbp + 0xa0]
mov qword [rbp + 0xa0], rax
lea rdx, [rsp + 0x48]
mov dword [rbp + 0xac], 0x80
lea rcx, [rbp - 0x50]
call fcn.140016a70
cmp dword [rbp - 0x50], 0
mov rcx, qword [rbp + 0xa0]
je 0x140014adb
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x60], xmm0
jmp 0x140014b1a
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140014b0b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp - 0x60]
call fcn.14001c470
mov rcx, qword [rbp + 0xa0]
lea rdx, [rbp + 0xb0]
cmp rcx, rdx
jmp 0x140014b24
mov rcx, qword [rbp + 0xa0]
mov dword [rbp - 0x60], r14d
mov qword [rbp - 0x58], rbx
lea rax, [rbp + 0xb0]
cmp rcx, rax
je 0x140014b2c
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, dword [rbp - 0x60]
movaps xmm1, xmmword [rbp - 0x60]
test edx, edx
je 0x140014b6c
mov rax, qword [rbp - 0x58]
mov rcx, qword [0x14016e060]
cmp qword [rax + 8], rcx
jne 0x140014b5e
cmp edx, 0x11
jne 0x140014b5e
dec r13d
test r13d, r13d
jle 0x140014a6c
jmp 0x14001480c
mov rbx, qword [rsp + 0x40]
movaps xmm0, xmmword [rbp - 0x60]
movups xmmword [rbx], xmm0
jmp 0x140014b7f
mov rbx, qword [rsp + 0x40]
lea rax, [0x14016e048]
mov dword [rbx], r14d
mov qword [rbx + 8], rax
mov rcx, qword [rbp + 0x10]
lea rax, [rbp + 0x20]
cmp rcx, rax
je 0x140014b92
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rax, rbx
mov rcx, qword [rbp + 0x9e0]
xor rcx, rsp
call fcn.14013e7c0
add rsp, 0xaf8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rcx, str.Could_not_acquire_a_cryptographic_context
call fcn.140013b90
int3
lea rcx, str.Could_not_generate_a_random_number
call fcn.140013b90
int3