Function at 0x402047
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x2c], 0x32
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x10], 0
mov byte [ebp - 0xf], 0
mov byte [ebp - 0xe], 0
mov byte [ebp - 0xd], 0
mov byte [ebp - 0xc], 0
mov byte [ebp - 0xb], 5
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov eax, dword [ebp + 0xc]
mov dword [eax], 1
mov ecx, dword [ebp + 8]
push ecx
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x28], eax
lea edx, [ebp - 0x1c]
push edx
push 8
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4020de
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 1
jmp 0x402321
mov edx, dword [ebp - 0x2c]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x40210a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0xc]
mov dword [eax], 1
jmp 0x40231f
lea ecx, [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x18]
push eax
push 2
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x4021b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x40214c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
mov edx, dword [ebp + 0xc]
mov dword [edx], 1
jmp 0x40231d
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [ebp - 0x2c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x402182
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
mov edx, dword [ebp + 0xc]
mov dword [edx], 1
jmp 0x40231b
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x18]
push edx
push 2
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x4021b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 1
jmp 0x402319
lea edx, [ebp - 0x14]
push edx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 4
push 1
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x4021f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 1
jmp 0x402317
lea edx, [ebp - 4]
push edx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 6
push 1
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x40222b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 1
jmp 0x402315
mov dword [ebp - 8], 0
jmp 0x40223d
mov edx, dword [ebp - 8]
add edx, 1
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 8]
cmp ecx, dword [eax]
jae 0x4022ab
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + edx*8 + 4]
mov edx, dword [eax + edx*8 + 8]
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x30], edx
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x402285
mov dword [ebp - 0x20], 1
mov eax, dword [ebp + 0xc]
mov dword [eax], 0
jmp 0x4022ab
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x4022a9
mov eax, dword [ebp + 0xc]
mov dword [eax], 1
mov dword [ebp - 0x20], 0
jmp 0x4022ab
jmp 0x402234
cmp dword [ebp + 0xc], 0
jne 0x4022c0
cmp dword [ebp - 0x20], 0
jne 0x4022c0
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 1
cmp dword [ebp - 4], 0
je 0x4022d0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0x14], 0
je 0x4022e0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0x18], 0
je 0x4022f0
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x1c], 0
je 0x402300
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x28], 0
je 0x402310
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x24]
jmp 0x402323
jmp 0x4022c0
jmp 0x4022c0
jmp 0x4022c0
jmp 0x4022c0
jmp 0x4022c0
jmp 0x4022c0
jmp 0x4022c0
mov esp, ebp
pop ebp
ret