Function at 0x46a250
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
mov eax, dword [0x5ebea4]
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 0x46a2ae
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 0x46a494
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 0x46a316
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x46a312
lea eax, [esp + 0x30]
push eax
push esi
push ebx
push 3
push dword [esp + 0x38]
call edi
test eax, eax
jne 0x46a31e
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.0052f395
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46a47f
mov edi, dword [esp + 0x14]
test edi, edi
je 0x46a483
cmp dword [edi], 0
mov dword [esp + 0x18], 0
jbe 0x46a483
lea ebx, [edi + 4]
mov dword [esp + 0x14], ebx
push 0x200
mov dword [esp + 0x30], 0x100
call fcn.00552c6a
mov esi, eax
add esp, 4
test esi, esi
je 0x46a2fe
push 0x200
push 0
push esi
call fcn.005471b0
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 0x46a465
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 0x46a448
mov ecx, dword [esp + 0x24]
test ecx, ecx
jne 0x46a3e3
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 0x46a3dd
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 0x46a448
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 0x46a429
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x46a429
mov bl, 1
jmp 0x46a42b
xor bl, bl
test bh, bh
jne 0x46a439
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x46a448
inc dword [esp + 0x20]
mov byte [esp + 0x13], 1
jmp 0x46a461
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.____Privilege__s_failed__Code__lu
call fcn.00463ab0
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 0x46a342
jmp 0x46a483
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.00463ab0
mov ecx, dword [esp + 0x58]
add esp, 0xc
mov al, byte [esp + 0x13]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0052f395
mov esp, ebp
pop ebp
ret