Function at 0x140018a16
Capabilities:
Compare security identifiers

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x128
mov dword [rsp + 0x44], r8d
mov rdi, rdx
mov rsi, rcx
mov rax, qword [0x14017b750]
xor rax, rsp
mov qword [rsp + 0x120], rax
mov qword [rsp + 0x70], 0
mov byte [rsp + 0x78], 0
mov dword [rsp + 0x7c], 2
lea rbp, [0x140147d80]
mov qword [rsp + 0x68], rbp
xorps xmm0, xmm0
movups xmmword [rsp + 0x8c], xmm0
movups xmmword [rsp + 0x80], xmm0
mov eax, 8
cmp qword [rcx + 0x18], rax
jb 0x140018a8e
mov rcx, qword [rsi]
test rcx, rcx
je 0x140018ad4
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x38], rax
xor eax, eax
mov qword [rsp + 0x30], rax
lea rbx, [rsp + 0xa8]
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
mov edx, 1
mov r8d, 4
xor r9d, r9d
call qword [sym.imp.ADVAPI32.dll_GetNamedSecurityInfoW]
test eax, eax
je 0x140018b45
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor esi, esi
lea rdi, [rsp + 0x80]
mov qword [rdi - 0x18], rbp
xor edx, edx
mov r8d, 0xffffffff
mov rcx, rdi
call fcn.140019534
mov rcx, qword [rdi - 0x10]
call fcn.14004c180
mov qword [rdi - 0x10], 0
mov rcx, rdi
call fcn.14001a6e2
lea rax, [0x140147db0]
mov qword [rdi - 0x18], rax
mov rcx, qword [rdi - 0x10]
call fcn.14004c180
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.14011a890
mov eax, esi
add rsp, 0x128
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov qword [rsp + 0x58], rsi
mov rsi, qword [rsp + 0xa8]
test rsi, rsi
je 0x140018b76
mov r14, rbx
lea rbx, [rsp + 0x68]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
mov rcx, rbx
mov rbx, r14
mov rdx, rsi
call fcn.140019820
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp qword [rsp + 0xa8], 0
je 0x140018ad4
mov rsi, qword [rdi]
mov rax, qword [rdi + 8]
mov qword [rsp + 0x60], rax
cmp rsi, rax
je 0x140018edc
lea r15, [rsp + 0x68]
lea r13, [0x140147d78]
mov rax, qword [rsp + 0x68]
mov rcx, r15
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test eax, eax
je 0x140018e0b
lea rax, [rsi + 8]
mov qword [rsp + 0x50], rax
lea rax, [rsi + 0x4c]
mov qword [rsp + 0x48], rax
xor r12d, r12d
mov qword [rsp + 0xa8], r13
mov byte [rsp + 0xf4], 0
mov dword [rsp + 0xf8], 7
lea rcx, [rsp + 0x100]
call fcn.140018f58
lea rcx, [rsp + 0x108]
call fcn.140018f58
lea rcx, [rsp + 0x110]
call fcn.140018f58
lea rcx, [rsp + 0x118]
call fcn.140018f58
mov rax, qword [rsp + 0x68]
mov rcx, r15
mov edx, r12d
call qword [rax + 0x20]
mov r14, rax
lea rax, [rax + 8]
mov rbp, rbx
cmp rax, rbx
je 0x140018cc0
mov eax, dword [r14 + 0x58]
mov dword [rsp + 0xf8], eax
lea rdx, [r14 + 0x60]
lea rcx, [rsp + 0x100]
call fcn.14001a290
lea rdx, [r14 + 0x68]
lea rcx, [rsp + 0x108]
call fcn.14001a290
lea rdx, [r14 + 0x70]
lea rcx, [rsp + 0x110]
call fcn.14001a290
mov al, byte [r14 + 0x54]
mov byte [rsp + 0xf4], al
test al, al
je 0x140018cc0
mov rdi, r14
add rdi, 0x10
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, eax
lea rdx, [rsp + 0xb0]
mov r8, rdi
call qword [sym.imp.ADVAPI32.dll_CopySid]
test eax, eax
je 0x140018f42
mov ebx, dword [r14 + 0x80]
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x18]
mov edi, eax
cmp byte [rsp + 0xf4], 0
je 0x140018d44
mov r14b, byte [r14 + 0x84]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x140018d44
mov rax, qword [rsp + 0x48]
mov al, byte [rax]
test al, al
je 0x140018d44
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x140018d44
lea rcx, [rsp + 0xb0]
mov rdx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
mov ecx, dword [rsp + 0x44]
and ebx, ecx
cmp ebx, ecx
jne 0x140018d44
and r14b, 3
cmp r14b, 3
jne 0x140018d44
test dil, dil
jne 0x140018d44
mov edi, 1
test eax, eax
jne 0x140018d46
xor edi, edi
mov qword [rsp + 0xa8], r13
mov rdx, qword [rsp + 0x118]
mov eax, 0xffffffff
lock xadd dword [rdx - 8], eax
dec eax
test eax, eax
jg 0x140018d73
add rdx, 0xffffffffffffffe8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, qword [rsp + 0x110]
mov eax, 0xffffffff
lock xadd dword [rdx - 8], eax
dec eax
test eax, eax
mov rbx, rbp
jg 0x140018d9b
add rdx, 0xffffffffffffffe8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, qword [rsp + 0x108]
mov eax, 0xffffffff
lock xadd dword [rdx - 8], eax
dec eax
test eax, eax
jg 0x140018dc0
add rdx, 0xffffffffffffffe8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, qword [rsp + 0x100]
mov eax, 0xffffffff
lock xadd dword [rdx - 8], eax
dec eax
test eax, eax
jg 0x140018de5
add rdx, 0xffffffffffffffe8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test edi, edi
jne 0x140018ecd
inc r12d
mov rax, qword [rsp + 0x68]
mov rcx, r15
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
cmp r12d, eax
jb 0x140018bdc
mov rax, qword [rsp + 0x48]
jmp 0x140018e0f
lea rax, [rsi + 0x4c]
cmp byte [rax], 0
je 0x140018f34
lea rcx, [rsi + 8]
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x140018f34
cmp byte [rsp + 0x78], 0
je 0x140018e41
mov rax, qword [rsp + 0x68]
mov rcx, r15
call qword [rax + 0x10]
mov byte [rsp + 0x78], 0
mov ecx, 0x98
call fcn.14011a524
mov rdi, rax
lea rax, [0x140147e20]
mov qword [rdi], rax
lea rcx, [rdi + 8]
mov rdx, rsi
call fcn.140018950
mov eax, dword [rsp + 0x44]
mov dword [rdi + 0x80], eax
mov byte [rdi + 0x84], 3
xor ebp, ebp
mov qword [rdi + 0x88], rbp
lea rax, [0x140147de0]
mov qword [rdi], rax
mov byte [rdi + 0x90], 1
mov qword [rsp + 0xa8], rdi
lea rcx, [rsp + 0x80]
mov rdx, rbx
call fcn.140019d16
mov rcx, qword [rsp + 0x70]
call fcn.14004c180
mov qword [rsp + 0x70], rbp
mov rcx, qword [rsp + 0xa8]
test rcx, rcx
je 0x140018ecd
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
add rsi, 0x78
cmp rsi, qword [rsp + 0x60]
jne 0x140018bb4
mov rsi, qword [rsp + 0x58]
cmp qword [rsi + 0x18], 8
jb 0x140018ef0
mov rsi, qword [rsi]
test rsi, rsi
je 0x140018f34
lea rcx, [rsp + 0x68]
call fcn.14001a5b6
xor ecx, ecx
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov edx, 1
mov r8d, 4
xor r9d, r9d
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_SetNamedSecurityInfoW]
mov esi, eax
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
sete sil
jmp 0x140018f36
xor esi, esi
lea rbp, [0x140147d80]
jmp 0x140018ad6
call fcn.140018fb2
mov byte [rsp + 0xf4], 0
mov ecx, eax
call fcn.140018f8f
ud2