Function at 0x14002df04
Capabilities:
Compare security identifiers

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0x88
mov rax, qword [0x1400502a8]
xor rax, rsp
mov qword [rbp + 0xf], rax
mov rax, rdx
xor r14d, r14d
mov r13, rcx
mov qword [rbp - 0x21], r14
mov rcx, rax
mov qword [rbp - 0x19], r14
lea rdx, [rbp - 0x19]
mov qword [rbp - 9], r14
mov r15b, r9b
mov r12d, r8d
call qword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
lea edi, [r14 + 4]
mov ebx, eax
test eax, eax
je 0x14002dfd4
lea rax, [rbp - 9]
xor r9d, r9d
mov qword [rsp + 0x38], rax
mov r8d, edi
lea rax, [rbp - 0x21]
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], rax
mov edx, edi
mov rcx, r13
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_GetSecurityInfo]
test eax, eax
je 0x14002df99
mov ecx, eax
mov ebx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
je 0x14002dfd4
mov rcx, qword [rbp - 0x21]
lea rdx, [rbp - 1]
mov r9d, 2
lea r8d, [r9 + 0xa]
call qword [sym.imp.ADVAPI32.dll_GetAclInformation]
mov ebx, eax
test eax, eax
je 0x14002dfd4
mov rcx, qword [rbp - 0x21]
lea rdx, [rbp - 0x29]
mov r9d, 1
mov r8d, edi
call qword [sym.imp.ADVAPI32.dll_GetAclInformation]
mov ebx, eax
mov esi, r14d
test ebx, ebx
je 0x14002e184
mov edi, r14d
cmp dword [rbp - 1], r14d
jbe 0x14002e040
mov rcx, qword [rbp - 0x21]
lea r8, [rbp - 0x11]
mov edx, edi
mov qword [rbp - 0x11], r14
call qword [sym.imp.ADVAPI32.dll_GetAce]
mov ebx, eax
test eax, eax
je 0x14002e184
mov rcx, qword [rbp - 0x11]
cmp byte [rcx], r14b
jne 0x14002e032
cmp dword [rcx + 4], r12d
jne 0x14002e032
mov al, byte [rcx + 1]
and al, r15b
cmp al, r15b
jne 0x14002e032
mov rdx, qword [rbp - 0x19]
add rcx, 8
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x14002e03b
inc edi
cmp edi, dword [rbp - 1]
jae 0x14002e040
jmp 0x14002dfe8
mov esi, 1
test ebx, ebx
je 0x14002e184
test esi, esi
jne 0x14002e17b
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
lea edi, [rax + 8]
cmp edi, 8
jae 0x14002e070
mov ecx, 0x216
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp edi, 8
cmovae r14d, ebx
add edi, dword [rbp + 3]
cmp edi, dword [rbp + 3]
jb 0x14002e080
xor esi, esi
jmp 0x14002e093
or edi, 0xffffffff
mov ecx, 0x216
mov esi, 0x80070216
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor ebx, ebx
test esi, esi
cmovns ebx, r14d
xor r14d, r14d
mov esi, r14d
test ebx, ebx
je 0x14002e0d5
mov ecx, edi
call fcn.14003c460
mov rsi, rax
test rax, rax
jne 0x14002e0c0
lea ecx, [rax + 0xe]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, r14d
test ebx, ebx
je 0x14002e0d5
mov r8d, dword [rbp - 0x29]
mov edx, edi
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_InitializeAcl]
mov ebx, eax
mov edi, r14d
cmp dword [rbp - 1], r14d
jbe 0x14002e124
mov rcx, qword [rbp - 0x21]
lea r8, [rbp - 0x11]
mov edx, edi
mov qword [rbp - 0x11], r14
call qword [sym.imp.ADVAPI32.dll_GetAce]
test eax, eax
je 0x14002e184
mov r9, qword [rbp - 0x11]
or r8d, 0xffffffff
mov edx, dword [rbp - 0x29]
mov rcx, rsi
movzx eax, word [r9 + 2]
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_AddAce]
mov ebx, eax
test eax, eax
je 0x14002e184
inc edi
cmp edi, dword [rbp - 1]
jb 0x14002e0de
test ebx, ebx
je 0x14002e184
mov rax, qword [rbp - 0x19]
mov r9d, r12d
mov edx, dword [rbp - 0x29]
mov rcx, rsi
movzx r8d, r15b
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAceEx]
mov ebx, eax
test eax, eax
je 0x14002e184
xor r9d, r9d
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], rsi
mov rcx, r13
mov qword [rsp + 0x20], r14
lea edx, [r9 + 4]
mov r8d, edx
call qword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
test eax, eax
je 0x14002e17b
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, r14d
test ebx, ebx
je 0x14002e184
mov ebx, r14d
jmp 0x14002e18c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 9]
mov qword [rbp - 0x21], r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x19]
mov qword [rbp - 9], r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, ebx
mov rcx, qword [rbp + 0xf]
xor rcx, rsp
call fcn.14003c810
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret