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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x4a0
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x4f0], rbx
mov rax, qword [0x1800ac2b8]
xor rax, rsp
mov qword [rsp + 0x490], rax
mov qword [rsp + 0x30], r9
mov r15d, r8d
mov r14, rdx
mov qword [rsp + 0x20], rdx
mov rsi, rcx
mov rax, qword [rdx + 0x18]
add rax, rax
cmp rax, 0xbb8
jae 0x18001d392
mov eax, 1
jmp 0x18001d602
xor ebx, ebx
mov word [rsp + 0x70], bx
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x72]
call fcn.18005f790
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, [0x18008c890]
lea rdx, [rsp + 0x280]
lea rcx, [rsp + 0x28]
call fcn.1800622d8
mov rdi, qword [rsp + 0x28]
test rdi, rdi
jne 0x18001d40f
xor eax, eax
jmp 0x18001d602
mov rcx, qword [rsi + 0x80]
sub rcx, qword [rsi + 0x78]
movabs r8, 0x6666666666666667
mov rax, r8
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
mov r12d, ebx
mov ebp, ebx
or r13, 0xffffffffffffffff
test edx, edx
jle 0x18001d560
movsxd r14, edx
nop dword [rax]
mov rax, qword [rsi + 0xb0]
sub rax, qword [rsi + 0xa8]
sar rax, 2
cmp rbx, rax
jb 0x18001d476
call fcn.1800610c8
movabs r8, 0x6666666666666667
mov rax, qword [rsi + 0xa8]
test dword [rax + rbx*4], r15d
je 0x18001d53e
movsxd rdi, ebp
mov rcx, qword [rsi + 0x80]
sub rcx, qword [rsi + 0x78]
mov rax, r8
imul rcx
sar rdx, 4
mov rax, rdx
shr rax, 0x3f
add rdx, rax
cmp rdi, rdx
jb 0x18001d4b3
call fcn.1800610c8
lea rcx, [rdi + rdi*4]
mov rax, qword [rsi + 0x78]
lea rdx, [rax + rcx*8]
mov qword [rsp + 0x60], 7
xor eax, eax
mov qword [rsp + 0x58], rax
mov word [rsp + 0x48], ax
mov r9, r13
xor r8d, r8d
lea rcx, [rsp + 0x40]
call fcn.1800017b4
nop
mov r8d, 2
lea rdx, [0x18008c8b0]
lea rcx, [rsp + 0x40]
call fcn.180019270
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.1800620f8
cmp rax, rdi
jne 0x18001d52c
inc r12d
cmp qword [rsp + 0x60], 8
jb 0x18001d53e
mov rcx, qword [rsp + 0x48]
call fcn.18005eeb4
inc ebp
inc rbx
cmp rbx, r14
movabs r8, 0x6666666666666667
jl 0x18001d450
mov rdi, qword [rsp + 0x28]
mov r14, qword [rsp + 0x20]
mov rcx, rdi
call fcn.180061ee4
test eax, eax
je 0x18001d573
xor eax, eax
jmp 0x18001d602
test r12d, r12d
jne 0x18001d57f
xor eax, eax
jmp 0x18001d602
lea rcx, case.0x180034a3c.6
mov rax, qword [case.0x180034a3c.6]
call qword [rax + Ordinal_26]
add rax, 0x18
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x280]
mov r8, qword [rsp + 0x30]
lea rdx, str.___s_s_
lea rcx, [rsp + 0x20]
call fcn.180011550
mov rcx, r14
call fcn.1800232b0
xor eax, eax
mov rcx, r13
mov rbx, qword [rsp + 0x20]
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rbx
mov rcx, r14
call fcn.180019270
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], r13d
dec r13d
test r13d, r13d
jg 0x18001d5fd
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.18005f4d0
mov rbx, qword [rsp + 0x4f0]
add rsp, 0x4a0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret