Function at 0x10002f8d
Capabilities:
Check os version
Compare security identifiers

Disassembly:
push ebp
lea ebp, [esp - 0xbc]
sub esp, 0x13c
mov eax, dword [0x1006d144]
xor eax, ebp
mov dword [ebp + 0xb8], eax
push ebx
xor ebx, ebx
cmp dword [ebp + 0xc4], 0xffffffff
push esi
mov esi, dword [ebp + 0xc8]
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x74], ebx
je 0x10002fe9
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp eax, dword [ebp + 0xc4]
je 0x10002fe9
push dword [ebp + 0xc4]
push ebx
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
jmp 0x10002fef
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebp - 0x70], eax
cmp eax, ebx
je 0x10003160
lea eax, [ebp - 0x6c]
push eax
push 8
push dword [ebp - 0x70]
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x10003160
push 0x110
lea eax, [ebp - 0x60]
push ebx
push eax
mov dword [ebp - 0x64], 0x114
call fcn.1003c1e0
add esp, 0xc
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x60], 6
jb 0x1000307d
lea eax, [ebp - 0x68]
push eax
push 4
lea eax, [ebp - 0x78]
push eax
push 0x14
push dword [ebp - 0x6c]
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x78], ebx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x10003160
cmp dword [ebp - 0x68], 4
mov dword [ebp - 0x80], 1
jne 0x10003160
xor eax, eax
cmp dword [ebp - 0x78], ebx
setne al
mov dword [esi], eax
jmp 0x10003160
lea eax, [ebp - 0x74]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp + 0xb0]
push eax
mov byte [ebp + 0xb0], bl
mov byte [ebp + 0xb1], bl
mov byte [ebp + 0xb2], bl
mov byte [ebp + 0xb3], bl
mov byte [ebp + 0xb4], bl
mov byte [ebp + 0xb5], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x10003160
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x7c]
push eax
push ebx
push ebx
push 2
push dword [ebp - 0x6c]
mov dword [ebp - 0x7c], ebx
call edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1000315f
push dword [ebp - 0x7c]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
cmp esi, ebx
je 0x1000315f
lea eax, [ebp - 0x7c]
push eax
push dword [ebp - 0x7c]
push esi
push 2
push dword [ebp - 0x6c]
call edi
test eax, eax
je 0x10003150
xor edi, edi
mov dword [ebp - 0x80], 1
cmp dword [esi], ebx
jbe 0x10003150
lea eax, [esi + 4]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
push dword [eax]
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x10003147
add dword [ebp - 0x68], 8
inc edi
cmp edi, dword [esi]
jb 0x1000312a
jmp 0x10003150
mov eax, dword [ebp - 0x78]
mov dword [eax], 1
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
cmp dword [ebp - 0x74], ebx
je 0x1000316e
push dword [ebp - 0x74]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x6c], ebx
je 0x1000317e
push dword [ebp - 0x6c]
call esi
cmp dword [ebp - 0x70], ebx
je 0x10003188
push dword [ebp - 0x70]
call esi
mov ecx, dword [ebp + 0xb8]
mov eax, dword [ebp - 0x80]
pop esi
xor ecx, ebp
pop ebx
call fcn.1003b824
add ebp, 0xbc
leave
ret 8