Function at 0x140162fe0
Capabilities:
Create directory
Generate random numbers via winapi

Disassembly:
push rbx
sub rsp, 0x40
mov rbx, rcx
mov rax, 0xffffffffffffffff
mov rcx, qword [rcx + 0x150]
nop word [rax + rax]
inc rax
cmp word [rcx + rax*2], 0
jne 0x140163000
mov qword [rsp + 0x68], rsi
cmp rax, 6
jb 0x14016334c
lea rsi, [rcx + rax*2]
mov r8d, 6
lea rcx, [rsi - 0xc]
lea rdx, str.XXXXXX
call fcn.14034451c
test eax, eax
jne 0x14016334c
lea r9d, [rax + 1]
mov dword [rsp + 0x20], 0xf0000000
xor r8d, r8d
lea rcx, [rsp + 0x58]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x140163083
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
mov dword [rbx + 0x14c], eax
call fcn.14016e340
movsxd rcx, eax
mov qword [rbx + 0x88], rcx
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rbx
ret
mov qword [rsp + 0x60], rbp
movabs rbp, 0x842108421084211
mov qword [rsp + 0x38], rdi
mov edi, 0x7fffffff
mov qword [rsp + 0x30], r14
lea r14, str.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
nop dword [rax + rax]
mov rcx, qword [rsp + 0x58]
lea r8, [rsp + 0x50]
mov edx, 8
call qword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x1401632dd
mov rcx, qword [rsp + 0x50]
mov rax, rbp
mul rcx
mov rax, rcx
sub rax, rdx
shr rax, 1
add rax, rdx
shr rax, 5
imul rax, rax, 0x3e
sub rcx, rax
movzx eax, word [r14 + rcx*2]
mov word [rsi - 0xc], ax
mov rax, rbp
mov rcx, qword [rsp + 0x50]
mul rcx
mov rax, rbp
sub rcx, rdx
shr rcx, 1
add rcx, rdx
shr rcx, 5
mul rcx
mov qword [rsp + 0x50], rcx
mov rax, rcx
sub rax, rdx
shr rax, 1
add rax, rdx
shr rax, 5
imul rax, rax, 0x3e
sub rcx, rax
movzx eax, word [r14 + rcx*2]
mov word [rsi - 0xa], ax
mov rax, rbp
mov rcx, qword [rsp + 0x50]
mul rcx
mov rax, rbp
sub rcx, rdx
shr rcx, 1
add rcx, rdx
shr rcx, 5
mul rcx
mov qword [rsp + 0x50], rcx
mov rax, rcx
sub rax, rdx
shr rax, 1
add rax, rdx
shr rax, 5
imul rax, rax, 0x3e
sub rcx, rax
movzx eax, word [r14 + rcx*2]
mov word [rsi - 8], ax
mov rax, rbp
mov rcx, qword [rsp + 0x50]
mul rcx
mov rax, rbp
sub rcx, rdx
shr rcx, 1
add rcx, rdx
shr rcx, 5
mul rcx
mov qword [rsp + 0x50], rcx
mov rax, rcx
sub rax, rdx
shr rax, 1
add rax, rdx
shr rax, 5
imul rax, rax, 0x3e
sub rcx, rax
movzx eax, word [r14 + rcx*2]
mov word [rsi - 6], ax
mov rax, rbp
mov rcx, qword [rsp + 0x50]
mul rcx
mov rax, rbp
sub rcx, rdx
shr rcx, 1
add rcx, rdx
shr rcx, 5
mul rcx
mov rax, rcx
mov qword [rsp + 0x50], rcx
sub rax, rdx
shr rax, 1
add rax, rdx
shr rax, 5
imul rax, rax, 0x3e
sub rcx, rax
movzx eax, word [r14 + rcx*2]
mov word [rsi - 4], ax
mov rax, rbp
mov rcx, qword [rsp + 0x50]
mul rcx
mov rax, rbp
sub rcx, rdx
shr rcx, 1
add rcx, rdx
shr rcx, 5
mul rcx
mov qword [rsp + 0x50], rcx
mov rax, rcx
sub rax, rdx
shr rax, 1
add rax, rdx
shr rax, 5
imul rax, rax, 0x3e
sub rcx, rax
movzx eax, word [r14 + rcx*2]
mov word [rsi - 2], ax
mov rax, rbp
mov rcx, qword [rsp + 0x50]
mul rcx
sub rcx, rdx
shr rcx, 1
add rcx, rdx
shr rcx, 5
mov qword [rsp + 0x50], rcx
mov rcx, qword [rbx + 0x150]
call fcn.1403429c8
test eax, eax
je 0x1401632a3
call fcn.1403379a0
cmp dword [rax], 0x11
jne 0x140163289
add edi, 0xffffffff
jne 0x1401630b0
jmp 0x1401632fa
mov qword [rbx + 0x88], 0xffffffffffffffff
call fcn.140337980
mov ecx, dword [rax]
mov dword [rbx + 0x14c], ecx
jmp 0x1401632eb
mov rcx, qword [rbx + 0x98]
mov rax, 0xffffffffffffffff
inc rax
cmp byte [rcx + rax], 0
jne 0x1401632b1
add rcx, 0xfffffffffffffffa
lea rdx, [rsi - 0xc]
add rcx, rax
mov r8d, 6
call fcn.140344478
mov qword [rbx + 0x88], 0
jmp 0x1401632fa
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rbx + 0x14c], eax
mov ecx, eax
call fcn.14016e340
movsxd rcx, eax
mov qword [rbx + 0x88], rcx
mov rcx, qword [rsp + 0x58]
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov r14, qword [rsp + 0x30]
test edi, edi
mov rdi, qword [rsp + 0x38]
mov rbp, qword [rsp + 0x60]
jne 0x140163361
mov qword [rbx + 0x88], 0xffffffffffffffff
call fcn.140337980
mov ecx, dword [rax]
mov dword [rbx + 0x14c], ecx
call fcn.14016e340
movsxd rcx, eax
mov qword [rbx + 0x88], rcx
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rbx
ret
mov qword [rbx + 0x88], 0xfffffffffffff019
mov dword [rbx + 0x14c], 0x57
mov rsi, qword [rsp + 0x68]
add rsp, 0x40
pop rbx
ret