Function at 0x4ca3c0
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6c3767
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x7ef784]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
test edi, edi
jne 0x4ca403
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x18], 0
push 0xc
mov dword [ebp - 4], 0
call fcn.006391c8
mov esi, eax
add esp, 4
mov dword [ebp - 0x18], esi
test esi, esi
je 0x4ca43a
mov dword [esi + 4], 0
mov dword [esi + 8], 1
mov dword [esi], 0
jmp 0x4ca43c
xor esi, esi
mov byte [ebp - 4], 0
mov dword [ebp - 0x18], esi
test esi, esi
je 0x4ca5c5
mov eax, dword [edi]
push esi
push 4
push edi
mov edi, dword [eax + 0x54]
mov ecx, edi
call dword [0x70a5a4]
call edi
test eax, eax
js 0x4ca47d
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x14]
push eax
push 1
push dword [esi]
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW
test eax, eax
jne 0x4ca489
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0xc]
xor bl, bl
mov dword [ecx], eax
jmp 0x4ca571
push 0x44
push 0
mov dword [ebp - 0x24], 0x44
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
lea eax, [ebp - 0x24]
push eax
push edi
push 0
push 1
mov dword [ebp - 0x18], edi
call dword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
test eax, eax
je 0x4ca4cb
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x4ca4ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0xc]
push dword [ebp - 0x14]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor bl, bl
jmp 0x4ca571
lea eax, [ebp - 0x1c]
xor bl, bl
push eax
lea eax, [ebp - 0x20]
mov byte [ebp - 0xd], bl
push eax
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_GetExplicitEntriesFromAclW]
test eax, eax
jne 0x4ca556
xor ebx, ebx
cmp dword [ebp - 0x20], ebx
jbe 0x4ca561
mov ecx, dword [ebp - 0x1c]
xor edi, edi
push dword [edi + ecx + 0x1c]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
mov ecx, dword [ebp - 0x1c]
test eax, eax
je 0x4ca53e
mov eax, dword [edi + ecx + 4]
cmp eax, 1
je 0x4ca535
cmp eax, 2
jne 0x4ca53e
cmp dword [edi + ecx], 0x120089
je 0x4ca54f
inc ebx
add edi, 0x20
cmp ebx, dword [ebp - 0x20]
jb 0x4ca513
mov edi, dword [ebp - 0x18]
mov bl, byte [ebp - 0xd]
jmp 0x4ca561
mov edi, dword [ebp - 0x18]
mov bl, 1
jmp 0x4ca561
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
or eax, 0xffffffff
lock xadd dword [esi + 8], eax
dec eax
jne 0x4ca5b1
mov eax, dword [esi]
test eax, eax
je 0x4ca58f
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x4ca5a6
push eax
call fcn.006391b2
add esp, 4
mov dword [esi + 4], 0
push 0xc
push esi
call fcn.006391f8
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x8007000e
call fcn.0056c4a0
int3