Function at 0x401160
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402bcd
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x405004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea eax, [ebp - 0x2c]
push eax
push 0
push 0
push 3
push edi
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4011de
call esi
cmp eax, 0x7a
je 0x4011de
push 0x401b50
call esi
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Failed_to_retrieve_token_privileges._Error:
push eax
call fcn.00401930
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
jmp 0x4013e7
push dword [ebp - 0x2c]
call fcn.00401ead
add esp, 4
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x2c]
push ecx
push dword [ebp - 0x2c]
push eax
push 3
push edi
call ebx
push 0x401b50
test eax, eax
jne 0x40122d
call esi
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Failed_to_retrieve_token_privileges._Error:
push eax
call fcn.00401930
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push dword [ebp - 0x34]
jmp 0x4013df
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Privileges_after_elevation:
call fcn.00401930
add esp, 4
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x38], 0
cmp dword [eax], 0
jbe 0x4013de
lea ebx, [eax + 4]
nop
mov eax, dword [ebx + 8]
movq xmm0, qword [ebx]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x30]
push eax
push 0
lea eax, [ebp - 0x28]
movq qword [ebp - 0x28], xmm0
push eax
push 0
mov dword [ebp - 0x30], 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
mov edi, dword [ebp - 0x30]
test edi, edi
je 0x4013c7
mov dword [ebp - 0x14], 0
xorps xmm0, xmm0
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
cmp edi, 0x7fffffff
ja 0x401409
lea eax, [edi + edi]
cmp eax, 0x1000
jb 0x4012f4
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x40140e
push ecx
call fcn.00401e6f
add esp, 4
test eax, eax
je 0x401403
lea esi, [eax + 0x23]
and esi, 0xffffffe0
mov dword [esi - 4], eax
jmp 0x401307
test eax, eax
je 0x401305
push eax
call fcn.00401e6f
add esp, 4
mov esi, eax
jmp 0x401307
xor esi, esi
lea eax, [edi + edi]
mov dword [ebp - 0x1c], esi
push eax
lea edi, [eax + esi]
push 0
push esi
mov dword [ebp - 0x14], edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x18], edi
lea eax, [ebp - 0x30]
mov dword [ebp - 4], 0
push eax
push esi
lea eax, [ebp - 0x28]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
test eax, eax
je 0x40137e
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, 0x403264
call fcn.00401b80
mov edx, esi
mov ecx, eax
call fcn.00401b80
test byte [ebp - 0x20], 2
je 0x40136d
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, str.__Enabled_
call fcn.00401b80
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
push 0x401db0
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x4013c7
sub edi, esi
and edi, 0xfffffffe
cmp edi, 0x1000
jb 0x4013a8
mov eax, dword [esi - 4]
add edi, 0x23
sub esi, eax
add esi, 0xfffffffc
cmp esi, 0x1f
ja 0x401403
mov esi, eax
push edi
push esi
call fcn.00401e9f
add esp, 8
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x38]
add ebx, 0xc
mov ecx, dword [ebp - 0x34]
inc eax
mov dword [ebp - 0x38], eax
cmp eax, dword [ecx]
jb 0x401260
mov eax, ecx
push eax
call fcn.00401e6a
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00401e5c
mov esp, ebp
pop ebp
ret
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
call fcn.00401e50
call fcn.004010c0
int3