Function at 0x18001c054
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 [0x1800a8120]
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 0x18001c0b7
mov eax, 1
jmp 0x18001c329
xor esi, esi
mov word [rsp + 0x70], si
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x72]
call fcn.18005c800
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, [0x180089830]
lea rdx, [rsp + 0x280]
lea rcx, [rsp + 0x28]
call fcn.18005f848
mov rdi, qword [rsp + 0x28]
cmp rdi, rsi
jne 0x18001c134
xor eax, eax
jmp 0x18001c329
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 0x18001c285
movsxd r14, edx
xor r13d, r13d
mov rax, qword [rbx + 0xb0]
sub rax, qword [rbx + 0xa8]
sar rax, 2
cmp rsi, rax
jb 0x18001c196
call fcn.18005e62c
movabs r8, 0x6666666666666667
mov rax, qword [rbx + 0xa8]
test dword [rax + rsi*4], r15d
je 0x18001c25d
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 0x18001c1d3
call fcn.18005e62c
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.1800017a4
nop
mov r8d, 2
lea rdx, [0x180089850]
lea rcx, [rsp + 0x40]
call fcn.180018530
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.18005f668
cmp rax, rdi
jne 0x18001c24b
inc ebp
cmp qword [rsp + 0x60], 8
jb 0x18001c25d
mov rcx, qword [rsp + 0x48]
call fcn.18005c410
inc r12d
inc rsi
cmp rsi, r14
movabs r8, 0x6666666666666667
jl 0x18001c170
mov rdi, qword [rsp + 0x28]
mov r13, qword [rsp + 0x20]
mov r14, qword [rsp + 0x30]
mov rcx, rdi
call fcn.18005f454
xor esi, esi
cmp eax, esi
je 0x18001c29a
xor eax, eax
jmp 0x18001c329
cmp ebp, esi
jne 0x18001c2a5
xor eax, eax
jmp 0x18001c329
lea rcx, case.0x180031f8c.6
mov rax, qword [case.0x180031f8c.6]
call qword [rax + Ordinal_26]
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.180010c8c
mov rcx, r13
call fcn.180020fc8
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.180018530
nop
lea rdx, [rbx - 0x18]
mov eax, ebp
lock xadd dword [rdx + 0x10], eax
add eax, ebp
cmp eax, esi
jg 0x18001c324
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + ioctlsocket]
mov eax, 1
mov rcx, qword [rsp + 0x490]
xor rcx, rsp
call fcn.18005cb30
mov rbx, qword [rsp + 0x4f0]
add rsp, 0x4a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret