Function at 0x401059
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov dword [ebp - 0x14], 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 - 0x18], 0
mov dword [ebp - 4], 0
lea eax, [ebp - 8]
push eax
push 0
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x4010d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x4010d2
lea ecx, [ebp - 8]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4010d0
xor eax, eax
jmp 0x401278
jmp 0x4010d9
xor eax, eax
jmp 0x401278
lea edx, [ebp - 0x20]
push edx
push 0
push 0
push 2
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x4010f8
xor eax, eax
jmp 0x401278
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x40110a
xor eax, eax
jmp 0x401278
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.0040354e
add esp, 4
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x401126
xor eax, eax
jmp 0x401278
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
push 2
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x401155
mov eax, dword [ebp - 0x14]
push eax
call fcn.004034e5
add esp, 4
xor eax, eax
jmp 0x401278
lea ecx, [ebp - 0x18]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea edx, [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x40118f
mov eax, dword [ebp - 0x14]
push eax
call fcn.004034e5
add esp, 4
xor eax, eax
jmp 0x401278
lea ecx, [ebp - 4]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0x223
push 0x20
push 2
lea edx, [ebp - 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x4011c9
mov eax, dword [ebp - 0x14]
push eax
call fcn.004034e5
add esp, 4
xor eax, eax
jmp 0x401278
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x28], 0
jmp 0x4011e9
mov ecx, dword [ebp - 0x28]
add ecx, 1
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
cmp eax, dword [edx]
jae 0x401239
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + edx*8 + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x401215
mov dword [ebp - 0x1c], 1
jmp 0x401239
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + eax*8 + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x401237
mov dword [ebp - 0x24], 1
jmp 0x401239
jmp 0x4011e0
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov edx, dword [ebp - 0x14]
push edx
call fcn.004034e5
add esp, 4
cmp dword [ebp - 0x1c], 0
jne 0x40126e
cmp dword [ebp - 0x24], 0
jne 0x40126e
mov dword [ebp - 0x2c], 0
jmp 0x401275
mov dword [ebp - 0x2c], 1
mov eax, dword [ebp - 0x2c]
mov esp, ebp
pop ebp
ret