Function at 0x140051950
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 [0x1403a8088]
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.14027b2c0
lea rcx, [rbp - 0x60]
call fcn.14004ffd0
nop
test rbx, rbx
je 0x140051b5b
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140051b5b
lea rdx, str.Everyone
lea rcx, str.everyone
call fcn.14027c4d8
test eax, eax
je 0x140051a48
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 0x140051b5b
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 0x140051b5b
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 0x140051b5b
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 0x140051b5b
lea rcx, [rbp - 0x60]
call fcn.140050290
test al, al
je 0x140051b5b
lea r8, [rsp + 0x60]
mov rcx, rbx
call fcn.140051870
test al, al
je 0x140051b5b
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x60]
call fcn.1400507b0
test al, al
je 0x140051b5b
lea rcx, [rsp + 0x60]
call fcn.140050500
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 0x140051b6c
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 0x140051b97
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 0x140051bb4
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 0x140051bd1
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 0x140051bed
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 0x140051c14
mov rdx, qword [rbp - 0x80]
call fcn.140052660
mov rcx, qword [rsp + 0x78]
call fcn.1402804a8
mov qword [rsp + 0x78], rsi
mov qword [rbp - 0x80], rsi
mov qword [rbp - 0x78], rsi
mov rcx, qword [rsp + 0x68]
call fcn.1402804a8
mov qword [rsp + 0x68], rsi
lea rcx, [rsp + 0x78]
call fcn.1400524c0
lea rax, vtable.ATL::CAcl.0
mov qword [rsp + 0x60], rax
mov rcx, qword [rsp + 0x68]
call fcn.1402804a8
mov eax, edi
mov rcx, qword [rbp + 0x50]
xor rcx, rsp
call fcn.14012a2b0
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