Function at 0x5baec56b
Capabilities:
Compare security identifiers

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [0x5bb70c3c]
push ebx
xor ebx, ebx
mov dword [ebp - 4], eax
mov eax, dword [0x5bb739d0]
push esi
xor esi, esi
cmp eax, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x14], 0x32
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], bl
mov byte [ebp - 0xa], bl
mov byte [ebp - 9], bl
mov byte [ebp - 8], bl
mov byte [ebp - 7], 5
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x10], ebx
je 0x5baec5c2
xor ecx, ecx
cmp eax, 1
sete cl
mov eax, ecx
jmp 0x5baec776
push edi
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jae 0x5baec782
lea eax, [ebp - 0x24]
push eax
push 1
push 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
je 0x5baec5f5
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
jmp 0x5baec606
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x5baec717
lea eax, [ebp - 0x18]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x5baec717
mov eax, dword [0x5bb73714]
push dword [ebp - 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
mov esi, eax
cmp esi, ebx
je 0x5baec717
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x14]
push esi
push 2
push dword [ebp - 0x18]
call edi
test eax, eax
jne 0x5baec698
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x5baec717
mov eax, dword [0x5bb73714]
mov ecx, dword [eax]
push esi
push eax
call dword [ecx + 0x14]
mov eax, dword [0x5bb73714]
push dword [ebp - 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
mov esi, eax
cmp esi, ebx
je 0x5baec717
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x14]
push esi
push 2
push dword [ebp - 0x18]
call edi
test eax, eax
je 0x5baec717
mov edi, dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 4
push 1
lea eax, [ebp - 0xc]
push eax
call edi
test eax, eax
je 0x5baec717
lea eax, [ebp - 0x20]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 6
push 1
lea eax, [ebp - 0xc]
push eax
call edi
test eax, eax
je 0x5baec717
cmp dword [esi], ebx
mov dword [ebp - 0x10], ebx
jbe 0x5baec714
lea edi, [esi + 4]
mov eax, dword [edi]
push dword [ebp - 0x1c]
mov ecx, dword [edi + 4]
push eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x5baec782
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x5baec714
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
add edi, 8
cmp eax, dword [esi]
jb 0x5baec6da
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x1c], ebx
mov edi, dword [sym.imp.ADVAPI32.dll_FreeSid]
je 0x5baec727
push dword [ebp - 0x1c]
call edi
cmp dword [ebp - 0x20], ebx
je 0x5baec731
push dword [ebp - 0x20]
call edi
cmp esi, ebx
pop edi
je 0x5baec742
mov eax, dword [0x5bb73714]
mov ecx, dword [eax]
push esi
push eax
call dword [ecx + 0x14]
cmp dword [ebp - 0x24], ebx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x5baec75b
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
push dword [ebp - 0x24]
call esi
cmp dword [ebp - 0x18], ebx
je 0x5baec765
push dword [ebp - 0x18]
call esi
mov eax, dword [ebp - 0x10]
xor ecx, ecx
cmp eax, ebx
sete cl
inc ecx
mov dword [0x5bb739d0], ecx
mov ecx, dword [ebp - 4]
pop esi
pop ebx
call fcn.5bb3f314
leave
ret
mov dword [ebp - 0x10], 1
jmp 0x5baec717