Function at 0x1400151a0
Capabilities:
Get token privileges

Disassembly:
sub rsp, 0x78
movzx eax, byte [0x140051e69]
test eax, eax
je 0x1400151b4
jmp 0x1400153ef
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x30]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1400153e8
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 3
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp dword [rsp + 0x38], 0
je 0x1400153dd
mov eax, dword [rsp + 0x38]
shl eax, 1
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x40], rax
mov r9d, dword [rsp + 0x38]
shl r9d, 1
lea rax, [rsp + 0x38]
mov qword [rsp + 0x20], rax
mov r8, qword [rsp + 0x40]
mov edx, 3
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x1400153d1
lea r8, [rsp + 0x50]
lea rdx, str.SeBackupPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x14001526f
mov dword [rsp + 0x54], 0
mov dword [rsp + 0x50], 0
lea r8, [rsp + 0x48]
lea rdx, str.SeRestorePrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x140015297
mov dword [rsp + 0x4c], 0
mov dword [rsp + 0x48], 0
lea r8, [rsp + 0x58]
lea rdx, [0x1400402e0]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x1400152bf
mov dword [rsp + 0x5c], 0
mov dword [rsp + 0x58], 0
mov dword [rsp + 0x60], 0
jmp 0x1400152d4
mov eax, dword [rsp + 0x60]
add eax, 1
mov dword [rsp + 0x60], eax
mov rax, qword [rsp + 0x40]
mov eax, dword [rax]
sub eax, 1
cmp dword [rsp + 0x60], eax
jge 0x1400153a8
movsxd rdx, dword [rsp + 0x60]
imul rdx, rdx, 0xc
mov rcx, qword [rsp + 0x40]
mov eax, dword [rsp + 0x54]
cmp dword [rcx + rdx + 8], eax
jne 0x14001531c
movsxd rdx, dword [rsp + 0x60]
imul rdx, rdx, 0xc
mov rcx, qword [rsp + 0x40]
mov eax, dword [rsp + 0x50]
cmp dword [rcx + rdx + 4], eax
je 0x1400153a3
movsxd rdx, dword [rsp + 0x60]
imul rdx, rdx, 0xc
mov rcx, qword [rsp + 0x40]
mov eax, dword [rsp + 0x4c]
cmp dword [rcx + rdx + 8], eax
jne 0x14001534c
movsxd rdx, dword [rsp + 0x60]
imul rdx, rdx, 0xc
mov rcx, qword [rsp + 0x40]
mov eax, dword [rsp + 0x48]
cmp dword [rcx + rdx + 4], eax
je 0x1400153a3
movsxd rdx, dword [rsp + 0x60]
imul rdx, rdx, 0xc
mov rcx, qword [rsp + 0x40]
mov eax, dword [rsp + 0x5c]
cmp dword [rcx + rdx + 8], eax
jne 0x14001537c
movsxd rdx, dword [rsp + 0x60]
imul rdx, rdx, 0xc
mov rcx, qword [rsp + 0x40]
mov eax, dword [rsp + 0x58]
cmp dword [rcx + rdx + 4], eax
je 0x1400153a3
movsxd rcx, dword [rsp + 0x60]
imul rcx, rcx, 0xc
mov rax, qword [rsp + 0x40]
mov edx, dword [rax + rcx + 0xc]
or edx, 2
movsxd rcx, dword [rsp + 0x60]
imul rcx, rcx, 0xc
mov rax, qword [rsp + 0x40]
mov dword [rax + rcx + 0xc], edx
jmp 0x1400152c9
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x38]
mov r8, qword [rsp + 0x40]
xor edx, edx
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [0x140051e69], 1
add rsp, 0x78
ret