Function at 0x140015f90
Capabilities:
Compare security identifiers

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x1400ad768]
xor rax, rsp
mov qword [rbp - 8], rax
mov r13, r8
lea r9, [rbp - 0x28]
mov r12, rdx
lea r8, [rbp - 0x38]
lea rdx, [rbp - 0x40]
xor edi, edi
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x14002afc0
cmp dword [rbp - 0x40], edi
je 0x14002afcd
mov rcx, qword [rbp - 0x38]
lea r9d, [rdi + 2]
lea r8d, [rdi + 0xc]
lea rdx, [rbp - 0x18]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_GetAclInformation]
test eax, eax
je 0x14002afc0
xor r14d, r14d
xor esi, esi
xor ebx, ebx
cmp dword [rbp - 0x18], ebx
jbe 0x1400161da
lea r15d, [rdi + 1]
mov rcx, qword [rbp - 0x38]
lea r8, [rbp - 0x20]
mov edx, ebx
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_GetAce]
test eax, eax
je 0x14002afc0
mov rax, qword [rbp - 0x20]
cmp byte [rax], dil
jne 0x140016074
mov rdx, qword [0x1400af1c8]
lea r15, [rax + 8]
mov rcx, r15
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_EqualSid]
test eax, eax
jne 0x140016192
mov rdx, qword [0x1400af1c0]
mov rcx, r15
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_EqualSid]
test eax, eax
mov r15d, 1
cmovne esi, r15d
test r14d, r14d
jne 0x14001619b
add ebx, r15d
cmp ebx, dword [rbp - 0x18]
jb 0x140016012
test r14d, r14d
je 0x1400161da
test esi, esi
jne 0x1400161da
mov rcx, qword [0x1400af1c0]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_GetLengthSid]
mov ebx, dword [rbp - 0x14]
add ebx, eax
lea ecx, [rbx + 0xc]
call sym.spoolsv.exe_PrvDllAllocSplMem
mov rdi, rax
test rax, rax
je 0x14002afd7
lea r14d, [rsi + 2]
mov rcx, rax
mov r8d, r14d
lea edx, [rbx + 0xc]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_InitializeAcl]
test eax, eax
je 0x14002afe1
xor ebx, ebx
cmp dword [rbp - 0x18], ebx
jbe 0x140016138
mov rcx, qword [rbp - 0x38]
lea r8, [rbp - 0x30]
mov edx, ebx
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_GetAce]
test eax, eax
je 0x14002afe1
mov r9, qword [rbp - 0x30]
or r8d, 0xffffffff
mov edx, r14d
mov rcx, rdi
movzx eax, word [r9 + 2]
mov dword [rsp + 0x20], eax
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_AddAce]
test eax, eax
je 0x14002afe1
mov rsi, qword [rbp - 0x30]
cmp byte [rsi], 0
jne 0x140016130
mov rdx, qword [0x1400af1c8]
lea rcx, [rsi + 8]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_EqualSid]
test eax, eax
jne 0x1400161a8
add ebx, r15d
cmp ebx, dword [rbp - 0x18]
jb 0x1400160d5
mov edx, r15d
mov rcx, r12
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x14002afe1
xor r9d, r9d
mov r8, rdi
mov edx, r15d
mov rcx, r12
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_SetSecurityDescriptorDacl]
test eax, eax
je 0x14002afe1
mov qword [r13], rdi
xor ebx, ebx
mov eax, ebx
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.14001aad0
mov rbx, qword [rsp + 0xc8]
add rsp, 0x70
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov r15d, 1
mov r14d, r15d
test esi, esi
je 0x140016074
jmp 0x14001607c
mov rax, qword [rbp - 0x30]
mov edx, r14d
mov r9d, dword [rsi + 4]
mov rcx, rdi
movzx r8d, byte [rax + 1]
mov rax, qword [0x1400af1c0]
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_AddAccessAllowedAceEx]
test eax, eax
jne 0x140016130
jmp 0x14002afe1
mov ebx, 0xb7
test rdi, rdi
je 0x14001616c
jmp 0x14002afee
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
jmp 0x14001616c
mov ebx, 0x57
jmp 0x14001616c
mov ebx, 8
jmp 0x14001616c
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
jmp 0x1400161df
mov rcx, qword [0x1400af198]
mov r8, rdi
xor edx, edx
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop
jmp 0x14001616c