Function at 0x140015538
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 0x140015580
and dword [rdx], 0
test rbx, rbx
je 0x1400158ef
test r15, r15
je 0x1400158ef
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, [0x14003de18]
mov rcx, rbx
mov rax, qword [rax]
call qword [case.0x140024a15.0]
test eax, eax
js 0x140015642
mov rax, qword [rbx]
lea rdx, [rsp + 0x48]
mov rcx, rbx
mov rax, qword [rax + 0x28]
call qword [case.0x140024a15.0]
test eax, eax
je 0x14001562b
lea rcx, [rsp + 0x48]
call fcn.14002d690
test eax, eax
js 0x140015642
mov rdi, qword [rsp + 0x50]
cmp qword [rsp + 0x48], 0
jle 0x140015642
mov rcx, rdi
call fcn.140012cb8
test eax, eax
js 0x140015642
mov r9d, 8
lea r8, [rsp + 0x48]
lea rdx, [0x140040fa8]
mov rcx, qword [rdi + 0x10]
call fcn.14002da60
test eax, eax
js 0x140015642
mov rax, qword [rbx]
lea rdx, [rsp + 0x44]
mov rcx, rbx
mov rax, qword [rax + 0x30]
call qword [case.0x140024a15.0]
mov rax, qword [rbx]
lea rdx, [rsp + 0x40]
mov rcx, rbx
mov rax, qword [rax + 0x90]
call qword [case.0x140024a15.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 0x14001569a
cmp eax, 0x720
jne 0x14001575c
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.14001ae60
mov edi, eax
test eax, eax
js 0x14001570c
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.14001aec0
mov edi, eax
test edi, edi
js 0x140015761
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 0x14001578d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x50
je 0x14001567d
cmp eax, 0xb7
je 0x14001567d
mov edi, 0x80004005
mov ebx, edi
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14001577b
mov rdx, qword [rcx]
mov rax, qword [rdx + 0x10]
call qword [case.0x140024a15.0]
nop
lea rcx, [rsp + 0x68]
call qword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, ebx
jmp 0x1400158f4
mov rbx, qword [rsp + 0x50]
mov rcx, rbx
call fcn.140012cb8
mov edi, 0x80004005
test eax, eax
jns 0x1400157a7
mov ebx, edi
jmp 0x1400157d2
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.0x140024a15.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 0x1400158d8
test rsi, rsi
je 0x140015819
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 0x140015823
test ebx, ebx
js 0x1400158d8
mov ebx, edi
test ebx, ebx
js 0x1400158d8
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 0x14001585c
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 0x140015881
test ebx, ebx
js 0x140015881
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 0x14001589e
mov rcx, rsi
call qword [sym.imp.OLEAUT32.dll_SafeArrayGetElement]
test ebx, ebx
js 0x140015763
mov dword [r15], r14d
mov rbx, qword [rsp + 0x50]
mov rcx, rbx
call fcn.140012cb8
test eax, eax
js 0x140015761
test r14d, r14d
jne 0x1400158cd
mov ebx, 0x80070057
jmp 0x140015763
mov dword [rbx + 0x20], r14d
xor ebx, ebx
jmp 0x140015763
test rsi, rsi
je 0x140015763
mov rcx, rsi
call qword [sym.imp.OLEAUT32.dll_SafeArrayGetElement]
jmp 0x140015763
mov eax, 0x80070057
mov rcx, qword [rbp + 0x3c0]
xor rcx, rsp
call fcn.1400362c0
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