Function at 0x140020460
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 + 0x4c], r8d
mov r15, rdx
mov rsi, rcx
mov rax, qword [0x1401e3a68]
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, [0x14019b1e0]
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 0x1400204d8
mov rcx, qword [rsi]
test rcx, rcx
je 0x14002051e
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 0x14002058f
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor esi, esi
lea rdi, [rsp + 0x80]
mov qword [rdi - 0x18], rbp
mov rcx, rdi
xor edx, edx
mov r8d, 0xffffffff
call fcn.140020f60
mov rcx, qword [rdi - 0x10]
call fcn.14005c1d0
mov qword [rdi - 0x10], 0
mov rcx, rdi
call fcn.140022230
lea rax, [0x14019b210]
mov qword [rdi - 0x18], rax
mov rcx, qword [rdi - 0x10]
call fcn.14005c1d0
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.14014ac50
mov eax, esi
add rsp, 0x128
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov rdi, qword [rsp + 0xa8]
test rdi, rdi
je 0x1400205b5
lea r14, [rsp + 0x68]
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x10]
mov rcx, r14
mov rdx, rdi
call fcn.140021260
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp qword [rsp + 0xa8], 0
je 0x14002051e
mov qword [rsp + 0x58], rsi
mov rcx, qword [r15]
mov rax, qword [r15 + 8]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x40], rcx
cmp rcx, rax
je 0x140020883
lea rsi, [rsp + 0x68]
lea rbp, [0x14019b1d8]
mov rax, qword [rsp + 0x68]
mov rcx, rsi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test eax, eax
je 0x140020851
mov rax, qword [rsp + 0x40]
lea rax, [rax + 8]
mov qword [rsp + 0x50], rax
xor r12d, r12d
mov r14, rbp
mov qword [rsp + 0xa8], rbp
mov byte [rsp + 0xf4], 0
mov dword [rsp + 0xf8], 7
lea rcx, [rsp + 0x100]
call fcn.140020910
lea rcx, [rsp + 0x108]
call fcn.140020910
lea rcx, [rsp + 0x110]
call fcn.140020910
lea rcx, [rsp + 0x118]
call fcn.140020910
mov rax, qword [rsp + 0x68]
mov rcx, rsi
mov edx, r12d
call qword [rax + 0x20]
mov r13, rax
lea rax, [rax + 8]
mov rdi, rbx
cmp rax, rbx
je 0x140020708
mov eax, dword [r13 + 0x58]
mov dword [rsp + 0xf8], eax
lea rdx, [r13 + 0x60]
lea rcx, [rsp + 0x100]
call fcn.140021dc0
lea rdx, [r13 + 0x68]
lea rcx, [rsp + 0x108]
call fcn.140021dc0
lea rdx, [r13 + 0x70]
lea rcx, [rsp + 0x110]
call fcn.140021dc0
mov al, byte [r13 + 0x54]
mov byte [rsp + 0xf4], al
test al, al
je 0x140020708
mov rsi, r13
add rsi, 0x10
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, eax
lea rdx, [rsp + 0xb0]
mov r8, rsi
call qword [sym.imp.ADVAPI32.dll_CopySid]
test eax, eax
je 0x1400208f7
mov esi, dword [r13 + 0x80]
mov rax, qword [r13]
mov rcx, r13
call qword [rax + 0x18]
cmp byte [rsp + 0xf4], 0
je 0x14002078d
mov r15d, eax
mov bl, byte [r13 + 0x84]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x14002078d
mov rax, qword [rsp + 0x40]
mov al, byte [rax + 0x4c]
test al, al
je 0x14002078d
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x14002078d
lea rcx, [rsp + 0xb0]
mov rdx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_EqualSid]
mov ecx, dword [rsp + 0x4c]
and esi, ecx
cmp esi, ecx
jne 0x14002078d
and bl, 3
cmp bl, 3
jne 0x14002078d
test r15b, r15b
jne 0x14002078d
mov esi, 1
test eax, eax
jne 0x14002078f
xor esi, esi
mov rbp, r14
mov qword [rsp + 0xa8], r14
mov rdx, qword [rsp + 0x118]
mov eax, 0xffffffff
lock xadd dword [rdx - 8], eax
dec eax
test eax, eax
jg 0x1400207bf
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, rdi
jg 0x1400207e7
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 0x14002080c
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 0x140020831
add rdx, 0xffffffffffffffe8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test esi, esi
lea rsi, [rsp + 0x68]
jne 0x14002086a
inc r12d
mov rax, qword [rsp + 0x68]
mov rcx, rsi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
cmp r12d, eax
jb 0x140020621
mov rcx, rsi
mov rdx, qword [rsp + 0x40]
mov r8d, dword [rsp + 0x4c]
mov r9b, 3
call fcn.140021cd0
test al, al
je 0x1400208e9
mov rax, qword [rsp + 0x40]
add rax, 0x78
mov qword [rsp + 0x40], rax
cmp rax, qword [rsp + 0x60]
jne 0x1400205fd
mov rsi, qword [rsp + 0x58]
cmp qword [rsi + 0x18], 8
lea rbp, [0x14019b1e0]
jb 0x1400208a2
mov rsi, qword [rsi]
test rsi, rsi
je 0x14002051e
lea rcx, [rsp + 0x68]
call fcn.140022100
xor ecx, ecx
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov rcx, rsi
mov edx, 1
mov r8d, 4
xor r9d, r9d
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 0x140020520
xor esi, esi
lea rbp, [0x14019b1e0]
jmp 0x140020520
call fcn.140020980
mov byte [rsp + 0xf4], 0
mov ecx, eax
call fcn.140020950
ud2