Function at 0x1002ec3c
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x100677a0]
xor eax, ebp
mov dword [ebp - 4], eax
xor al, al
push ebx
push esi
mov byte [ebp - 0xc], al
mov byte [ebp - 0xb], al
mov byte [ebp - 0xa], al
mov byte [ebp - 9], al
mov byte [ebp - 8], al
lea eax, [ebp - 0x18]
push edi
push eax
lea ebx, [ebp - 0x10]
mov byte [ebp - 7], 5
call fcn.1002eabe
pop ecx
push 2
pop ebx
cmp eax, ebx
mov dword [ebp - 0x24], eax
je 0x1002ee74
cmp eax, 3
je 0x1002ee74
cmp eax, 4
je 0x1002ee74
mov edi, dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
xor esi, esi
lea eax, [ebp - 0x38]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push 0x200
push 0x20
push ebx
lea eax, [ebp - 0xc]
push eax
call edi
test eax, eax
jne 0x1002ecbc
xor al, al
jmp 0x1002ee76
lea eax, [ebp - 0x2c]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push 0x220
push 0x20
push ebx
lea eax, [ebp - 0xc]
push eax
call edi
test eax, eax
je 0x1002ecb5
lea eax, [ebp - 0x34]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push 0x223
push 0x20
push ebx
lea eax, [ebp - 0xc]
push eax
call edi
test eax, eax
je 0x1002ecb5
lea eax, [ebp - 0x28]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push 0x225
push 0x20
push ebx
lea eax, [ebp - 0xc]
push eax
call edi
test eax, eax
je 0x1002ecb5
lea eax, [ebp - 0x30]
push eax
push esi
push esi
push esi
push esi
push esi
push esi
push 0x226
push 0x20
push ebx
lea eax, [ebp - 0xc]
push eax
call edi
test eax, eax
je 0x1002ecb5
lea eax, [ebp - 0x14]
push eax
push 1
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x1002ed71
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x1002ecb5
lea eax, [ebp - 0x14]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1002ecb5
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x20]
push eax
push esi
push esi
push ebx
push dword [ebp - 0x14]
call edi
test eax, eax
jne 0x1002eda0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x1002eda0
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1002ecb5
push dword [ebp - 0x20]
call fcn.10037406
pop ecx
lea ecx, [ebp - 0x20]
push ecx
push dword [ebp - 0x20]
mov dword [ebp - 0x18], eax
push eax
push ebx
push dword [ebp - 0x14]
call edi
test eax, eax
jne 0x1002edd5
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x18]
call fcn.10038f50
pop ecx
jmp 0x1002ecb5
mov ebx, dword [ebp - 0x18]
cmp dword [ebx], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x1c], esi
jbe 0x1002ee3b
mov edi, dword [sym.imp.ADVAPI32.dll_EqualSid]
add ebx, 4
push dword [ebx]
push dword [ebp - 0x2c]
call edi
push dword [ebx]
mov dword [ebp - 0x10], eax
push dword [ebp - 0x38]
call edi
or dword [ebp - 0x10], eax
cmp dword [ebp - 0x24], 5
je 0x1002ee0b
cmp dword [ebp - 0x24], 6
jne 0x1002ee15
push dword [ebx]
push dword [ebp - 0x34]
call edi
or dword [ebp - 0x10], eax
push dword [ebx]
push dword [ebp - 0x28]
call edi
push dword [ebx]
or dword [ebp - 0x10], eax
push dword [ebp - 0x30]
call edi
or dword [ebp - 0x10], eax
jne 0x1002ee3b
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
add ebx, 8
cmp ecx, dword [eax]
jb 0x1002edeb
push dword [ebp - 0x38]
mov edi, dword [sym.imp.ADVAPI32.dll_FreeSid]
call edi
push dword [ebp - 0x2c]
call edi
push dword [ebp - 0x34]
call edi
push dword [ebp - 0x28]
call edi
push dword [ebp - 0x30]
call edi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x18]
call fcn.10038f50
cmp dword [ebp - 0x10], esi
pop ecx
setne al
jmp 0x1002ee76
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1003942d
leave
ret