Function at 0x140031080
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 [0x140051580]
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 0x14003115a
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 0x140031305
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 0x14003115a
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 0x140031313
mov edi, r13d
cmp edi, dword [rbp - 1]
jae 0x1400311c8
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 0x140031313
mov rcx, qword [rbp - 0x11]
cmp byte [rcx], r13b
jne 0x1400311c4
cmp dword [rcx + 4], r15d
jne 0x1400311c4
mov al, byte [rcx + 1]
and al, r14b
cmp al, r14b
jne 0x1400311c4
mov rdx, qword [rbp - 0x19]
add rcx, 8
call qword [sym.imp.ADVAPI32.dll_EqualSid]
nop dword [rax + rax]
test eax, eax
jne 0x14003137c
inc edi
jmp 0x140031165
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
nop dword [rax + rax]
lea edi, [rax + 8]
cmp edi, 8
jae 0x1400311f4
mov ecx, 0x216
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov ebx, r13d
mov eax, dword [rbp + 3]
lea esi, [rax + rdi]
cmp esi, eax
jb 0x14003123e
mov rdi, r13
test ebx, ebx
je 0x140031255
mov ecx, esi
call fcn.14000130c
mov rdi, rax
test rax, rax
jne 0x140031225
lea ecx, [rax + 0xe]
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
jmp 0x140031252
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 0x140031255
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 0x1400312b0
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 0x140031313
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 0x140031313
inc esi
cmp esi, dword [rbp - 1]
jb 0x14003125e
test ebx, ebx
je 0x140031313
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 0x140031313
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 0x14003137c
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.140001660
add rsp, 0x88
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov ebx, r13d
jmp 0x140031321