Function at 0x5d7ab0
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x70f200]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x28], edi
test edi, edi
je 0x5d7ca6
push edi
call dword [sym.imp.ADVAPI32.dll_IsValidAcl]
test eax, eax
je 0x5d7ca6
mov eax, dword [ebx]
movzx ecx, word [edi + 4]
mov dword [ebp - 0x38], ecx
movzx esi, word [eax + 4]
mov dword [ebp - 0x24], esi
test ecx, ecx
je 0x5d7ca6
xor ebx, ebx
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x2c], ebx
test esi, esi
je 0x5d7b8f
mov ecx, 0x14
mov eax, esi
mul ecx
mov ecx, 0xffffffff
push 0x61e70c
cmovb eax, ecx
push eax
call fcn.0041e7d8
add esp, 8
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x5d7ca6
xor edi, edi
test esi, esi
je 0x5d7b8c
mov esi, eax
mov eax, dword [ebp - 0x30]
push esi
push edi
push dword [eax]
call fcn.005d79e0
test al, al
je 0x5d7b70
mov ecx, dword [ebp - 0x20]
cmp byte [esi], 0
lea eax, [ecx + 1]
cmovne eax, ecx
cmp byte [esi + 1], 0
mov dword [ebp - 0x20], eax
lea eax, [ebx + 1]
cmovne eax, ebx
mov dword [ebp - 0x1c], eax
jmp 0x5d7b7d
xorps xmm0, xmm0
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov ebx, dword [ebp - 0x1c]
inc edi
add esi, 0x14
cmp edi, dword [ebp - 0x24]
jb 0x5d7b42
mov esi, dword [ebp - 0x24]
mov edi, dword [ebp - 0x28]
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x34], ecx
cmp dword [ebp - 0x38], ecx
jbe 0x5d7c3d
lea eax, [ebp - 0x18]
push eax
push ecx
push edi
call fcn.005d79e0
test al, al
je 0x5d7c24
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_IsValidSid]
test eax, eax
je 0x5d7c24
mov edx, dword [ebp + 0xc]
test dl, 1
je 0x5d7bfa
xor cl, cl
xor edi, edi
test esi, esi
je 0x5d7bfa
mov esi, dword [ebp - 0x2c]
add esi, 0xc
mov eax, dword [esi]
test eax, eax
je 0x5d7bea
push dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
mov cl, al
test cl, cl
jne 0x5d7c24
inc edi
add esi, 0x14
cmp edi, dword [ebp - 0x24]
jb 0x5d7bd4
test cl, cl
jne 0x5d7c24
mov edx, dword [ebp + 0xc]
mov cl, byte [ebp - 0x17]
test dl, 2
je 0x5d7c06
test cl, cl
je 0x5d7c24
test dl, 4
je 0x5d7c0f
test cl, cl
jne 0x5d7c24
mov al, byte [ebp - 0x18]
test dl, 8
je 0x5d7c1b
test al, al
je 0x5d7c24
test dl, 0x10
je 0x5d7c52
test al, al
je 0x5d7c56
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x34]
mov esi, dword [ebp - 0x24]
inc ecx
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x34], ecx
cmp ecx, dword [ebp - 0x38]
jb 0x5d7ba2
pop edi
pop esi
mov eax, edx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret 8
test al, al
jne 0x5d7c62
mov esi, dword [ebp - 0x20]
test cl, cl
mov eax, ebx
cmove eax, esi
jmp 0x5d7c6d
mov esi, dword [ebp - 0x20]
or eax, 0xffffffff
test cl, cl
cmove eax, ebx
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x30]
push dword [ebp - 8]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_AddAce]
mov edx, dword [ebp - 0x1c]
neg eax
sbb eax, eax
neg eax
add edx, eax
cmp byte [ebp - 0x17], 0
mov dword [ebp - 0x1c], edx
jne 0x5d7c27
xor eax, eax
cmp byte [ebp - 0x18], al
sete al
add esi, eax
inc ebx
mov dword [ebp - 0x20], esi
jmp 0x5d7c27
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041e1b5
mov esp, ebp
pop ebp
ret 8