Function at 0x2180675
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
push edi
lea eax, [ebp - 0xc]
xor edi, edi
push eax
push edi
mov dword [ebp - 0xc], edi
push edi
mov ebx, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push 1
mov dword [ebp - 0x10], edi
push dword [ebp + 8]
mov dword [ebp - 8], edi
call ebx
cmp dword [ebp - 0xc], edi
je 0x2180910
lea eax, [ebp - 0x10]
push eax
push edi
push edi
push 2
push dword [ebp + 8]
call ebx
mov eax, dword [ebp - 0xc]
add eax, 7
and al, 0xf8
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0xc]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, dword [ebp - 0xc]
mov dword [ebp - 8], eax
add esi, eax
cmp eax, edi
je 0x2180910
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push dword [ebp - 8]
push 1
push dword [ebp + 8]
call ebx
test eax, eax
je 0x2180910
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x10]
push esi
push 2
push dword [ebp + 8]
call ebx
test eax, eax
je 0x2180910
mov eax, dword [ebp - 8]
push dword [eax]
call fcn.02180646
mov dword [ebp - 0x24], eax
cmp dword [esi], edi
jbe 0x2180739
lea ebx, [esi + 8]
test byte [ebx + 3], 0xc0
jne 0x2180731
push dword [ebx - 4]
call fcn.02180646
xor dword [ebp - 0x24], eax
add ebx, 8
inc edi
cmp dword [esi], edi
ja 0x2180720
push 0x218ccc0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [0x218c9fc]
mov dword [ebp - 0x1c], eax
mov eax, 0x218c9e8
mov dword [ebp - 4], eax
cmp ebx, eax
je 0x2180826
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebx + 0x10]
cmp eax, 0x57e40
jb 0x218079b
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebx + 0x14]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x14], eax
mov edx, dword [0x218ca14]
mov dword [ebx + 0x14], edx
mov dword [0x218ca14], ebx
jmp 0x2180814
mov eax, dword [ebp - 0x24]
cmp dword [ebx + 4], eax
jne 0x218080b
mov eax, dword [ebx + 0xc]
mov ecx, dword [esi]
cmp dword [eax], ecx
jne 0x218080b
mov eax, dword [ebp - 8]
mov edx, dword [ebx + 8]
push dword [eax]
push dword [edx]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x218080b
mov dword [ebp - 0x18], 0
cmp dword [esi], 0
jbe 0x2180804
mov dword [ebp - 0x20], 0
lea edi, [esi + 8]
test byte [edi + 3], 0xc0
jne 0x21807f3
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebp - 0x20]
push dword [edi - 4]
push dword [ecx + edx + 4]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x2180804
add edi, 8
inc dword [ebp - 0x18]
add dword [ebp - 0x20], 8
mov eax, dword [ebp - 0x18]
cmp dword [esi], eax
ja 0x21807d6
mov eax, dword [ebp - 0x18]
cmp dword [esi], eax
jbe 0x2180826
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x14]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov ebx, dword [ecx + 0x14]
cmp ebx, 0x218c9e8
jne 0x2180763
mov edi, 0x218c9e8
lea eax, [ebp - 0x14]
push eax
cmp ebx, edi
push 1
push 3
push 0
push 0x2000000
je 0x2180895
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x2180905
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 4], edi
mov dword [ebp + 8], eax
je 0x2180905
lea edi, [ebp - 0x38]
mov esi, ebx
mov eax, 6
mov ecx, eax
rep movsd dword es:[edi], dword [esi]
mov edi, ebx
mov esi, dword [ebp - 4]
mov ecx, eax
rep movsd dword es:[edi], dword [esi]
lea esi, [ebp - 0x38]
mov edi, dword [ebp - 4]
mov ecx, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x24]
mov dword [ecx + 0x14], ebx
mov dword [ebx + 0x14], edx
jmp 0x2180905
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x2180905
cmp dword [0x218ca14], 0x218ca00
je 0x21808cd
mov edi, dword [0x218ca14]
mov edx, dword [ebp - 4]
lea eax, [edi + 0x14]
mov ecx, dword [eax]
mov dword [0x218ca14], ecx
mov dword [eax], 0x218c9e8
mov dword [edx + 0x14], edi
jmp 0x21808e4
mov edi, dword [ebp - 4]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
push dword [ecx + 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 8]
mov dword [edi], eax
mov eax, dword [ebp - 0x1c]
mov dword [edi + 4], ecx
mov dword [ebp - 8], 0
mov dword [edi + 8], edx
mov dword [edi + 0xc], esi
mov dword [edi + 0x10], eax
push 0x218ccc0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 8], 0
je 0x218091f
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4