Function at 0x1400371c4
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 [0x1400592a0]
xor rax, rsp
mov qword [rbp + 0xf], rax
mov rax, rdx
movzx r14d, r9b
xor r13d, r13d
lea rdx, [rbp - 0x19]
mov r12, rcx
mov qword [rbp - 0x21], r13
mov rcx, rax
mov qword [rbp - 0x19], r13
mov r15d, r8d
mov qword [rbp - 9], r13
call qword [sym.imp.ADVAPI32.dll_ConvertStringSidToSidW]
nop dword [rax + rax]
lea edi, [r13 + 4]
mov ebx, eax
test eax, eax
je 0x14003729e
lea rax, [rbp - 9]
xor r9d, r9d
mov qword [rsp + 0x38], rax
mov r8d, edi
lea rax, [rbp - 0x21]
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], rax
mov edx, edi
mov rcx, r12
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_GetSecurityInfo]
nop dword [rax + rax]
test eax, eax
jne 0x14003744d
mov rcx, qword [rbp - 0x21]
lea r9d, [r13 + 2]
lea r8d, [r13 + 0xc]
lea rdx, [rbp - 1]
call qword [sym.imp.ADVAPI32.dll_GetAclInformation]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
je 0x14003729e
mov rcx, qword [rbp - 0x21]
lea r9d, [r13 + 1]
mov r8d, edi
lea rdx, [rbp - 0x29]
call qword [sym.imp.ADVAPI32.dll_GetAclInformation]
nop dword [rax + rax]
mov ebx, eax
test ebx, ebx
je 0x14003745b
mov edi, r13d
cmp dword [rbp - 1], r13d
jbe 0x140037310
mov rcx, qword [rbp - 0x21]
lea r8, [rbp - 0x11]
mov edx, edi
mov qword [rbp - 0x11], r13
call qword [sym.imp.ADVAPI32.dll_GetAce]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
je 0x14003745b
mov rcx, qword [rbp - 0x11]
cmp byte [rcx], r13b
jne 0x140037309
cmp dword [rcx + 4], r15d
jne 0x140037309
mov al, byte [rcx + 1]
and al, r14b
cmp al, r14b
jne 0x140037309
mov rdx, qword [rbp - 0x19]
add rcx, 8
call qword [sym.imp.ADVAPI32.dll_EqualSid]
nop dword [rax + rax]
test eax, eax
jne 0x1400374c4
inc edi
cmp edi, dword [rbp - 1]
jb 0x1400372af
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
nop dword [rax + rax]
lea edi, [rax + 8]
cmp edi, 8
jae 0x14003733c
mov ecx, 0x216
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov ebx, r13d
mov ecx, dword [rbp + 3]
lea esi, [rcx + rdi]
cmp esi, ecx
jb 0x140037386
mov rdi, r13
test ebx, ebx
je 0x14003739d
mov ecx, esi
call fcn.1400014a0
mov rdi, rax
test rax, rax
jne 0x14003736d
lea ecx, [rax + 0xe]
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
jmp 0x14003739a
mov r8d, dword [rbp - 0x29]
mov edx, esi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_InitializeAcl]
nop dword [rax + rax]
mov ebx, eax
jmp 0x14003739d
mov ecx, 0x216
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov rdi, r13
mov ebx, r13d
mov esi, r13d
cmp dword [rbp - 1], r13d
jbe 0x1400373f8
mov rcx, qword [rbp - 0x21]
lea r8, [rbp - 0x11]
mov edx, esi
mov qword [rbp - 0x11], r13
call qword [sym.imp.ADVAPI32.dll_GetAce]
nop dword [rax + rax]
test eax, eax
je 0x14003745b
mov r9, qword [rbp - 0x11]
or r8d, 0xffffffff
mov edx, dword [rbp - 0x29]
mov rcx, rdi
movzx eax, word [r9 + 2]
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_AddAce]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
je 0x14003745b
inc esi
cmp esi, dword [rbp - 1]
jb 0x1400373a6
test ebx, ebx
je 0x14003745b
mov rax, qword [rbp - 0x19]
mov r8d, r14d
mov edx, dword [rbp - 0x29]
mov r9d, r15d
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAceEx]
nop dword [rax + rax]
test eax, eax
je 0x14003745b
xor r9d, r9d
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x28], rdi
mov rcx, r12
mov qword [rsp + 0x20], r13
lea edx, [r9 + 4]
mov r8d, edx
call qword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
nop dword [rax + rax]
test eax, eax
je 0x1400374c4
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop dword [rax + rax]
mov rcx, qword [rbp - 9]
mov qword [rbp - 0x21], r13
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x19]
mov qword [rbp - 9], r13
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop dword [rax + rax]
mov eax, ebx
mov rcx, qword [rbp + 0xf]
xor rcx, rsp
call fcn.1400017f0
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov ebx, r13d
jmp 0x140037469