Function at 0x140001928
Capabilities:
Get token privileges

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x140027040]
xor rax, rsp
mov qword [rbp - 0x10], rax
or rsi, 0xffffffffffffffff
xor r9d, r9d
xor r14d, r14d
mov qword [rbp - 0x38], rsi
xor ebx, ebx
mov dword [rbp - 0x40], r9d
mov r15, rdx
test rcx, rcx
je 0x14000196b
mov qword [rbp - 0x38], rcx
jmp 0x1400019a1
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp - 0x38]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140001999
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.OpenProcessToken___failed._Error:__d_n
jmp 0x140001b22
mov rcx, qword [rbp - 0x38]
mov r9d, dword [rbp - 0x40]
xor r8d, r8d
lea rax, [rbp - 0x40]
mov qword [rsp + 0x20], rax
lea edi, [r8 + 3]
mov edx, edi
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x1400019da
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x1400019da
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.GetTokenInformation___failed._Error:__d_n
jmp 0x140001b22
mov ecx, dword [rbp - 0x40]
call fcn.140006ae4
mov rbx, rax
test rax, rax
je 0x140001b29
mov r9d, dword [rbp - 0x40]
lea rax, [rbp - 0x40]
mov rcx, qword [rbp - 0x38]
mov r8, rbx
mov edx, edi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x1400019c8
xor edi, edi
cmp dword [rbx], edi
jbe 0x140001b29
and dword [rbp - 0x3c], 0
lea rax, [rdi + rdi*2]
movsd xmm0, qword [rbx + rax*4 + 4]
lea r9, [rbp - 0x3c]
mov eax, dword [rbx + rax*4 + 0xc]
lea rdx, [rbp - 0x30]
xor r8d, r8d
movsd qword [rbp - 0x30], xmm0
xor ecx, ecx
mov dword [rbp - 0x28], eax
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
test eax, eax
jne 0x140001a58
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140001b15
mov eax, dword [rbp - 0x3c]
inc eax
mov ecx, eax
mov dword [rbp - 0x3c], eax
mov eax, 2
mul rcx
cmovo rax, rsi
mov rcx, rax
call fcn.140006ae4
mov rsi, rax
test rax, rax
je 0x140001b29
lea r9, [rbp - 0x3c]
mov r8, rax
lea rdx, [rbp - 0x30]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameW]
test eax, eax
je 0x140001b15
mov rdx, r15
mov rcx, rsi
call fcn.14000aca4
test eax, eax
jne 0x140001aea
mov rax, qword [rbp - 0x30]
lea r8, [rbp - 0x20]
and qword [rsp + 0x28], 0
mov r9d, 0x10
mov rcx, qword [rbp - 0x38]
xor edx, edx
and qword [rsp + 0x20], 0
mov qword [rbp - 0x1c], rax
mov dword [rbp - 0x20], 1
mov dword [rbp - 0x14], 2
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x140001b06
mov r14d, 1
mov rcx, rsi
call fcn.140006ad0
test r14d, r14d
jne 0x140001b29
inc edi
cmp edi, dword [rbx]
jae 0x140001b29
or rsi, 0xffffffffffffffff
jmp 0x140001a18
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.AdjustTokenPrivileges___failed._Error:__d_n
jmp 0x140001b22
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.LookupPrivilegeName___failed._Error:__d_n
mov edx, eax
call fcn.140002620
mov rcx, qword [rbp - 0x38]
test rcx, rcx
je 0x140001b38
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbx, rbx
je 0x140001b45
mov rcx, rbx
call fcn.140006ad0
mov eax, r14d
mov rcx, qword [rbp - 0x10]
xor rcx, rsp
call fcn.140002790
mov rbx, qword [rsp + 0xb0]
add rsp, 0x70
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret