Function at 0x2172c96
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
cmp dword [ebp + 0xc], 0
push ebx
push esi
push edi
je 0x2172cc5
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
call sub.RPCRT4.dll_I_RpcBindingInqTransportType
test eax, eax
jne 0x2172cbb
cmp dword [ebp - 0x14], 4
je 0x2172cc5
mov eax, 5
jmp 0x2172eaa
push dword [ebp + 8]
call sub.RPCRT4.dll_RpcImpersonateClient
test eax, eax
je 0x2172cdb
mov eax, 5
jmp 0x2172eaa
lea eax, [ebp - 8]
push eax
push 1
push 0xe
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
mov edi, eax
test edi, edi
je 0x2172e9a
lea eax, [ebp - 4]
lea ecx, [ebp - 0x4c]
mov dword [ebp - 4], 0x38
push eax
push 0x38
push ecx
push 0xa
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov edi, eax
test edi, edi
je 0x2172d58
mov dword [ebp - 4], 0x18
mov eax, dword [ebp - 4]
add eax, 3
and al, 0xfc
call sub.ntdll.dll__alloca_probe
mov esi, esp
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push esi
push 1
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov edi, eax
test edi, edi
jne 0x2172d63
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x2172d23
jmp 0x2172d5b
mov esi, dword [ebp - 4]
test edi, edi
je 0x2172e91
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x40]
mov esi, dword [esi]
push 0x218cc38
xor edi, edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x218c344]
mov ecx, dword [eax]
test ecx, ecx
je 0x2172dbe
lea ebx, [ecx - 8]
mov eax, dword [ebp - 0x10]
cmp dword [ebx + 0x14], eax
jne 0x2172d9c
mov eax, dword [ebp - 0xc]
cmp dword [ebx + 0x18], eax
je 0x2172da4
mov ecx, dword [ecx]
test ecx, ecx
jne 0x2172d89
jmp 0x2172dbe
mov eax, dword [ebx]
mov ecx, ebx
mov edi, 1
call dword [eax + 4]
mov ecx, dword [ebp + 0x10]
push dword [ebp - 8]
mov dword [ecx], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
test edi, edi
jne 0x2172e84
push esi
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
sub eax, 0xc
push eax
mov dword [ebp - 4], eax
push 0x28
call fcn.02173d38
add esp, 8
test eax, eax
je 0x2172e2f
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov dword [eax + 4], 1
add edx, 0xc
mov edi, dword [ebp - 0xc]
mov dword [eax], 0x2186f60
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
lea ebx, [eax + 0x14]
mov dword [eax + 0x10], ecx
mov ecx, dword [ebp - 0x10]
mov dword [ebx], ecx
mov ecx, edx
shr ecx, 2
mov dword [ebx + 4], edi
lea edi, [eax + 0x1c]
mov dword [eax], 0x21872c8
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
jmp 0x2172e38
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0
mov ecx, dword [ebp + 0x10]
mov esi, dword [ecx]
test esi, esi
jne 0x2172e4e
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
jmp 0x2172e84
mov eax, dword [0x218c344]
lea edx, [eax + 4]
mov ecx, dword [edx]
test ecx, ecx
je 0x2172e78
mov edi, dword [ecx]
test edi, edi
je 0x2172e68
lea eax, [esi + 8]
mov dword [edi + 4], eax
lea eax, [esi + 8]
mov edi, dword [ecx]
mov dword [eax], edi
mov dword [esi + 0xc], ecx
mov dword [ecx], eax
mov dword [edx], eax
jmp 0x2172e7f
add esi, 8
mov dword [edx], esi
mov dword [eax], esi
mov edi, 1
push 0x218cc38
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x2172e9a
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 8]
call sub.RPCRT4.dll_RpcRevertToSelfEx
cmp edi, 1
sbb eax, eax
and eax, 0xe
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc