Function at 0x46f110
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x513608
push 0x488848
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffd0
push ebx
push esi
push edi
movzx eax, byte [0x525d7d]
test eax, eax
je 0x46f143
jmp 0x46f312
lea ecx, [ebp - 0x1c]
push ecx
push 0x28
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x46f30b
mov dword [ebp - 4], 0
lea edx, [ebp - 0x20]
push edx
push 0
push 0
push 3
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp dword [ebp - 0x20], 0
je 0x46f2f2
mov ecx, dword [ebp - 0x20]
shl ecx, 1
push ecx
push 0x40
call dword [sym.imp.KERNEL32.DLL_LocalAlloc]
mov dword [ebp - 0x24], eax
lea edx, [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x20]
shl eax, 1
push eax
mov ecx, dword [ebp - 0x24]
push ecx
push 3
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x46f2e8
lea eax, [ebp - 0x34]
push eax
push str.SeBackupPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x46f1d9
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
lea ecx, [ebp - 0x2c]
push ecx
push str.SeRestorePrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x46f1fc
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
lea edx, [ebp - 0x3c]
push edx
push str.SeTakeOwnershipPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x46f21f
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x40], 0
jmp 0x46f231
mov eax, dword [ebp - 0x40]
add eax, 1
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx]
sub edx, 1
cmp dword [ebp - 0x40], edx
jge 0x46f2d0
mov eax, dword [ebp - 0x40]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + eax + 8]
cmp edx, dword [ebp - 0x30]
jne 0x46f266
mov eax, dword [ebp - 0x40]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + eax + 4]
cmp edx, dword [ebp - 0x34]
je 0x46f2cb
mov eax, dword [ebp - 0x40]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + eax + 8]
cmp edx, dword [ebp - 0x28]
jne 0x46f28a
mov eax, dword [ebp - 0x40]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + eax + 4]
cmp edx, dword [ebp - 0x2c]
je 0x46f2cb
mov eax, dword [ebp - 0x40]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + eax + 8]
cmp edx, dword [ebp - 0x38]
jne 0x46f2ae
mov eax, dword [ebp - 0x40]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + eax + 4]
cmp edx, dword [ebp - 0x3c]
je 0x46f2cb
mov eax, dword [ebp - 0x40]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov edx, dword [ecx + eax + 0xc]
or edx, 2
mov eax, dword [ebp - 0x40]
imul eax, eax, 0xc
mov ecx, dword [ebp - 0x24]
mov dword [ecx + eax + 0xc], edx
jmp 0x46f228
push 0
push 0
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 0x24]
push eax
push 0
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.DLL_LocalFree]
mov dword [ebp - 4], 0xffffffff
call fcn.0046f300
jmp 0x46f30b
mov byte [0x525d7d], 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret