Function at 0x4014a0
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402c8d
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 0x40151e
call esi
cmp eax, 0x7a
je 0x40151e
push 0x401e70
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.00401c50
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 0x4017e0
push dword [ebp - 0x2c]
call fcn.00401f6d
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 0x401e70
test eax, eax
jne 0x40156d
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.00401c50
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 0x4017d8
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.00401c50
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 0x4017d7
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 0x4017c0
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 0x401802
lea eax, [edi + edi]
cmp eax, 0x1000
jb 0x401634
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x401807
push ecx
call fcn.00401f2f
add esp, 4
test eax, eax
je 0x4017fc
lea esi, [eax + 0x23]
and esi, 0xffffffe0
mov dword [esi - 4], eax
jmp 0x401647
test eax, eax
je 0x401645
push eax
call fcn.00401f2f
add esp, 4
mov esi, eax
jmp 0x401647
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 0x401777
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, 0x4033ac
call fcn.004019f0
mov edx, esi
mov ecx, eax
call fcn.004019f0
test byte [ebp - 0x20], 2
je 0x4016b1
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.004019f0
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
push 0x401c20
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 ecx, str.SeBackupPrivilege
mov eax, esi
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4016f6
test dx, dx
je 0x4016f2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4016f6
add eax, 4
add ecx, 4
test dx, dx
jne 0x4016d0
xor eax, eax
jmp 0x4016fb
sbb eax, eax
or eax, 1
test eax, eax
jne 0x401720
push 0x401c20
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, str._____This_privilege_allows_backup_access_
call fcn.004019f0
add esp, 4
mov ecx, eax
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 ecx, str.SeRestorePrivilege
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40174d
test dx, dx
je 0x401749
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40174d
add eax, 4
add ecx, 4
test dx, dx
jne 0x401727
xor eax, eax
jmp 0x401752
sbb eax, eax
or eax, 1
test eax, eax
jne 0x401777
push 0x401c20
push ecx
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, str._____This_privilege_allows_restore_access_
call fcn.004019f0
add esp, 4
mov ecx, eax
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 0x4017c0
sub edi, esi
and edi, 0xfffffffe
cmp edi, 0x1000
jb 0x4017a1
mov ecx, dword [esi - 4]
add edi, 0x23
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x4017fc
mov esi, ecx
push edi
push esi
call fcn.00401f5f
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 0x4015a0
mov eax, ecx
push eax
call fcn.00401f2a
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.00401f1c
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.00401f10
call fcn.004010c0
int3