Function at 0x140051300
Capabilities:
Check if file exists

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x78]
sub rsp, 0x160
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1403a0088]
xor rax, rsp
mov qword [rbp + 0x50], rax
mov rbx, rcx
xor esi, esi
mov edi, esi
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x58], rsi
xor eax, eax
mov qword [rsp + 0x70], rax
mov qword [rbp - 0x70], rax
mov qword [rsp + 0x68], rsi
mov byte [rsp + 0x70], al
mov dword [rsp + 0x74], 2
lea r15, vtable.ATL::CDacl.0
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x78], rsi
mov qword [rbp - 0x80], rsi
mov qword [rbp - 0x78], rsi
mov dword [rbp - 0x70], esi
xor edx, edx
lea r8d, [rsi + 0x78]
lea rcx, [rbp - 0x60]
call fcn.1402767a0
lea rcx, [rbp - 0x60]
call fcn.14004f980
nop
test rbx, rbx
je 0x14005150b
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x14005150b
lea rdx, str.Everyone
lea rcx, str.everyone
call fcn.1402779b8
test eax, eax
je 0x1400513f8
mov qword [rsp + 0x50], rsi
lea r9, [rsp + 0x50]
xor r8d, r8d
lea rdx, str.everyone
xor ecx, ecx
call qword [sym.imp.NETAPI32.dll_NetUserGetInfo]
test eax, eax
jne 0x14005150b
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.NETAPI32.dll_NetApiBufferFree]
mov qword [rsp + 0x38], rsi
mov qword [rsp + 0x30], rsi
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
xor r9d, r9d
lea r8d, [r9 + 4]
mov r14d, 1
mov edx, r14d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
test eax, eax
jne 0x14005150b
mov dword [rsp + 0x20], 3
lea r9d, [r14 + 1]
mov r8d, 0x10000000
lea rdx, str.everyone
lea rcx, [rbp + 0x20]
call qword [sym.imp.ADVAPI32.dll_BuildExplicitAccessWithNameW]
lea r9, [rsp + 0x48]
mov r8, qword [rsp + 0x58]
lea rdx, [rbp + 0x20]
mov ecx, r14d
call qword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
jne 0x14005150b
mov qword [rsp + 0x30], rsi
mov rax, qword [rsp + 0x48]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
xor r9d, r9d
lea r8d, [r14 + 3]
mov edx, r14d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
test eax, eax
jne 0x14005150b
lea rcx, [rbp - 0x60]
call fcn.14004fc40
test al, al
je 0x14005150b
lea r8, [rsp + 0x60]
mov rcx, rbx
call fcn.140051220
test al, al
je 0x14005150b
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x60]
call fcn.140050160
test al, al
je 0x14005150b
lea rcx, [rsp + 0x60]
call fcn.14004feb0
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rsi
xor r9d, r9d
lea r8d, [r14 + 3]
mov edx, r14d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov ebx, eax
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
cmove edi, r14d
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x14005151c
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop
lea rax, vtable.ATL::CSid.0
mov qword [rbp - 0x60], rax
mov rdx, qword [rbp + 0x10]
add rdx, 0xffffffffffffffe8
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140051547
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, qword [rbp + 8]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140051564
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, qword [rbp]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140051581
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, qword [rbp - 8]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], ebx
sub ebx, 1
jg 0x14005159d
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov qword [rsp + 0x60], r15
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x1400515c4
mov rdx, qword [rbp - 0x80]
call fcn.140052010
mov rcx, qword [rsp + 0x78]
call fcn.14027b988
mov qword [rsp + 0x78], rsi
mov qword [rbp - 0x80], rsi
mov qword [rbp - 0x78], rsi
mov rcx, qword [rsp + 0x68]
call fcn.14027b988
mov qword [rsp + 0x68], rsi
lea rcx, [rsp + 0x78]
call fcn.140051e70
lea rax, vtable.ATL::CAcl.0
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x68]
call fcn.14027b988
mov eax, edi
mov rcx, qword [rbp + 0x50]
xor rcx, rsp
call fcn.140125a70
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret