Function at 0x402642
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edi, dword [ebp + 8]
xor ebx, ebx
push eax
push ebx
push 0x1f0fff
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], 0x32
mov dword [ebp - 8], ebx
mov byte [ebp - 0x28], bl
mov byte [ebp - 0x27], bl
mov byte [ebp - 0x26], bl
mov byte [ebp - 0x25], bl
mov byte [ebp - 0x24], bl
mov byte [ebp - 0x23], 5
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1c], ebx
mov dword [edi], ebx
call dword [sym.imp.KERNEL32.dll_OpenProcess]
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x20], eax
push ecx
push 8
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4026b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x4027c5
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x4026a5
lea ecx, [ebp - 0xc]
push ecx
push dword [ebp - 0xc]
push eax
push 2
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x402719
call esi
cmp eax, 0x7a
jne 0x402753
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x402753
lea ecx, [ebp - 0xc]
push ecx
push dword [ebp - 0xc]
push eax
push 2
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x402753
lea eax, [ebp - 0x18]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 4
lea eax, [ebp - 0x28]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x402753
lea eax, [ebp - 0x14]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 6
lea eax, [ebp - 0x28]
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x40275a
call esi
jmp 0x4026ab
mov esi, dword [ebp - 8]
mov dword [ebp + 8], ebx
cmp dword [esi], ebx
jbe 0x4027b6
add esi, 4
push dword [ebp - 0x18]
mov eax, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ebp - 0x30], eax
push eax
mov dword [ebp - 0x2c], ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4027a2
push dword [ebp - 0x14]
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4027ad
inc dword [ebp + 8]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
add esi, 8
cmp ecx, dword [eax]
jb 0x402767
jmp 0x4027b6
mov dword [ebp - 0x1c], 1
mov dword [edi], ebx
jmp 0x4027b6
mov dword [edi], 1
mov dword [ebp - 0x1c], ebx
cmp dword [edi], ebx
jne 0x4027c5
cmp dword [ebp - 0x1c], ebx
jne 0x4027c5
mov dword [edi], 1
cmp dword [ebp - 0x14], ebx
mov esi, dword [sym.imp.ADVAPI32.dll_FreeSid]
je 0x4027d5
push dword [ebp - 0x14]
call esi
cmp dword [ebp - 0x18], ebx
je 0x4027df
push dword [ebp - 0x18]
call esi
cmp dword [ebp - 8], ebx
je 0x4027ed
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x10], ebx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4027fd
push dword [ebp - 0x10]
call esi
cmp dword [ebp - 0x20], ebx
je 0x402807
push dword [ebp - 0x20]
call esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret