Function at 0x4716a0
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov eax, dword [0x5f6ea4]
xor eax, esp
mov dword [esp + 0x40], eax
push ebx
push esi
push edi
xor ebx, ebx
lea eax, [esp + 0x28]
push eax
push ebx
push 0x28
mov dword [esp + 0x20], ebx
mov byte [esp + 0x1f], bl
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x4716fe
lea eax, [esp + 0x28]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4718e4
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [esp + 0x30]
push eax
push 0
push 0
push 3
push dword [esp + 0x38]
call edi
mov esi, dword [esp + 0x30]
mov dword [esp + 0x18], eax
test esi, esi
je 0x471766
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x471762
lea eax, [esp + 0x30]
push eax
push esi
push ebx
push 3
push dword [esp + 0x38]
call edi
test eax, eax
jne 0x47176e
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.00536fd5
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4718cf
mov edi, dword [esp + 0x14]
test edi, edi
je 0x4718d3
cmp dword [edi], 0
mov dword [esp + 0x18], 0
jbe 0x4718d3
lea ebx, [edi + 4]
mov dword [esp + 0x14], ebx
push 0x200
mov dword [esp + 0x30], 0x100
call fcn.0055a8aa
mov esi, eax
add esp, 4
test esi, esi
je 0x47174e
push 0x200
push 0
push esi
call fcn.0054f070
add esp, 0xc
lea eax, [esp + 0x2c]
push eax
push esi
push ebx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
test eax, eax
je 0x4718b5
mov eax, dword [esp + 0x28]
mov bh, 1
mov dword [esp + 0x24], eax
lea eax, [esp + 0x34]
push eax
push esi
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x471898
mov ecx, dword [esp + 0x24]
test ecx, ecx
jne 0x471833
lea eax, [esp + 0x24]
push eax
push ecx
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x47182d
lea eax, [esp + 0x24]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x471898
mov ecx, dword [esp + 0x24]
xor bh, bh
mov eax, dword [esp + 0x34]
push 0
push 0
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x40]
push 0
mov dword [esp + 0x50], eax
lea eax, [esp + 0x48]
push eax
push 0
push ecx
mov dword [esp + 0x54], 1
mov dword [esp + 0x60], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x471879
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x471879
mov bl, 1
jmp 0x47187b
xor bl, bl
test bh, bh
jne 0x471889
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x471898
inc dword [esp + 0x20]
mov byte [esp + 0x13], 1
jmp 0x4718b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str._____Privilege__s_failed__Code__lu
call fcn.0046b580
add esp, 0xc
inc dword [esp + 0x1c]
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
add ebx, 0xc
inc eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], eax
cmp eax, dword [edi]
jb 0x471792
jmp 0x4718d3
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x1c]
push dword [esp + 0x24]
push str.____i_privileges_granted___i_failed.
call fcn.0046b580
mov ecx, dword [esp + 0x58]
add esp, 0xc
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00536fd5
mov esp, ebp
pop ebp
ret