Function at 0x100012710
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x90
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
mov r12, rdx
mov r14d, dword [0x10001e15c]
lea rdx, [rax - 0x70]
call fcn.10001330c
nop
xor r15d, r15d
mov ebp, r15d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x2000080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 3]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x1000127b5
lea rdx, [rsp + 0x58]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, r15d
jne 0x1000127fc
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_SetLastError]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x100012955
cmp eax, 0x7b
je 0x100012947
cmp eax, 2
je 0x100012947
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
inc ebp
mov r9d, ebp
mov r8d, r14d
mov edx, 0x2398
mov rcx, r12
call fcn.100009c24
cmp eax, r15d
jne 0x100012752
lea rdx, [rsp + 0x40]
mov rcx, r12
call fcn.10001330c
nop
mov r13d, r15d
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp eax, 0xffffffff
cmove edi, r15d
test dil, 7
je 0x100012837
mov edx, edi
and edx, 0xfffffff8
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x2000080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 3]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbp, rax
cmp rax, 0xffffffffffffffff
je 0x1000128ba
lea r9, [rsp + 0x6c]
lea r8, [rsp + 0x64]
lea rdx, [rsp + 0x5c]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFileTime]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, r15d
jne 0x1000128da
cmp esi, 0x32
je 0x1000128da
cmp esi, 6
je 0x1000128da
cmp esi, 0x57
jne 0x1000128b2
cmp qword [r12 + 8], r15
je 0x1000128da
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_SetLastError]
inc r13d
mov r9d, r13d
mov r8d, r14d
mov edx, 0x2398
mov rcx, r12
call fcn.100009c24
cmp eax, r15d
je 0x10001290a
jmp 0x10001280d
test dil, 7
je 0x1000128ee
mov edx, edi
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
nop
lea rcx, [rsp + 0x40]
call sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef
nop
lea rcx, [rsp + 0x48]
call sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef
mov eax, 1
jmp 0x100012964
test dil, 7
je 0x10001292e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov edx, edi
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop
lea rcx, [rsp + 0x40]
call sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef
nop
lea rcx, [rsp + 0x48]
call sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef
xor eax, eax
jmp 0x100012964
lea rcx, [rsp + 0x48]
call sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef
xor eax, eax
jmp 0x100012964
lea rcx, [rsp + 0x48]
call sub.MFC42u.dll_CDocObjectServer::XOleDocument::AddRef
mov eax, 1
lea r11, [rsp + 0x90]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret