Function at 0x14002de14
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 0x14002dee4
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 0x14002dea9
mov ecx, eax
mov ebx, r14d
call qword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
je 0x14002dee4
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 0x14002dee4
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 0x14002e094
mov edi, r14d
cmp dword [rbp - 1], r14d
jbe 0x14002df50
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 0x14002e094
mov rcx, qword [rbp - 0x11]
cmp byte [rcx], r14b
jne 0x14002df42
cmp dword [rcx + 4], r12d
jne 0x14002df42
mov al, byte [rcx + 1]
and al, r15b
cmp al, r15b
jne 0x14002df42
mov rdx, qword [rbp - 0x19]
add rcx, 8
call qword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x14002df4b
inc edi
cmp edi, dword [rbp - 1]
jae 0x14002df50
jmp 0x14002def8
mov esi, 1
test ebx, ebx
je 0x14002e094
test esi, esi
jne 0x14002e08b
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
lea edi, [rax + 8]
cmp edi, 8
jae 0x14002df80
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 0x14002df90
xor esi, esi
jmp 0x14002dfa3
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 0x14002dfe5
mov ecx, edi
call fcn.14003c310
mov rsi, rax
test rax, rax
jne 0x14002dfd0
lea ecx, [rax + 0xe]
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, r14d
test ebx, ebx
je 0x14002dfe5
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 0x14002e034
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 0x14002e094
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 0x14002e094
inc edi
cmp edi, dword [rbp - 1]
jb 0x14002dfee
test ebx, ebx
je 0x14002e094
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 0x14002e094
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 0x14002e08b
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, r14d
test ebx, ebx
je 0x14002e094
mov ebx, r14d
jmp 0x14002e09c
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.14003c6c0
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret