Function at 0x1400160b0
Capabilities:
Check if file exists
Compare security identifiers
Get file attributes

Disassembly:
push rbp
push rbx
push r14
lea rbp, [rsp - 0x47]
sub rsp, 0x100
mov rax, qword [0x140024018]
xor rax, rsp
mov qword [rbp + 0x37], rax
mov r14, rcx
xor ebx, ebx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x14001637d
test al, 0x10
jne 0x14001637d
lea rax, [rbp - 0x49]
mov qword [rbp - 0x49], rbx
mov qword [rsp + 0x50], rax
lea rcx, [rbp + 0x1f]
mov dword [rsp + 0x48], ebx
xor r9d, r9d
mov dword [rsp + 0x40], ebx
xor r8d, r8d
mov dword [rsp + 0x38], ebx
mov dl, 1
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], ebx
mov dword [rbp + 0x1f], ebx
mov word [rbp + 0x23], 0x100
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x14001637d
mov rdx, qword [rbp - 0x49]
lea rcx, [rbp - 1]
xor eax, eax
mov qword [rbp - 1], rax
mov qword [rbp + 7], rax
mov qword [rbp + 0xf], rax
mov qword [rbp + 0x17], rax
call qword [sym.imp.ADVAPI32.dll_BuildTrusteeWithSidW]
lea rax, [rbp - 0x39]
mov qword [rbp - 0x41], rbx
mov qword [rsp + 0x38], rax
lea edx, [rbx + 1]
lea rax, [rbp - 0x41]
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x28], rax
lea r8d, [rbx + 4]
xor r9d, r9d
mov qword [rsp + 0x20], rbx
mov rcx, r14
mov qword [rbp - 0x39], rbx
call qword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
test eax, eax
jne 0x140016373
mov rcx, qword [rbp - 0x41]
mov qword [rsp + 0x130], rdi
mov edi, ebx
cmp bx, word [rcx + 4]
jae 0x140016221
nop word [rax + rax]
lea r8, [rbp - 0x59]
mov qword [rbp - 0x59], rbx
mov edx, edi
call qword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x140016213
mov rdx, qword [rbp - 0x59]
mov rcx, qword [rbp - 0x49]
add rdx, 8
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x140016213
xor eax, eax
mov dword [rbp + 0x27], 0x120089
lea rdx, [rbp + 0x27]
mov qword [rbp + 0x2b], rax
lea rcx, [rbp - 0x51]
mov dword [rbp + 0x33], eax
mov dword [rbp - 0x51], ebx
call qword [sym.imp.ADVAPI32.dll_MapGenericMask]
mov rax, qword [rbp - 0x59]
mov edx, dword [rbp - 0x51]
mov ecx, dword [rax + 4]
call qword [sym.imp.ADVAPI32.dll_AreAllAccessesGranted]
test eax, eax
jne 0x1400162d0
mov rcx, qword [rbp - 0x41]
inc edi
movzx eax, word [rcx + 4]
cmp edi, eax
jl 0x1400161b0
mov rax, qword [rbp - 0x49]
lea r9, [rbp - 0x59]
xorps xmm0, xmm0
mov qword [rbp - 9], rax
mov r8, rcx
mov qword [rbp - 0x11], 5
mov ecx, 1
mov dword [rbp - 0x31], 0x120089
lea rdx, [rbp - 0x31]
mov qword [rbp - 0x2d], 2
movdqu xmmword [rbp - 0x25], xmm0
mov dword [rbp - 0x15], ebx
mov qword [rbp - 0x59], rbx
call qword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
jne 0x140016361
lea edx, [rax + 0x28]
lea ecx, [rax + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x140016361
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x140016358
mov r8, qword [rbp - 0x59]
xor r9d, r9d
mov rcx, rdi
lea edx, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x140016358
mov qword [rsp + 0x128], rsi
mov qword [rsp + 0x138], r15
test r14, r14
jne 0x1400162da
mov eax, ebx
jmp 0x1400162e8
mov ebx, 1
jmp 0x140016361
mov edx, 0x7d0
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
inc eax
mov ecx, 0x40
movsxd r15, eax
lea rdx, [r15 + r15]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x140016348
mov r8, r14
mov rdx, r15
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
mov rax, qword [rbp - 0x59]
xor r9d, r9d
mov qword [rsp + 0x30], rbx
mov rcx, rsi
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
lea edx, [r9 + 1]
lea r8d, [r9 + 4]
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
test eax, eax
mov rcx, rsi
sete bl
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rsi, qword [rsp + 0x128]
mov r15, qword [rsp + 0x138]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x39]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rdi, qword [rsp + 0x130]
mov rcx, qword [rbp - 0x49]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, ebx
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.1400163f0
add rsp, 0x100
pop r14
pop rbx
pop rbp
ret