Function at 0x105ce1c
Capabilities:
Compare security identifiers

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ebx
call sub.ADVAPI32.dll_ConvertStringSidToSidW
mov esi, eax
cmp esi, ebx
je 0x105d003
lea eax, [ebp - 0x10]
push eax
push ebx
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push 4
push 4
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_GetSecurityInfo]
cmp eax, ebx
je 0x105ce6d
push eax
xor esi, esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, ebx
je 0x105d003
mov edi, dword [sym.imp.ADVAPI32.dll_GetAclInformation]
push 2
push 0xc
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 4]
call edi
mov esi, eax
cmp esi, ebx
je 0x105d003
push 1
push 4
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 4]
call edi
mov esi, eax
cmp esi, ebx
je 0x105d003
mov dword [ebp + 0xc], ebx
cmp dword [ebp - 0x20], ebx
jbe 0x105cf08
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x14], ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_GetAce]
mov esi, eax
cmp esi, ebx
je 0x105d003
mov edi, dword [ebp - 0x14]
cmp byte [edi], bl
jne 0x105cefd
mov eax, dword [ebp + 0x10]
cmp dword [edi + 4], eax
jne 0x105cefd
mov al, byte [edi + 1]
and al, byte [ebp + 0x14]
cmp al, byte [ebp + 0x14]
jne 0x105cefd
push dword [ebp - 8]
add edi, 8
push edi
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x105cffb
inc dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0x20]
jb 0x105ceb1
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
add eax, 8
mov dword [ebp + 0xc], eax
mov edi, 0x216
cmp eax, 8
jae 0x105cf2d
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp + 0xc]
xor esi, esi
lea ecx, [ebp + 0xc]
push ecx
push eax
push dword [ebp - 0x1c]
call fcn.0105e5a0
test eax, eax
jge 0x105cf47
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor esi, esi
xor edi, edi
cmp esi, ebx
je 0x105cf79
push dword [ebp + 0xc]
call sub.msvcrt.dll_void____cdecl_operator_new___unsigned_int_
mov edi, eax
pop ecx
cmp edi, ebx
jne 0x105cf66
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor esi, esi
cmp esi, ebx
je 0x105cf79
push dword [ebp - 0xc]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.ADVAPI32.dll_InitializeAcl]
mov esi, eax
mov dword [ebp + 0xc], ebx
cmp dword [ebp - 0x20], ebx
jbe 0x105cfbe
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 0x14], ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_GetAce]
cmp eax, ebx
je 0x105d003
mov eax, dword [ebp - 0x14]
movzx ecx, word [eax + 2]
push ecx
push eax
push 0xffffffffffffffff
push dword [ebp - 0xc]
push edi
call dword [sym.imp.ADVAPI32.dll_AddAce]
mov esi, eax
cmp esi, ebx
je 0x105d003
inc dword [ebp + 0xc]
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 0x20]
jb 0x105cf81
cmp esi, ebx
je 0x105d003
push dword [ebp - 8]
movzx eax, byte [ebp + 0x14]
push dword [ebp + 0x10]
push eax
push dword [ebp - 0xc]
push edi
call dword [sym.imp.ADVAPI32.dll_AddAccessAllowedAceEx]
mov esi, eax
cmp esi, ebx
je 0x105d003
push ebx
push edi
push ebx
push ebx
push 4
push 4
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
cmp eax, ebx
je 0x105cffb
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor esi, esi
cmp esi, ebx
je 0x105d003
xor edi, edi
jmp 0x105d00b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call esi
push dword [ebp - 0x10]
mov dword [ebp - 4], ebx
call esi
push dword [ebp - 8]
mov dword [ebp - 0x10], ebx
call esi
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0x10