Function at 0x460a10
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov eax, dword [0x5caea4]
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 0x460a6e
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 0x460c54
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 0x460ad6
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x460ad2
lea eax, [esp + 0x30]
push eax
push esi
push ebx
push 3
push dword [esp + 0x38]
call edi
test eax, eax
jne 0x460ade
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.00518b27
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x18]
test eax, eax
je 0x460c3f
mov edi, dword [esp + 0x14]
test edi, edi
je 0x460c43
cmp dword [edi], 0
mov dword [esp + 0x18], 0
jbe 0x460c43
lea ebx, [edi + 4]
mov dword [esp + 0x14], ebx
push 0x200
mov dword [esp + 0x30], 0x100
call fcn.0053aaf8
mov esi, eax
add esp, 4
test esi, esi
je 0x460abe
push 0x200
push 0
push esi
call fcn.00530530
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 0x460c25
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 0x460c08
mov ecx, dword [esp + 0x24]
test ecx, ecx
jne 0x460ba3
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 0x460b9d
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 0x460c08
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 0x460be9
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x460be9
mov bl, 1
jmp 0x460beb
xor bl, bl
test bh, bh
jne 0x460bf9
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x460c08
inc dword [esp + 0x20]
mov byte [esp + 0x13], 1
jmp 0x460c21
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.____Privilege__s_failed__Code__lu
call fcn.0045a000
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 0x460b02
jmp 0x460c43
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.0045a000
mov ecx, dword [esp + 0x58]
add esp, 0xc
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00518b27
mov esp, ebp
pop ebp
ret