Function at 0x401540
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x20], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor ebx, ebx
push eax
push ebx
push 0x1fffff
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], 0x32
xor esi, esi
mov dword [ebp - 0xc], ebx
mov word [ebp - 8], 0x500
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x10], ebx
mov dword [edi], ebx
call dword [sym.imp.KERNEL32.dll_OpenProcess]
lea ecx, [ebp - 0x18]
push ecx
push 8
push eax
mov dword [ebp - 0x28], eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4015b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
jmp 0x4016e2
mov edx, dword [ebp - 0x14]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
cmp esi, ebx
jne 0x4015cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
jmp 0x4016e2
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
mov ebx, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x14]
push eax
push ecx
push esi
push 2
push edx
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x401643
call edi
cmp eax, 0x7a
je 0x401601
call edi
mov dword [ebp - 0x10], eax
jmp 0x4016e2
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x14]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
jne 0x401624
call edi
mov dword [ebp - 0x10], eax
jmp 0x4016e2
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x14]
push ecx
push edx
push esi
push 2
push eax
call ebx
test eax, eax
jne 0x401643
call edi
mov dword [ebp - 0x10], eax
jmp 0x4016e2
mov ebx, dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
lea ecx, [ebp - 0x24]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 4
push 1
lea edx, [ebp - 0xc]
push edx
call ebx
test eax, eax
jne 0x401670
call edi
mov dword [ebp - 0x10], eax
jmp 0x4016e2
lea eax, [ebp - 0x1c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 6
push 1
lea ecx, [ebp - 0xc]
push ecx
call ebx
test eax, eax
jne 0x401697
call edi
mov dword [ebp - 0x10], eax
jmp 0x4016e2
xor ebx, ebx
cmp dword [esi], ebx
jbe 0x4016d4
lea edi, [esi + 4]
mov ecx, dword [ebp - 0x24]
mov eax, dword [edi]
mov edx, dword [edi + 4]
push ecx
push eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x401735
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x30]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x401740
inc ebx
add edi, 8
cmp ebx, dword [esi]
jb 0x4016a0
mov eax, dword [ebp - 0x20]
cmp dword [eax], 0
jne 0x4016e2
mov dword [eax], 1
mov eax, dword [ebp - 0x1c]
mov edi, dword [sym.imp.ADVAPI32.dll_FreeSid]
test eax, eax
je 0x4016f2
push eax
call edi
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x4016fc
push eax
call edi
test esi, esi
je 0x401707
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x401717
push eax
call esi
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x401721
push eax
call esi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004018da
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x20]
mov dword [ecx], 0
jmp 0x4016e2
mov edx, dword [ebp - 0x20]
mov dword [edx], 1
jmp 0x4016e2