Function at 0x140001980
Capabilities:
Get token privileges

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x280]
sub rsp, 0x380
mov rax, qword [0x14000d010]
xor rax, rsp
mov qword [rbp + 0x270], rax
xor r9d, r9d
lea rax, [rsp + 0x40]
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rsi, rcx
lea edx, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ecx, dword [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r9d, dword [rsp + 0x40]
mov edx, 1
mov r14, rax
mov rcx, rsi
lea rax, [rsp + 0x40]
mov r8, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rcx, qword [r14]
lea rdx, [rsp + 0x48]
call qword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.User_SID:
call fcn.140005990
mov rdx, qword [rsp + 0x48]
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___void_const____ptr64____ptr64]
mov rcx, rax
lea rdx, [0x140005b60]
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]
lea rax, [rsp + 0x60]
mov dword [rsp + 0x54], pe_nt_image_headers64
mov qword [rsp + 0x30], rax
lea r9, [rsp + 0x54]
lea rax, [rsp + 0x50]
mov dword [rsp + 0x50], pe_nt_image_headers64
mov rdx, qword [r14]
lea r8, [rbp + 0x70]
mov qword [rsp + 0x28], rax
xor ecx, ecx
lea rax, [rsp + 0x70]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_LookupAccountSidA]
test eax, eax
je 0x140001ac8
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str._nUsername:
call fcn.140005990
mov rcx, rax
lea rdx, [rsp + 0x70]
call fcn.140005990
mov rcx, rax
lea rdx, [0x14000871c]
call fcn.140005990
mov rcx, rax
lea rdx, [rbp + 0x70]
call fcn.140005990
mov rcx, rax
lea rdx, [0x140005b60]
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]
xor r9d, r9d
lea rax, [rsp + 0x40]
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rcx, rsi
lea edx, [r9 + 3]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ecx, dword [rsp + 0x40]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r9d, dword [rsp + 0x40]
mov edx, 3
mov rdi, rax
mov rcx, rsi
lea rax, [rsp + 0x40]
mov r8, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Privileges:
call fcn.140005990
mov rcx, rax
lea rdx, [0x140005b60]
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]
xor ebx, ebx
cmp dword [rdi], ebx
jbe 0x140001ba5
nop dword [rax + rax]
mov ecx, ebx
lea r9, [rsp + 0x58]
inc rcx
mov dword [rsp + 0x58], pe_nt_image_headers64
lea r8, [rbp + 0x170]
lea rcx, [rcx + rbx*2]
lea rdx, [rdi + rcx*4]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameA]
test eax, eax
je 0x140001b9f
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, [0x14000873c]
call fcn.140005990
mov rcx, rax
lea rdx, [rbp + 0x170]
call fcn.140005990
mov rcx, rax
lea rdx, [0x140005b60]
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]
inc ebx
cmp ebx, dword [rdi]
jb 0x140001b40
mov r9d, 4
lea rax, [rsp + 0x64]
lea r8, [rsp + 0x5c]
mov qword [rsp + 0x20], rax
mov rcx, rsi
lea edx, [r9 + 4]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x140001bdf
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetTokenInformation_failed_with_error_code__d_n
call fcn.140001860
cmp dword [rsp + 0x5c], 1
jne 0x140001c09
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.___Token_is_TokenPrimary__n
call fcn.140005990
mov rcx, rax
lea rdx, [0x140005b60]
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, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp + 0x270]
xor rcx, rsp
call fcn.140006b60
lea r11, [rsp + 0x380]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret