Function at 0x1800045c0
Capabilities:
Get token privileges

Disassembly:
sub rsp, 0x68
movzx eax, byte [0x18004c921]
test eax, eax
je 0x1800045d4
jmp 0x180004810
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x40]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x180004809
lea rax, [rsp + 0x34]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, 3
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp dword [rsp + 0x34], 0
je 0x1800047fe
mov eax, dword [rsp + 0x34]
shl eax, 1
mov eax, eax
mov edx, eax
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [rsp + 0x38], rax
mov eax, dword [rsp + 0x34]
shl eax, 1
lea rcx, [rsp + 0x34]
mov qword [rsp + 0x20], rcx
mov r9d, eax
mov r8, qword [rsp + 0x38]
mov edx, 3
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x1800047f2
lea r8, [rsp + 0x48]
lea rdx, str.SeBackupPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x180004692
mov dword [rsp + 0x4c], 0
mov dword [rsp + 0x48], 0
lea r8, [rsp + 0x50]
lea rdx, str.SeRestorePrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x1800046ba
mov dword [rsp + 0x54], 0
mov dword [rsp + 0x50], 0
lea r8, [rsp + 0x58]
lea rdx, str.SeTakeOwnershipPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x1800046e2
mov dword [rsp + 0x5c], 0
mov dword [rsp + 0x58], 0
mov dword [rsp + 0x30], 0
jmp 0x1800046f6
mov eax, dword [rsp + 0x30]
inc eax
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0x38]
mov eax, dword [rax]
dec eax
cmp dword [rsp + 0x30], eax
jge 0x1800047c9
movsxd rax, dword [rsp + 0x30]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x38]
mov edx, dword [rsp + 0x4c]
cmp dword [rcx + rax + 8], edx
jne 0x18000473d
movsxd rax, dword [rsp + 0x30]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x38]
mov edx, dword [rsp + 0x48]
cmp dword [rcx + rax + 4], edx
je 0x1800047c4
movsxd rax, dword [rsp + 0x30]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x38]
mov edx, dword [rsp + 0x54]
cmp dword [rcx + rax + 8], edx
jne 0x18000476d
movsxd rax, dword [rsp + 0x30]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x38]
mov edx, dword [rsp + 0x50]
cmp dword [rcx + rax + 4], edx
je 0x1800047c4
movsxd rax, dword [rsp + 0x30]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x38]
mov edx, dword [rsp + 0x5c]
cmp dword [rcx + rax + 8], edx
jne 0x18000479d
movsxd rax, dword [rsp + 0x30]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x38]
mov edx, dword [rsp + 0x58]
cmp dword [rcx + rax + 4], edx
je 0x1800047c4
movsxd rax, dword [rsp + 0x30]
imul rax, rax, 0xc
mov rcx, qword [rsp + 0x38]
mov eax, dword [rcx + rax + 0xc]
or eax, 2
movsxd rcx, dword [rsp + 0x30]
imul rcx, rcx, 0xc
mov rdx, qword [rsp + 0x38]
mov dword [rdx + rcx + 0xc], eax
jmp 0x1800046ec
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, dword [rsp + 0x34]
mov r8, qword [rsp + 0x38]
xor edx, edx
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [0x18004c921], 1
add rsp, 0x68
ret