Function at 0x467970
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov eax, dword [0x5e8ea4]
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 0x4679ce
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 0x467bb4
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 0x467a36
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x467a32
lea eax, [esp + 0x30]
push eax
push esi
push ebx
push 3
push dword [esp + 0x38]
call edi
test eax, eax
jne 0x467a3e
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.0052c886
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x18]
test eax, eax
je 0x467b9f
mov edi, dword [esp + 0x14]
test edi, edi
je 0x467ba3
cmp dword [edi], 0
mov dword [esp + 0x18], 0
jbe 0x467ba3
lea ebx, [edi + 4]
mov dword [esp + 0x14], ebx
push 0x200
mov dword [esp + 0x30], 0x100
call fcn.0055016a
mov esi, eax
add esp, 4
test esi, esi
je 0x467a1e
push 0x200
push 0
push esi
call fcn.005446b0
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 0x467b85
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 0x467b68
mov ecx, dword [esp + 0x24]
test ecx, ecx
jne 0x467b03
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 0x467afd
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 0x467b68
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 0x467b49
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x467b49
mov bl, 1
jmp 0x467b4b
xor bl, bl
test bh, bh
jne 0x467b59
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x467b68
inc dword [esp + 0x20]
mov byte [esp + 0x13], 1
jmp 0x467b81
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.____Privilege__s_failed__Code__lu
call fcn.004612c0
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 0x467a62
jmp 0x467ba3
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.004612c0
mov ecx, dword [esp + 0x58]
add esp, 0xc
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0052c886
mov esp, ebp
pop ebp
ret