Function at 0x180016aa0
Capabilities:
Create directory
Get common file path
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x4a0
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x180056150]
xor rax, rsp
mov qword [rsp + 0x490], rax
mov r14, r9
mov qword [rsp + 0x30], r9
mov r15d, r8d
mov r13, rdx
mov qword [rsp + 0x20], rdx
mov rbx, rcx
mov rax, qword [rdx + 0x18]
add rax, rax
cmp rax, 0xbb8
jae 0x180016b03
mov eax, 1
jmp 0x180016d75
xor esi, esi
mov word [rsp + 0x70], si
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x72]
call fcn.180022ca0
lea rdx, [rsp + 0x70]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
xor edx, edx
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea r9, [rsp + 0x280]
xor r8d, r8d
lea rdx, str.QZTMP
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetTempFileNameW]
lea r8, [0x180044378]
lea rdx, [rsp + 0x280]
lea rcx, [rsp + 0x28]
call fcn.180025cc4
mov rdi, qword [rsp + 0x28]
cmp rdi, rsi
jne 0x180016b80
xor eax, eax
jmp 0x180016d75
mov rcx, qword [rbx + 0x80]
sub rcx, qword [rbx + 0x78]
movabs r8, 0x6666666666666667
mov rax, r8
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov ebp, esi
mov r12d, esi
test edx, edx
jle 0x180016cd1
movsxd r14, edx
xor r13d, r13d
mov rax, qword [rbx + 0xb0]
sub rax, qword [rbx + 0xa8]
sar rax, 2
cmp rsi, rax
jb 0x180016be2
call fcn.180025824
movabs r8, 0x6666666666666667
mov rax, qword [rbx + 0xa8]
test dword [rax + rsi*4], r15d
je 0x180016ca9
movsxd rdi, r12d
mov rcx, qword [rbx + 0x80]
sub rcx, qword [rbx + 0x78]
mov rax, r8
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rdi, rdx
jb 0x180016c1f
call fcn.180025824
lea rcx, [rdi + rdi*4]
mov rax, qword [rbx + 0x78]
lea rdx, [rax + rcx*8]
mov qword [rsp + 0x60], 7
mov qword [rsp + 0x58], r13
mov word [rsp + 0x48], r13w
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rcx, [rsp + 0x40]
call fcn.180007810
nop
mov r8d, 2
lea rdx, [0x180044398]
lea rcx, [rsp + 0x40]
call fcn.180013544
lea rcx, [rsp + 0x48]
cmp qword [rsp + 0x60], 8
cmovae rcx, qword [rsp + 0x48]
mov rdi, qword [rsp + 0x58]
mov r9, qword [rsp + 0x28]
mov r8, rdi
mov edx, 2
call fcn.180025ae4
cmp rax, rdi
jne 0x180016c97
inc ebp
cmp qword [rsp + 0x60], 8
jb 0x180016ca9
mov rcx, qword [rsp + 0x48]
call fcn.1800228ac
inc r12d
inc rsi
cmp rsi, r14
movabs r8, 0x6666666666666667
jl 0x180016bbc
mov rdi, qword [rsp + 0x28]
mov r13, qword [rsp + 0x20]
mov r14, qword [rsp + 0x30]
mov rcx, rdi
call fcn.1800258d0
xor esi, esi
cmp eax, esi
je 0x180016ce6
xor eax, eax
jmp 0x180016d75
cmp ebp, esi
jne 0x180016cf1
xor eax, eax
jmp 0x180016d75
lea rcx, [0x180056020]
mov rax, qword [0x180056020]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x280]
mov r8, r14
lea rdx, str.___s_s_
lea rcx, [rsp + 0x20]
call fcn.18000da7c
mov rcx, r13
call fcn.18001c00c
xor eax, eax
or rbp, 0xffffffffffffffff
mov rcx, rbp
mov rbx, qword [rsp + 0x20]
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rbx
mov rcx, r13
call fcn.180013544
nop
lea rdx, [rbx - 0x18]
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
add eax, ebp
cmp eax, esi
jg 0x180016d70
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov eax, 1
mov rcx, qword [rsp + 0x490]
xor rcx, rsp
call fcn.180022fd0
mov rbx, qword [rsp + 0x4f0]
add rsp, 0x4a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret