Function at 0x140001480
Capabilities:
Get token privileges

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x140006008]
xor rax, rsp
mov qword [rbp - 0x10], rax
mov rbx, rcx
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 3]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x140001511
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x140001511
lea rdx, str.Failed_to_retrieve_token_privileges._Error:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001940
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
lea rdx, [0x140001b10]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
jmp 0x14000157d
mov ecx, dword [rbp - 0x40]
call fcn.140001e2c
mov r14, rax
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
mov r9d, dword [rbp - 0x40]
mov r8, r14
mov edx, 3
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400015a7
lea rdx, str.Failed_to_retrieve_token_privileges._Error:
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
call fcn.140001940
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rbx
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___unsigned_long_int____ptr64]
lea rdx, [0x140001b10]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, r14
call fcn.140001de0
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.140001dc0
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
xor r13d, r13d
mov esi, r13d
cmp dword [r14], r13d
jbe 0x140001575
lea r15, str.SeBackupPrivilege
lea r12, str.SeRestorePrivilege
mov eax, esi
lea rcx, [rax + rax*2]
movsd xmm0, qword [r14 + rcx*4 + 4]
movsd qword [rbp - 0x20], xmm0
mov eax, dword [r14 + rcx*4 + 0xc]
mov dword [rbp - 0x18], eax
mov dword [rbp - 0x3c], r13d
lea r9, [rbp - 0x3c]
xor r8d, r8d
lea rdx, [rbp - 0x20]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
mov eax, dword [rbp - 0x3c]
test eax, eax
je 0x14000178a
xorps xmm0, xmm0
mov edi, eax
movdqu xmmword [rbp - 0x38], xmm0
mov qword [rbp - 0x28], r13
add rdi, rdi
cmp rdi, 0x1000
jb 0x140001642
lea rcx, [rdi + 0x27]
cmp rcx, rdi
jbe 0x1400017a1
call fcn.140001de8
mov rcx, rax
test rax, rax
je 0x14000179a
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x140001654
test rdi, rdi
je 0x140001651
mov rcx, rdi
call fcn.140001de8
jmp 0x140001654
mov rax, r13
mov qword [rbp - 0x38], rax
lea rbx, [rdi + rax]
mov qword [rbp - 0x28], rbx
mov r8, rdi
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov qword [rbp - 0x30], rbx
lea r9, [rbp - 0x3c]
mov r8, qword [rbp - 0x38]
lea rdx, [rbp - 0x20]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
test eax, eax
je 0x14000174b
lea rdx, [0x140001d30]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov r8, qword [rbp - 0x38]
mov rax, r13
nop dword [rax + rax]
movzx ecx, word [r8 + rax*2]
cmp cx, word [r15 + rax*2]
jne 0x1400016fb
movzx ecx, word [r8 + rax*2 + 2]
cmp cx, word [r15 + rax*2 + 2]
jne 0x1400016fb
add rax, 2
cmp rax, 0x12
jne 0x1400016b0
lea rdx, str._____This_privilege_allows_backup_access_
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140001b50
lea rdx, [0x140001d30]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov r8, qword [rbp - 0x38]
mov rcx, 0xffffffffffffffff
movzx eax, word [r8 + rcx*2 + 2]
cmp ax, word [r12 + rcx*2 + 2]
jne 0x14000174f
add rcx, 2
cmp rcx, 0x13
je 0x140001728
movzx eax, word [r8 + rcx*2]
cmp ax, word [r12 + rcx*2]
jne 0x14000174f
jmp 0x140001702
lea rdx, str._____This_privilege_allows_restore_access_
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
call fcn.140001b50
lea rdx, [0x140001d30]
mov rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64___cdecl_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64____cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______ptr64_____ptr64]
mov r8, qword [rbp - 0x38]
test r8, r8
je 0x14000178a
mov rdx, qword [rbp - 0x28]
sub rdx, r8
sar rdx, 1
add rdx, rdx
mov rax, r8
cmp rdx, 0x1000
jb 0x140001782
add rdx, 0x27
mov r8, qword [r8 - 8]
sub rax, r8
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14000179a
mov rcx, r8
call fcn.140001de0
inc esi
cmp esi, dword [r14]
jae 0x140001575
jmp 0x1400015c0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140001100
int3