Function at 0x1400513e0
Capabilities:
Create directory
Set file attributes
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x258]
sub rsp, 0x330
mov qword [rbp - 0x68], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
movaps xmmword [rax - 0x38], xmm6
mov rax, qword [0x14017c430]
xor rax, rsp
mov qword [rbp + 0x210], rax
mov r12, rcx
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x50], rbx
lea rcx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
xor r15d, r15d
mov qword [rbp - 0x58], r15
movaps xmm0, xmmword [rbp - 0x60]
movdqa xmmword [rbp - 0x40], xmm0
lea rdx, [rsp + 0x70]
lea rcx, [rbp - 0x40]
call qword [sym.imp.OLEAUT32.dll_VariantTimeToSystemTime]
movsd xmm6, qword [rsp + 0x70]
test eax, eax
je 0x140051491
movzx eax, word [rbp - 0x32]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm0, qword [0x140132ba8]
addsd xmm6, xmm0
movsd qword [rsp + 0x70], xmm6
lea rdx, [rbp - 0x10]
movapd xmm0, xmm6
call qword [sym.imp.OLEAUT32.dll_UnRegisterTypeLib]
test eax, eax
je 0x1400514b3
mov r8d, eax
lea rdx, [rbp - 0x10]
movapd xmm0, xmm6
call fcn.140016470
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x10]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov r8d, 0xa
lea rdx, [rbp]
mov ecx, dword [rsp + 0x68]
call fcn.1400da6c8
xor eax, eax
or rsi, 0xffffffffffffffff
mov rcx, rsi
lea rdi, [rbp]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x14005154e
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x1400515cb
cmp dword [rdx + 0x10], eax
jge 0x140051524
cmp dword [rbx - 0xc], eax
jge 0x140051517
mov ecx, 0x80070057
call fcn.1400022b0
int3
mov dword [rbx - 0x10], r15d
mov word [rbx], r15w
jmp 0x1400515cb
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14005153a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x50], rax
jmp 0x1400515cb
mov r14d, dword [rbx - 0x10]
lea r13, [rbp]
sub r13, rbx
sar r13, 1
test ecx, ecx
jns 0x14005156b
mov ecx, 0x80070057
call fcn.1400022b0
int3
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x14005158d
mov edx, edi
lea rcx, [rsp + 0x50]
call fcn.1400020c0
mov rbx, qword [rsp + 0x50]
movsxd rax, edi
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
add rdx, rdx
cmp r13, r14
lea r14, [rax + rax]
mov r9, r14
ja 0x1400515b1
lea r8, [rbx + r13*2]
call fcn.1400d4ebc
jmp 0x1400515ba
lea r8, [rbp]
call fcn.1400d4e34
cmp edi, dword [rbx - 0xc]
jg 0x140051aa8
mov dword [rbx - 0x10], edi
mov word [r14 + rbx], r15w
mov r8d, 1
lea rdx, [0x14012ffcc]
lea rcx, [rsp + 0x50]
call fcn.14003bd50
mov r8d, 0xa
lea rdx, [rbp]
mov ecx, dword [rsp + 0x6c]
call fcn.1400da6c8
xor eax, eax
mov rcx, rsi
lea rdi, [rbp]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [rbp]
lea rcx, [rsp + 0x50]
call fcn.14003bd50
mov r8d, 1
lea rdx, reloc.msi.dll_MsiGetActiveDatabase
lea rcx, [rsp + 0x50]
call fcn.14003bd50
mov eax, 0x3b
mov dword [rbp - 0x58], 0x3b0017
mov word [rbp - 0x54], ax
mov eax, 0x3e7
mov word [rbp - 0x52], ax
movaps xmm0, xmmword [rbp - 0x60]
movdqa xmmword [rbp - 0x30], xmm0
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x30]
call qword [sym.imp.OLEAUT32.dll_VariantTimeToSystemTime]
movsd xmm6, qword [rbp - 0x80]
test eax, eax
je 0x140051683
movzx eax, word [rbp - 0x22]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
divsd xmm0, qword [0x140132ba8]
addsd xmm6, xmm0
movsd qword [rbp - 0x80], xmm6
lea rdx, [rbp - 0x20]
movapd xmm0, xmm6
call qword [sym.imp.OLEAUT32.dll_UnRegisterTypeLib]
test eax, eax
je 0x1400516a5
mov r8d, eax
lea rdx, [rbp - 0x20]
movapd xmm0, xmm6
call fcn.140016470
lea rdx, [rbp - 0x78]
lea rcx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov rcx, qword [rbp - 0x78]
mov qword [rsp + 0x68], rcx
mov r8d, 0xa
lea rdx, [rbp]
call fcn.1400da6c8
xor eax, eax
mov rcx, rsi
lea rdi, [rbp]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [rbp]
lea rcx, [rsp + 0x50]
call fcn.14003bd50
mov r8d, 1
lea rdx, [0x14012ffcc]
lea rcx, [rsp + 0x50]
call fcn.14003bd50
mov r8d, 0xa
lea rdx, [rbp]
mov ecx, dword [rsp + 0x6c]
call fcn.1400da6c8
xor eax, eax
mov rcx, rsi
lea rdi, [rbp]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [rbp]
lea rcx, [rsp + 0x50]
call fcn.14003bd50
mov r8d, 1
lea rdx, [0x14012ffcc]
lea rcx, [rsp + 0x50]
call fcn.14003bd50
mov r14d, 5
mov r8d, r14d
lea rdx, str.selog
lea rcx, [rsp + 0x50]
call fcn.14003bd50
lea rcx, [rsp + 0x58]
call fcn.1400853d0
nop
xor r8d, r8d
mov rdx, qword [rsp + 0x58]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
lea edx, [r14 - 3]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea r8, [0x14012c424]
lea rdx, [0x14012f530]
lea rcx, [rsp + 0x58]
call fcn.140045040
xor r8d, r8d
mov rdx, qword [rsp + 0x58]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
lea edx, [r14 - 3]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x78], rax
mov r9, qword [rsp + 0x50]
mov r8, qword [rsp + 0x58]
lea rdx, [0x14012f290]
lea rcx, [rsp + 0x78]
call fcn.140016060
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x140051961
lea r9d, [r14 - 3]
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_GetLocalTime]
lea rcx, [0x14017bd30]
mov rdx, qword [0x14017bd30]
call qword [rdx + 0x18]
add rax, 0x18
mov qword [rsp + 0x60], rax
movzx ecx, word [rbp - 0x44]
movzx edx, word [rbp - 0x46]
movzx edi, word [rbp - 0x48]
movzx r10d, word [rbp - 0x50]
movzx r9d, word [rbp - 0x4e]
movzx r8d, word [rbp - 0x4a]
mov rax, qword [r12 + 0xb0]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], r10d
lea rdx, str._d._d._d__d:_d:_d__s_shutdown_n
lea rcx, [rsp + 0x60]
call fcn.140016060
mov rdi, qword [rsp + 0x60]
mov eax, dword [rdi - 0x10]
lea ebx, [rax + rax]
cmp dword [rdi - 8], 1
jle 0x1400518d8
mov edx, eax
lea rcx, [rsp + 0x60]
call fcn.140001fb0
mov rdi, qword [rsp + 0x60]
mov rcx, rsi
test ebx, ebx
je 0x14005190d
mov rdx, rdi
mov r8d, ebx
lea r9, [0x14017e9a4]
nop dword [rax]
cmp rcx, 4
jl 0x1400518fb
mov rcx, r15
jmp 0x1400518fe
inc rcx
movzx eax, byte [rcx + r9]
xor byte [rdx], al
inc rdx
dec r8
jne 0x1400518f0
cmp dword [rdi - 8], 1
jle 0x140051925
mov edx, dword [rdi - 0x10]
lea rcx, [rsp + 0x60]
call fcn.140001fb0
mov rdi, qword [rsp + 0x60]
mov qword [rsp + 0x20], r15
lea r9, [rbp - 0x70]
mov r8d, ebx
mov rdx, rdi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
lea rdx, [rdi - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140051961
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
mov rcx, qword [r12 + 0x40]
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [r12 + 0x30]
test rcx, rcx
je 0x14005198f
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [r12 + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r12 + 0x30], r15
mov rcx, qword [r12 + 0x58]
test rcx, rcx
je 0x1400519a3
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
mov rcx, qword [r12 + 0x60]
test rcx, rcx
je 0x1400519c6
call fcn.14006c3d0
mov rcx, qword [r12 + 0x60]
test rcx, rcx
je 0x1400519c6
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
cmp qword [r12 + 0x118], 0
je 0x140051a09
mov byte [r12 + 0x128], 1
mov r8, rsi
mov rdx, qword [r12 + 0x118]
mov rcx, qword [r12 + 0x110]
call qword [sym.imp.KERNEL32.dll_DeleteTimerQueueTimer]
mov rcx, qword [r12 + 0x110]
test rcx, rcx
je 0x140051a09
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_DeleteTimerQueueEx]
mov rcx, qword [r12 + 0x40]
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, qword [0x140183630]
mov dword [rcx + 0x14], r14d
mov dword [rcx + 0x1c], r15d
mov dword [rcx + 0x28], r15d
mov eax, 0x85
cmp byte [rcx + 0x140], 0
cmovne eax, r14d
mov dword [rcx + 0x18], eax
lea rdx, [rcx + 0x10]
mov rcx, qword [rcx + 8]
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
nop
mov rdx, qword [rsp + 0x78]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140051a69
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
nop
mov rdx, qword [rsp + 0x58]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x140051a89
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x140051ab3
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
jmp 0x140051ab3
mov ecx, 0x80070057
call fcn.1400022b0
nop
mov rcx, qword [rbp + 0x210]
xor rcx, rsp
call fcn.1400d4d90
lea r11, [rsp + 0x330]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
movaps xmm6, xmmword [r11 - 0x10]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret