Function at 0x402680
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 0x4026f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
jmp 0x402803
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x4026e3
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 0x402757
call esi
cmp eax, 0x7a
jne 0x402791
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 0x402791
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 0x402791
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 0x402791
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 0x402798
call esi
jmp 0x4026e9
mov esi, dword [ebp - 8]
mov dword [ebp + 8], ebx
cmp dword [esi], ebx
jbe 0x4027f4
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 0x4027e0
push dword [ebp - 0x14]
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x4027eb
inc dword [ebp + 8]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
add esi, 8
cmp ecx, dword [eax]
jb 0x4027a5
jmp 0x4027f4
mov dword [ebp - 0x1c], 1
mov dword [edi], ebx
jmp 0x4027f4
mov dword [edi], 1
mov dword [ebp - 0x1c], ebx
cmp dword [edi], ebx
jne 0x402803
cmp dword [ebp - 0x1c], ebx
jne 0x402803
mov dword [edi], 1
cmp dword [ebp - 0x14], ebx
mov esi, dword [sym.imp.ADVAPI32.dll_FreeSid]
je 0x402813
push dword [ebp - 0x14]
call esi
cmp dword [ebp - 0x18], ebx
je 0x40281d
push dword [ebp - 0x18]
call esi
cmp dword [ebp - 8], ebx
je 0x40282b
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 0x40283b
push dword [ebp - 0x10]
call esi
cmp dword [ebp - 0x20], ebx
je 0x402845
push dword [ebp - 0x20]
call esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret