Function at 0x405120
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor esi, esi
mov dword [ebp - 0x28], 0xffffffff
push edi
mov dword [ebp - 0x30], esi
xor ebx, ebx
mov dword [ebp - 0x24], esi
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
lea eax, [ebp - 0x28]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x405275
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenProcessToken___failed._Error:__d_n
call fcn.004010c0
add esp, 8
jmp 0x4052ae
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x24]
push 0
push 3
push dword [ebp - 0x28]
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4052dd
call esi
cmp eax, 0x7a
je 0x4052dd
call esi
push eax
push str.GetTokenInformation___failed._Error:__d_n
call fcn.004010c0
add esp, 8
xor esi, esi
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x4052bc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x4052ca
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405ae3
mov esp, ebp
pop ebp
ret
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
nop
nop
nop
mov eax, eax
xor eax, eax
add eax, 1
sub eax, 1
push dword [ebp - 0x24]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4052ac
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x24]
push ebx
push 3
push dword [ebp - 0x28]
call edi
test eax, eax
je 0x40529c
cmp dword [ebx], 0
mov dword [ebp - 0x34], 0
jbe 0x4052ac
lea edi, [ebx + 4]
mov eax, dword [edi + 8]
movq xmm0, qword [edi]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x2c]
push eax
push 0
lea eax, [ebp - 0x10]
movq qword [ebp - 0x10], xmm0
push eax
push 0
mov dword [ebp - 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
test eax, eax
jne 0x405458
call esi
cmp eax, 0x7a
jne 0x40551a
mov eax, dword [ebp - 0x2c]
mov ecx, 2
inc eax
mov dword [ebp - 0x2c], eax
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
je 0x40552a
lea eax, [ebp - 0x2c]
push eax
push esi
lea eax, [ebp - 0x10]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
test eax, eax
je 0x40554f
push str.SeImpersonatePrivilege
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x4054e8
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
push 0
push 0
push 0x10
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x20]
push eax
push 0
push dword [ebp - 0x28]
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x405532
mov dword [ebp - 0x30], 1
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov esi, dword [ebp - 0x30]
add esp, 4
test esi, esi
jne 0x4052ae
mov eax, dword [ebp - 0x34]
add edi, 0xc
inc eax
mov dword [ebp - 0x34], eax
cmp eax, dword [ebx]
jae 0x4052ae
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x405421
call esi
push eax
push str.LookupPrivilegeName___failed._Error:__d_n
call fcn.004010c0
add esp, 8
mov esi, dword [ebp - 0x30]
jmp 0x4052ae
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push eax
push str.AdjustTokenPrivileges___failed._Error:__d_n
call fcn.004010c0
mov esi, dword [ebp - 0x30]
add esp, 8
jmp 0x4052ae
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x40551c