Function at 0x140015784
Capabilities:
Set file attributes
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x3f8]
sub rsp, 0x4d0
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x14004ffa8]
xor rax, rsp
mov qword [rbp + 0x3c0], rax
mov r15, rdx
mov rbx, rcx
test rdx, rdx
je 0x1400157cc
and dword [rdx], 0
test rbx, rbx
je 0x140015b3b
test r15, r15
je 0x140015b3b
and qword [rsp + 0x48], 0
and dword [rsp + 0x44], 0
lea rcx, [rsp + 0x68]
call qword [sym.imp.OLEAUT32.dll_VariantClear]
nop
and qword [rsp + 0x50], 0
mov rax, qword [rbx]
lea r8, [rsp + 0x50]
lea rdx, [0x14003f098]
mov rcx, rbx
mov rax, qword [rax]
call qword [case.0x1400247a9.0]
test eax, eax
js 0x14001588e
mov rax, qword [rbx]
lea rdx, [rsp + 0x48]
mov rcx, rbx
mov rax, qword [rax + 0x28]
call qword [case.0x1400247a9.0]
test eax, eax
je 0x140015877
lea rcx, [rsp + 0x48]
call fcn.14002d398
test eax, eax
js 0x14001588e
mov rdi, qword [rsp + 0x50]
cmp qword [rsp + 0x48], 0
jle 0x14001588e
mov rcx, rdi
call fcn.140012e3c
test eax, eax
js 0x14001588e
mov r9d, 8
lea r8, [rsp + 0x48]
lea rdx, [0x1400424a0]
mov rcx, qword [rdi + 0x10]
call fcn.14002d788
test eax, eax
js 0x14001588e
mov rax, qword [rbx]
lea rdx, [rsp + 0x44]
mov rcx, rbx
mov rax, qword [rax + 0x30]
call qword [case.0x1400247a9.0]
mov rax, qword [rbx]
lea rdx, [rsp + 0x40]
mov rcx, rbx
mov rax, qword [rax + 0x90]
call qword [case.0x1400247a9.0]
mov ecx, dword [rsp + 0x40]
mov edx, 0xc96441
test eax, eax
cmovs ecx, edx
mov dword [rsp + 0x40], ecx
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x60]
call sub.msvcrt.dll_memset
lea rcx, [rbp - 0x78]
call qword [sym.imp.RPCRT4.dll_UuidCreateSequential]
mov dword [rsp + 0x58], eax
test eax, eax
je 0x1400158e6
cmp eax, 0x720
jne 0x1400159a8
lea rdx, [rsp + 0x58]
lea rcx, [rbp - 0x78]
call qword [sym.imp.RPCRT4.dll_UuidHash]
movzx r14d, ax
mov ebx, dword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
mov r12d, dword [rsp + 0x44]
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x1b0]
call sub.msvcrt.dll_memset
lea rcx, [rbp + 0x1b0]
call fcn.14001accc
mov edi, eax
test eax, eax
js 0x140015958
lea rax, [rbp + 0x1b0]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ebx
or dword [rsp + 0x28], 0xffffffff
mov qword [rsp + 0x20], rsi
mov r9d, r12d
mov r8d, r14d
lea rcx, [rbp - 0x60]
call fcn.14001ad30
mov edi, eax
test edi, edi
js 0x1400159ad
and qword [rsp + 0x30], 0
and dword [rsp + 0x28], 0
mov dword [rsp + 0x20], 1
xor r9d, r9d
lea ebx, [r9 + 2]
mov r8d, ebx
mov edx, ebx
lea rcx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
jne 0x1400159d9
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
je 0x1400158c9
cmp eax, 0xb7
je 0x1400158c9
mov edi, 0x80004005
mov ebx, edi
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x1400159c7
mov rdx, qword [rcx]
mov rax, qword [rdx + 0x10]
call qword [case.0x1400247a9.0]
nop
lea rcx, [rsp + 0x68]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, ebx
jmp 0x140015b40
mov rbx, qword [rsp + 0x50]
mov rcx, rbx
call fcn.140012e3c
mov edi, 0x80004005
test eax, eax
jns 0x1400159f3
mov ebx, edi
jmp 0x140015a1e
lea rcx, [rsp + 0x68]
call qword [sym.imp.OLEAUT32.dll_VariantClear]
mov rcx, qword [rbx + 0x10]
mov rax, qword [rcx]
lea r9, [rsp + 0x68]
xor r8d, r8d
xor edx, edx
mov rax, qword [rax + 0xc8]
call qword [case.0x1400247a9.0]
mov ebx, eax
xor esi, esi
mov eax, 0x2011
cmp ax, word [rsp + 0x68]
cmove rsi, qword [rsp + 0x70]
xor edx, edx
mov qword [rsp + 0x60], rdx
xor r8d, r8d
test ebx, ebx
js 0x140015b24
test rsi, rsi
je 0x140015a65
lea rdx, [rsp + 0x60]
mov rcx, rsi
call qword [sym.imp.OLEAUT32.dll_SafeArrayUnaccessData]
mov ebx, eax
mov r8d, dword [rsi + 0x18]
mov rdx, qword [rsp + 0x60]
test rdx, rdx
jne 0x140015a6f
test ebx, ebx
js 0x140015b24
mov ebx, edi
test ebx, ebx
js 0x140015b24
and dword [rsp + 0x5c], 0
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x5c]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140015aa8
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x140015acd
test ebx, ebx
js 0x140015acd
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ebx, ax
or ebx, 0x80070000
test eax, eax
cmovle ebx, eax
mov edx, 0x2000
lea rcx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test rsi, rsi
je 0x140015aea
mov rcx, rsi
call qword [sym.imp.OLEAUT32.dll_SafeArrayGetElement]
test ebx, ebx
js 0x1400159af
mov dword [r15], r14d
mov rbx, qword [rsp + 0x50]
mov rcx, rbx
call fcn.140012e3c
test eax, eax
js 0x1400159ad
test r14d, r14d
jne 0x140015b19
mov ebx, 0x80070057
jmp 0x1400159af
mov dword [rbx + 0x20], r14d
xor ebx, ebx
jmp 0x1400159af
test rsi, rsi
je 0x1400159af
mov rcx, rsi
call qword [sym.imp.OLEAUT32.dll_SafeArrayGetElement]
jmp 0x1400159af
mov eax, 0x80070057
mov rcx, qword [rbp + 0x3c0]
xor rcx, rsp
call fcn.1400363b0
lea r11, [rsp + 0x4d0]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret