Function at 0x401b80
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c2b40
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x501814]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4c], eax
test ebx, ebx
je 0x401ea6
test eax, eax
je 0x401ea6
push eax
call dword [sym.imp.ADVAPI32.dll_IsValidSecurityDescriptor]
test eax, eax
je 0x401ea6
push 0x64
mov dword [ebp - 4], 0
call dword [0x4f90e0]
mov edi, eax
add esp, 4
test edi, edi
je 0x401cf2
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0
push eax
mov esi, 0x64
push esi
push edi
push 5
push ebx
call dword [sym.imp.ADVAPI32.dll_GetKernelObjectSecurity]
test eax, eax
jne 0x401c7d
nop
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x401cf2
mov eax, dword [ebp - 0x44]
cmp esi, eax
jae 0x401cf2
mov esi, eax
mov dword [ebp - 4], 6
test edi, edi
je 0x401c43
push edi
call dword [0x4f90e8]
add esp, 4
xor edi, edi
mov byte [ebp - 4], 5
test esi, esi
je 0x401cf2
push esi
call dword [0x4f90e0]
mov edi, eax
add esp, 4
test edi, edi
je 0x401cf2
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0
push eax
push esi
push edi
push 5
push ebx
call dword [sym.imp.ADVAPI32.dll_GetKernelObjectSecurity]
test eax, eax
je 0x401c10
cmp dword [ebp - 0x44], esi
ja 0x401cf2
push edi
call dword [sym.imp.ADVAPI32.dll_IsValidSecurityDescriptor]
test eax, eax
je 0x401cf2
mov ebx, dword [ebp - 0x4c]
lea eax, [ebp - 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorOwner]
push eax
lea eax, [ebp - 0x58]
mov dword [ebp - 0x58], 0
push eax
push ebx
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
call esi
test eax, eax
je 0x401cf2
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x50]
push eax
push edi
call esi
test eax, eax
je 0x401cf2
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x18]
jne 0x401cf2
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x401d10
mov ecx, dword [ebp - 0x50]
test ecx, ecx
je 0x401cf2
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x401d16
xor esi, esi
mov dword [ebp - 4], 0x1f
test edi, edi
je 0x401d09
push edi
call dword [0x4f90e8]
add esp, 4
mov eax, esi
jmp 0x401ea8
cmp dword [ebp - 0x50], 0
jne 0x401cf2
mov esi, dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x54]
mov dword [ebp - 0x54], 0
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x48], 0
push eax
push ebx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
call esi
test eax, eax
je 0x401cf2
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x20]
push eax
push edi
call esi
test eax, eax
je 0x401cf2
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x20]
jne 0x401cf2
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x28]
jne 0x401cf2
test ecx, ecx
je 0x401e9c
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x401e92
cmp dword [ebp - 0x48], 0
je 0x401cf2
mov esi, dword [sym.imp.ADVAPI32.dll_GetAclInformation]
lea ecx, [ebp - 0x34]
push 2
push 0xc
xorps xmm0, xmm0
mov dword [ebp - 0x2c], 0
push ecx
push eax
movq qword [ebp - 0x34], xmm0
movq qword [ebp - 0x40], xmm0
mov dword [ebp - 0x38], 0
call esi
test eax, eax
je 0x401cf2
push 2
push 0xc
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x48]
call esi
test eax, eax
je 0x401cf2
mov eax, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x40]
jne 0x401cf2
xor esi, esi
test eax, eax
je 0x401e9c
mov ebx, dword [sym.imp.ADVAPI32.dll_GetAce]
lea eax, [ebp - 0x44]
push eax
push esi
push dword [ebp - 0x54]
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x4c], 0
call ebx
test eax, eax
je 0x401cf2
lea eax, [ebp - 0x4c]
push eax
push esi
push dword [ebp - 0x48]
call ebx
test eax, eax
je 0x401cf2
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x4c]
mov bl, byte [ecx]
cmp bl, byte [edx]
jne 0x401cf2
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x401cf2
movzx eax, bl
sub eax, 0
je 0x401e65
sub eax, 1
jne 0x401cf2
mov eax, dword [ecx + 4]
cmp eax, dword [edx + 4]
jne 0x401cf2
lea eax, [edx + 8]
push eax
lea eax, [ecx + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x401cf2
inc esi
cmp esi, dword [ebp - 0x34]
jae 0x401e9c
jmp 0x401e00
cmp dword [ebp - 0x48], 0
jne 0x401cf2
mov esi, 1
jmp 0x401cf4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a559d
mov esp, ebp
pop ebp
ret