Function at 0x5416bc
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
mov dword [ebp - 4], eax
mov eax, dword [0x6fde84]
cmp dword [eax], 2
sete al
xor al, 1
mov byte [ebp - 5], al
cmp byte [ebp - 5], 0
jne 0x5418a2
xor eax, eax
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x19], 0
xor eax, eax
push ebp
push 0x54189b
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push 0xffffffffffffffff
push 8
call sub.kernel32.dll_GetCurrentThread
push eax
call sub.advapi32.dll_OpenThreadToken
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x19], al
cmp byte [ebp - 0x19], 0
jne 0x541748
call sub.kernel32.dll_GetLastError_2
cmp eax, 0x3f0
jne 0x541748
lea eax, [ebp - 0x10]
push eax
push 8
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x19], al
cmp byte [ebp - 0x19], 0
je 0x541861
mov byte [ebp - 0x25], 2
mov dword [ebp - 0x2c], 0x20
mov eax, dword [ebp - 4]
mov dword [ebp - 0x30], eax
xor eax, eax
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x38], eax
xor eax, eax
mov dword [ebp - 0x3c], eax
xor eax, eax
mov dword [ebp - 0x40], eax
xor eax, eax
mov dword [ebp - 0x44], eax
xor eax, eax
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x48]
push eax
mov eax, dword [ebp - 0x44]
push eax
mov eax, dword [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x3c]
push eax
mov eax, dword [ebp - 0x38]
push eax
mov eax, dword [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov al, byte [ebp - 0x25]
push eax
push 0x6f71d0
call sub.advapi32.dll_AllocateAndInitializeSid
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x4c]
call fcn.0042a914
lea eax, [ebp - 0x14]
push eax
push 0
push 0
push 2
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_GetTokenInformation
test eax, eax
jne 0x5417df
call sub.kernel32.dll_GetLastError_2
cmp eax, 0x7a
je 0x5417e4
call fcn.0042a870
mov eax, dword [ebp - 0x14]
call fcn.00404574
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x18]
push eax
push 2
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_GetTokenInformation
call fcn.0042a914
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
dec eax
test eax, eax
jl 0x541861
inc eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
mov eax, dword [eax + edx*8 + 4]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_EqualSid
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 5], al
cmp byte [ebp - 5], 0
je 0x541859
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
mov eax, dword [eax + edx*8 + 8]
and eax, 0x10
cmp eax, 0x10
setne byte [ebp - 5]
jmp 0x541861
inc dword [ebp - 0x20]
dec dword [ebp - 0x24]
jne 0x541820
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5418a2
cmp dword [ebp - 0x18], 0
je 0x54187c
mov eax, dword [ebp - 0x18]
call fcn.004045c4
cmp byte [ebp - 0x19], 0
je 0x54188b
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle_1
cmp dword [ebp - 0xc], 0
je 0x54189a
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_FreeSid
ret
mov al, byte [ebp - 5]
mov esp, ebp
pop ebp
ret