Function at 0x140007a30
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x40
xor r15d, r15d
mov rdi, rdx
movzx r14d, cl
mov qword [rax + 0x18], r15
mov ebp, r15d
test cl, cl
je 0x140007b99
mov qword [rax - 0x38], r15
mov dword [rax - 0x40], 0x2000000
lea r8d, [r15 + 7]
xor r9d, r9d
mov edx, 0x20000
mov rcx, rdi
mov dword [rax - 0x48], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140007af6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x140058b18]
mov ebx, eax
test rcx, rcx
je 0x140007c80
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x140007c80
mov qword [rsp + 0x30], r15
lea r8d, [r15 + 7]
xor r9d, r9d
mov edx, 0x20000
mov rcx, rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
cmp rsi, 0xffffffffffffffff
je 0x140007c80
movzx eax, byte [0x140058b10]
mov rcx, rsi
neg al
lea rax, [rsp + 0x70]
sbb edx, edx
xor r9d, r9d
xor r8d, r8d
and edx, 0x10
mov qword [rsp + 0x20], rax
or edx, 0x85
call qword [0x140058bc0]
mov ebx, eax
cmp eax, 0xc0000023
jne 0x140007b8b
mov edx, dword [rsp + 0x70]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
movzx ecx, byte [0x140058b10]
mov r9d, dword [rsp + 0x70]
neg cl
lea rcx, [rsp + 0x70]
mov r8, rax
sbb edx, edx
mov qword [rsp + 0x20], rcx
mov rcx, rsi
and edx, 0x10
mov qword [rsp + 0x80], rax
or edx, 0x85
call qword [0x140058bc0]
mov ebx, eax
test eax, eax
je 0x140007b8b
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov qword [rsp + 0x80], r15
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140007c80
movzx eax, byte [0x140058b2b]
neg al
movzx eax, byte [0x140058b10]
sbb r8d, r8d
and r8d, 8
neg al
lea rax, [rsp + 0x80]
sbb ecx, ecx
mov qword [rsp + 0x38], rax
xor r9d, r9d
and ecx, 0x10
mov qword [rsp + 0x30], r15
lea edx, [r9 + 1]
or r8d, ecx
mov rcx, rdi
mov qword [rsp + 0x28], r15
or r8d, 0x85
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
mov ebx, eax
test eax, eax
je 0x140007cc6
mov rcx, qword [0x140058b18]
test rcx, rcx
je 0x140007c80
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x140007c80
movzx eax, byte [0x140058b2b]
neg al
movzx eax, byte [0x140058b10]
sbb r8d, r8d
and r8d, 8
neg al
lea rax, [rsp + 0x80]
sbb ecx, ecx
mov qword [rsp + 0x38], rax
xor r9d, r9d
and ecx, 0x10
mov qword [rsp + 0x30], r15
lea edx, [r9 + 1]
or r8d, ecx
mov rcx, rdi
mov qword [rsp + 0x28], r15
or r8d, 0x85
mov qword [rsp + 0x20], r15
call qword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140007c7a
test al, 0x10
je 0x140007c7a
mov ebp, 1
call qword [sym.imp.ADVAPI32.dll_RevertToSelf]
test ebx, ebx
jne 0x140007c96
test r14b, r14b
je 0x140007c92
lea rdx, [0x1400473a0]
jmp 0x140007ce6
test ebp, ebp
jmp 0x140007cd6
cmp byte [0x140058b13], r15b
jne 0x140007d0c
lea rcx, str._s_n__Error_getting_security:_n
mov rdx, rdi
call fcn.14000adf8
mov ecx, ebx
call fcn.140005190
mov rbx, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x140007cdf
test al, 0x10
lea rdx, [0x140042e80]
jne 0x140007ce6
lea rdx, [0x140045110]
mov r8, qword [rsp + 0x80]
xor r9d, r9d
mov rcx, rdi
mov qword [rsp + 0x20], r15
call fcn.140004240
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rbx, qword [rsp + 0x78]
add rsp, 0x40
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret