Function at 0x5d532fd9
Capabilities:
Compare security identifiers

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x58
push esi
xor esi, esi
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 8], esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x14], esi
cmp dword [ebp + 8], esi
je 0x5d53349e
push ebx
mov ebx, dword [ebp + 0xc]
test ebx, ebx
je 0x5d53349d
cmp dword [ebp + 0x10], esi
je 0x5d53349d
mov eax, dword [ecx + 0x1c]
test eax, eax
je 0x5d53349d
mov eax, dword [eax + 0x24]
nop
test eax, eax
je 0x5d53349d
mov eax, dword [ecx + 0x1c]
push edi
mov edi, esi
mov ecx, dword [eax + 0x14]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x40], ecx
mov dword [ebp - 0x38], eax
test eax, eax
je 0x5d53349c
mov eax, ecx
mov dword [ebp - 0x30], ecx
push dword [ebp + 8]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x5d533073
mov eax, dword [ebp - 0x30]
inc edi
add eax, 0x28
mov dword [ebp - 0x30], eax
cmp edi, dword [ebp - 0x38]
jb 0x5d533050
jmp 0x5d53349c
test edi, edi
js 0x5d53349c
imul eax, edi, 0x28
mov edi, dword [ebp - 0x40]
lfence
mov dword [ebp - 0x24], eax
imul eax, dword [eax + edi + 0x20], 0xc
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x28], eax
test eax, eax
je 0x5d53349c
mov eax, dword [ebp - 0x3c]
push dword [eax + 0xc]
call dword [sym.imp.ntdll.dll_RtlLengthSid]
push ebx
mov dword [ebp - 0x30], eax
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorLength]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 8]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorOwner]
test eax, eax
je 0x5d533458
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0xc]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorGroup]
test eax, eax
je 0x5d533458
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x2c]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorSacl]
test eax, eax
je 0x5d533458
mov eax, dword [ebp - 0x24]
mov ebx, esi
mov dword [ebp - 0x1c], ebx
mov ecx, dword [eax + edi + 0x24]
mov dword [ebp - 0x10], ecx
cmp dword [eax + edi + 0x20], esi
jbe 0x5d53344a
mov eax, dword [ebp - 0x28]
add eax, 8
mov dword [ebp - 0x54], 3
mov dword [ebp - 0x20], eax
mov eax, dword [ecx + ebx*4]
movzx eax, word [eax]
add eax, 2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, eax
mov eax, dword [ebp - 0x20]
mov dword [eax - 8], edx
test edx, edx
je 0x5d533458
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + ebx*4]
movzx eax, word [ecx]
push eax
push dword [ecx + 4]
push edx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x10]
add esp, 0xc
mov eax, dword [eax + ebx*4]
mov eax, dword [eax + 0x20]
add eax, dword [ebp - 0x38]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
mov eax, dword [ebp - 0x20]
mov dword [eax - 4], ebx
test ebx, ebx
je 0x5d533458
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x34], esi
push eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x50], esi
push eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], esi
mov eax, dword [ecx + eax*4]
push dword [eax + 0x24]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
je 0x5d533458
mov eax, 0x8000
mov byte [ebx], 1
mov word [ebx + 2], ax
lea edx, [ebx + 0x14]
mov dword [ebp - 4], edx
cmp dword [ebp - 8], esi
je 0x5d5331fe
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_RtlLengthSid]
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov dword [ebx + 4], 0x14
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_RtlLengthSid]
mov edx, dword [ebp - 4]
add edx, eax
mov dword [ebp - 4], edx
cmp dword [ebp - 0xc], esi
je 0x5d533234
push dword [ebp - 0xc]
call dword [sym.imp.ntdll.dll_RtlLengthSid]
push eax
push dword [ebp - 0xc]
push dword [ebp - 4]
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 4]
add esp, 0xc
sub eax, ebx
mov dword [ebx + 8], eax
push dword [ebp - 0xc]
call dword [sym.imp.ntdll.dll_RtlLengthSid]
mov edx, dword [ebp - 4]
add edx, eax
mov dword [ebp - 4], edx
cmp dword [ebp - 0x2c], esi
je 0x5d53326d
cmp dword [ebp - 0x14], esi
je 0x5d53326d
push 0x10
pop eax
or word [ebx + 2], ax
mov ecx, dword [ebp - 0x14]
movzx eax, word [ecx + 2]
push eax
push ecx
push edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 4]
add esp, 0xc
mov eax, edx
sub eax, ebx
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 2]
add edx, eax
mov dword [ebp - 4], edx
cmp dword [ebp - 0x34], esi
je 0x5d533298
cmp dword [ebp - 0x18], esi
je 0x5d533298
push 4
pop eax
or word [ebx + 2], ax
mov ecx, dword [ebp - 0x18]
movzx eax, word [ecx + 2]
push eax
push ecx
push edx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 4]
add esp, 0xc
sub eax, ebx
mov dword [ebx + 0x10], eax
mov ebx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx + ebx*4]
cmp dword [eax + 0x1c], esi
je 0x5d533435
mov eax, dword [eax + 0x18]
test eax, eax
je 0x5d533435
mov ecx, dword [ebp - 0x38]
add eax, 3
and eax, 0xfffffffc
add ecx, 0x14
add eax, dword [ebp - 0x30]
add eax, ecx
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
mov eax, dword [ebp - 0x20]
mov dword [eax], ebx
test ebx, ebx
je 0x5d533458
mov eax, 0x8000
mov byte [ebx], 1
mov word [ebx + 2], ax
lea edx, [ebx + 0x14]
mov dword [ebp - 4], edx
cmp dword [ebp - 8], esi
je 0x5d533325
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_RtlLengthSid]
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov dword [ebx + 4], 0x14
push dword [ebp - 8]
call dword [sym.imp.ntdll.dll_RtlLengthSid]
mov edx, dword [ebp - 4]
add edx, eax
mov dword [ebp - 4], edx
cmp dword [ebp - 0xc], esi
je 0x5d53335b
push dword [ebp - 0xc]
call dword [sym.imp.ntdll.dll_RtlLengthSid]
push eax
push dword [ebp - 0xc]
push dword [ebp - 4]
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 4]
add esp, 0xc
sub eax, ebx
mov dword [ebx + 8], eax
push dword [ebp - 0xc]
call dword [sym.imp.ntdll.dll_RtlLengthSid]
mov edx, dword [ebp - 4]
add edx, eax
mov dword [ebp - 4], edx
cmp dword [ebp - 0x2c], esi
je 0x5d533394
cmp dword [ebp - 0x14], esi
je 0x5d533394
push 0x10
pop eax
or word [ebx + 2], ax
mov ecx, dword [ebp - 0x14]
movzx eax, word [ecx + 2]
push eax
push ecx
push edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 4]
add esp, 0xc
mov eax, edx
sub eax, ebx
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 2]
add edx, eax
mov dword [ebp - 4], edx
mov ecx, dword [ebp - 0x10]
push 4
pop eax
or word [ebx + 2], ax
mov eax, dword [ebp - 0x1c]
push 2
push 3
mov dword [ebp - 0x18], edx
mov eax, dword [ecx + eax*4]
pop ecx
mov eax, dword [eax + 0x18]
add eax, ecx
mov ecx, dword [ebp - 0x30]
and eax, 0xfffffffc
add ecx, 0x14
add eax, ecx
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
test eax, eax
je 0x5d533458
mov eax, dword [ebp - 0x3c]
push dword [eax + 0xc]
push 1
push 2
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
test eax, eax
je 0x5d533458
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x58], 0xfffc
mov byte [ecx + 8], 9
mov eax, dword [eax + edx*4]
mov ax, word [eax + 0x18]
add ax, word [ebp - 0x54]
and ax, word [ebp - 0x58]
add word [ecx + 0xa], ax
add ecx, 0x10
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + edx*4]
push dword [eax + 0x18]
push dword [eax + 0x1c]
mov eax, dword [ebp - 0x30]
add eax, ecx
push eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 4]
add esp, 0xc
mov ecx, dword [ebp - 0x10]
sub eax, ebx
mov dword [ebx + 0x10], eax
mov ebx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x24]
inc ebx
add dword [ebp - 0x20], 0xc
mov dword [ebp - 0x1c], ebx
cmp ebx, dword [eax + edi + 0x20]
jb 0x5d53312b
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x28]
mov dword [edx], ecx
mov esi, dword [eax + edi + 0x20]
jmp 0x5d53349c
mov eax, dword [ebp - 0x24]
cmp dword [eax + edi + 0x20], esi
jbe 0x5d533493
mov edi, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x40]
add edi, 4
push dword [edi - 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x24]
lea edi, [edi + 0xc]
inc esi
cmp esi, dword [eax + ebx + 0x20]
jb 0x5d53346a
xor esi, esi
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
pop ebx
mov eax, esi
pop esi
leave
ret 0xc