Function at 0x1400204a0
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 [0x1401e3a38]
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, [0x14019c3b0]
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 0x140020518
mov rcx, qword [rsi]
test rcx, rcx
je 0x14002055e
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 0x1400205cf
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.140020fa0
mov rcx, qword [rdi - 0x10]
call fcn.14005c2f0
mov qword [rdi - 0x10], 0
mov rcx, rdi
call fcn.140022270
lea rax, [0x14019c3e0]
mov qword [rdi - 0x18], rax
mov rcx, qword [rdi - 0x10]
call fcn.14005c2f0
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.14014b5e0
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 0x1400205f5
lea r14, [rsp + 0x68]
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x10]
mov rcx, r14
mov rdx, rdi
call fcn.1400212a0
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_LocalFree]
cmp qword [rsp + 0xa8], 0
je 0x14002055e
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 0x1400208c3
lea rsi, [rsp + 0x68]
lea rbp, [0x14019c3a8]
mov rax, qword [rsp + 0x68]
mov rcx, rsi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test eax, eax
je 0x140020891
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.140020950
lea rcx, [rsp + 0x108]
call fcn.140020950
lea rcx, [rsp + 0x110]
call fcn.140020950
lea rcx, [rsp + 0x118]
call fcn.140020950
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 0x140020748
mov eax, dword [r13 + 0x58]
mov dword [rsp + 0xf8], eax
lea rdx, [r13 + 0x60]
lea rcx, [rsp + 0x100]
call fcn.140021e00
lea rdx, [r13 + 0x68]
lea rcx, [rsp + 0x108]
call fcn.140021e00
lea rdx, [r13 + 0x70]
lea rcx, [rsp + 0x110]
call fcn.140021e00
mov al, byte [r13 + 0x54]
mov byte [rsp + 0xf4], al
test al, al
je 0x140020748
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 0x140020937
mov esi, dword [r13 + 0x80]
mov rax, qword [r13]
mov rcx, r13
call qword [rax + 0x18]
cmp byte [rsp + 0xf4], 0
je 0x1400207cd
mov r15d, eax
mov bl, byte [r13 + 0x84]
lea rcx, [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x1400207cd
mov rax, qword [rsp + 0x40]
mov al, byte [rax + 0x4c]
test al, al
je 0x1400207cd
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x1400207cd
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 0x1400207cd
and bl, 3
cmp bl, 3
jne 0x1400207cd
test r15b, r15b
jne 0x1400207cd
mov esi, 1
test eax, eax
jne 0x1400207cf
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 0x1400207ff
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 0x140020827
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 0x14002084c
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 0x140020871
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 0x1400208aa
inc r12d
mov rax, qword [rsp + 0x68]
mov rcx, rsi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
cmp r12d, eax
jb 0x140020661
mov rcx, rsi
mov rdx, qword [rsp + 0x40]
mov r8d, dword [rsp + 0x4c]
mov r9b, 3
call fcn.140021d10
test al, al
je 0x140020929
mov rax, qword [rsp + 0x40]
add rax, 0x78
mov qword [rsp + 0x40], rax
cmp rax, qword [rsp + 0x60]
jne 0x14002063d
mov rsi, qword [rsp + 0x58]
cmp qword [rsi + 0x18], 8
lea rbp, [0x14019c3b0]
jb 0x1400208e2
mov rsi, qword [rsi]
test rsi, rsi
je 0x14002055e
lea rcx, [rsp + 0x68]
call fcn.140022140
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 0x140020560
xor esi, esi
lea rbp, [0x14019c3b0]
jmp 0x140020560
call fcn.1400209c0
mov byte [rsp + 0xf4], 0
mov ecx, eax
call fcn.140020990
ud2