Function at 0x14008eb80
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
lea rbp, [rsp - 0x40]
sub rsp, 0x140
mov rax, qword [0x1401737a8]
xor rax, rsp
mov qword [rbp + 0x30], rax
movups xmm0, xmmword [str.S_1_16_4096]
lea rax, [rbp - 0x78]
xor r15d, r15d
movsd xmm1, qword [0x140133988]
mov r13, rcx
mov qword [rsp + 0x50], rax
lea rcx, [rbp + 0x10]
mov dword [rsp + 0x48], r15d
mov r9d, 0x220
mov dword [rsp + 0x40], r15d
lea r8d, [r15 + 0x20]
mov dword [rsp + 0x38], r15d
mov dl, 2
movups xmmword [rbp + 0x18], xmm0
mov dword [rsp + 0x30], r15d
xorps xmm0, xmm0
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
mov dword [rbp + 0x10], 0
mov word [rbp + 0x14], 0x500
mov qword [rbp - 0x78], r15
mov qword [rbp - 0x70], r15
mov qword [rsp + 0x68], r15
movsd qword [rbp + 0x28], xmm1
mov qword [rsp + 0x78], r15
movups xmmword [rbp - 0x40], xmm0
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov rax, qword [rbp - 0x78]
lea edx, [r15 + 3]
mov qword [rbp - 0x30], rax
xor r9d, r9d
lea rax, [rsp + 0x60]
mov dword [rbp - 0x28], r15d
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ecx, dword [rsp + 0x60]
call fcn.1400e8270
mov r9d, dword [rsp + 0x60]
lea edx, [r15 + 3]
mov r14, rax
mov rcx, r13
lea rax, [rsp + 0x60]
mov r8, r14
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ecx, dword [rsp + 0x60]
call fcn.1400e8270
mov r12, rax
lea r8d, [r15 + 0x20]
mov r9d, 0x221
lea rcx, [rbp + 0x10]
mov dl, 2
mov dword [rax], r15d
lea rax, [rbp - 0x70]
mov qword [rsp + 0x50], rax
mov dword [rsp + 0x48], r15d
mov dword [rsp + 0x40], r15d
mov dword [rsp + 0x38], r15d
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
call qword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov rdi, qword [rbp - 0x70]
lea r9, [rbp - 0x60]
xorps xmm0, xmm0
lea rdx, [rbp - 0x20]
mov r8d, 0x800
xor ecx, ecx
movups xmmword [rbp - 0x20], xmm0
mov ebx, r15d
movups xmmword [rbp - 0x10], xmm0
movups xmmword [rbp], xmm0
call sub.ADVAPI32.dll_LsaOpenPolicy
test eax, eax
jne 0x14008ed8f
mov rcx, qword [rbp - 0x60]
lea r9, [rsp + 0x70]
lea r8, [rbp - 0x68]
mov rdx, rdi
call sub.ADVAPI32.dll_LsaEnumerateAccountRights
test eax, eax
jne 0x14008ed86
mov eax, dword [rsp + 0x70]
test eax, eax
je 0x14008ed86
lea rcx, [rax + rax*2]
lea rcx, [rcx*4 + 0x10]
call fcn.1400e8270
mov rbx, rax
mov edi, r15d
mov eax, dword [rsp + 0x70]
mov dword [rbx], eax
test eax, eax
je 0x14008ed7d
nop dword [rax + rax]
mov rdx, qword [rbp - 0x68]
mov ecx, edi
lea rax, [rcx*2 + 1]
add rax, rcx
add rcx, rcx
mov rdx, qword [rdx + rcx*8 + 8]
lea r8, [rbx + rax*4]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
inc edi
cmp edi, dword [rsp + 0x70]
jb 0x14008ed50
mov rcx, qword [rbp - 0x68]
call sub.ADVAPI32.dll_LsaFreeMemory
mov rcx, qword [rbp - 0x60]
call sub.ADVAPI32.dll_LsaClose
test rbx, rbx
jne 0x14008edd8
lea ecx, [rbx + 0x4c]
call fcn.1400e8270
mov rsi, r15
lea rdi, str.SeShutdownPrivilege
mov rbx, rax
mov dword [rax], r15d
mov r15d, 5
mov rdx, qword [rdi]
lea r8, [rbx + 4]
add r8, rsi
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x14008edca
inc dword [rbx]
add rsi, 0xc
add rdi, 8
sub r15, 1
jne 0x14008edb2
cmp dword [r14], 0
mov r9d, r15d
jbe 0x14008ee53
mov r8d, dword [rbx]
mov eax, r15d
test r8d, r8d
je 0x14008ee18
mov ecx, r9d
lea rdx, [rcx + rcx*2]
lea r10, [r14 + rdx*4]
nop word [rax + rax]
mov ecx, eax
lea rdx, [rcx + rcx*2]
mov rcx, qword [r10 + 4]
cmp rcx, qword [rbx + rdx*4 + 4]
je 0x14008ee18
inc eax
cmp eax, r8d
jb 0x14008ee00
cmp eax, r8d
jne 0x14008ee4b
mov ecx, dword [r12]
lea eax, [rcx + 1]
mov dword [r12], eax
lea rcx, [rcx + rcx*2]
mov eax, r9d
lea rdx, [rax + rax*2]
movsd xmm0, qword [r14 + rdx*4 + 4]
movsd qword [r12 + rcx*4 + 4], xmm0
mov eax, dword [r14 + rdx*4 + 0xc]
mov dword [r12 + rcx*4 + 0xc], eax
inc r9d
cmp r9d, dword [r14]
jb 0x14008ede1
mov rcx, r14
call fcn.1400e825c
mov rcx, rbx
call fcn.1400e825c
lea rax, [r12 + 4]
xor edx, edx
lea rcx, [rsp + 0x68]
mov qword [rsp + 0x40], rcx
lea r9, [rbp - 0x30]
mov qword [rsp + 0x38], r15
mov rcx, r13
mov dword [rsp + 0x30], r15d
lea r8d, [rdx + 1]
mov qword [rsp + 0x28], rax
mov eax, dword [r12]
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_CreateRestrictedToken]
test eax, eax
jne 0x14008eea7
mov qword [rsp + 0x68], r15
jmp 0x14008ef1c
mov edx, 1
lea rcx, [0x14011eb90]
call fcn.140035800
mov rcx, rax
lea rdx, str.ConvertStringSidToSidA
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x14018e990], rax
test rax, rax
je 0x14008ef1c
lea rdx, [rsp + 0x78]
lea rcx, [rbp + 0x18]
call rax
test eax, eax
je 0x14008ef1c
mov rcx, qword [rsp + 0x78]
mov qword [rbp - 0x40], rcx
mov dword [rbp - 0x38], 0x20
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov rcx, qword [rsp + 0x68]
lea r8, [rbp - 0x40]
mov edx, reloc.OLEAUT32.dll_SafeArrayPutElement
lea r9d, [rax + 0x10]
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x68]
lea rax, [rsp + 0x74]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea edx, [r9 + 1]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ecx, dword [rsp + 0x74]
call fcn.1400e8270
mov r9d, dword [rsp + 0x74]
mov rsi, rax
mov rcx, qword [rsp + 0x68]
lea rax, [rsp + 0x74]
mov r8, rsi
mov qword [rsp + 0x20], rax
mov edx, 1
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rcx, qword [rsp + 0x68]
lea rax, [rbp - 0x48]
mov qword [rsp + 0x38], rax
xor r9d, r9d
lea rax, [rbp - 0x80]
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r15
lea edx, [r9 + 6]
lea r8d, [r9 + 4]
call qword [sym.imp.ADVAPI32.dll_GetSecurityInfo]
mov rcx, qword [rsi]
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov rcx, qword [rbp - 0x80]
movzx ebx, word [rcx + 2]
add ebx, 8
add ebx, eax
mov ecx, ebx
call fcn.1400e8270
mov r8d, 2
mov edx, ebx
mov rcx, rax
mov rdi, rax
call qword [sym.imp.ADVAPI32.dll_InitializeAcl]
mov rcx, qword [rbp - 0x80]
mov ebx, r15d
cmp r15w, word [rcx + 4]
jae 0x14008f018
nop word [rax + rax]
lea r8, [rbp - 0x58]
mov edx, ebx
call qword [sym.imp.ADVAPI32.dll_GetAce]
mov r9, qword [rbp - 0x58]
mov r8d, ebx
mov edx, 2
mov rcx, rdi
movzx eax, word [r9 + 2]
mov dword [rsp + 0x20], eax
call qword [sym.imp.ADVAPI32.dll_AddAce]
mov rcx, qword [rbp - 0x80]
inc ebx
movzx eax, word [rcx + 4]
cmp ebx, eax
jb 0x14008efe0
mov r9, qword [rsi]
mov edx, 2
mov r8d, 0x10000000
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_AddAccessAllowedAce]
mov rcx, qword [rsp + 0x68]
xor r9d, r9d
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], r15
lea edx, [r9 + 6]
lea r8d, [r9 + 4]
call qword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
mov rcx, qword [rsp + 0x68]
lea r8, [rbp - 0x50]
mov qword [rbp - 0x50], rdi
mov edx, 6
movzx r9d, word [rdi + 2]
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
mov rcx, rdi
call fcn.1400e825c
mov rcx, rsi
call fcn.1400e825c
mov rcx, qword [rbp - 0x48]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, qword [rbp - 0x70]
call qword [sym.imp.ADVAPI32.dll_FreeSid]
mov rcx, r12
call fcn.1400e825c
mov rax, qword [rsp + 0x68]
mov rcx, qword [rbp + 0x30]
xor rcx, rsp
call fcn.1400e17a0
lea r11, [rsp + 0x140]
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