Function at 0x14005db60
Capabilities:
Acquire debug privileges

Disassembly:
mov qword [rsp + 0x20], rsi
push rbp
lea rbp, [rsp - 0x57]
sub rsp, 0xb0
mov rax, qword [0x1403a0088]
xor rax, rsp
mov qword [rbp + 0x4f], rax
xor esi, esi
mov dword [rbp + 0xf], 0xffffffff
mov qword [rbp - 9], 0xffffffffffffffff
mov qword [rbp - 0x19], 0xffffffffffffffff
mov qword [rbp - 1], 0xffffffffffffffff
mov qword [rbp - 0x11], 0xffffffffffffffff
mov qword [rbp - 0x21], 0xffffffffffffffff
mov qword [rbp + 7], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp - 9]
mov edx, 0x2000000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x14005de76
mov rcx, qword [rbp - 9]
lea rax, [rbp - 0x19]
mov qword [rsp + 0x28], rax
lea r9d, [rsi + 2]
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x14005de76
lea r8, [rbp + 0x17]
xor ecx, ecx
lea rdx, [0x14031e700]
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x14005de76
mov qword [rsp + 0xc0], rbx
mov rbx, qword [rbp - 0x19]
mov qword [rsp + 0xc8], rdi
mov dword [rbp + 0x1f], 2
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov rcx, rax
lea edx, [rsi + 8]
lea r8d, [rsi + 0x10]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
je 0x14005de66
mov qword [rsp + 0xd0], r14
lea r9d, [rsi + 0x10]
mov r14d, 1
mov qword [rsp + 0x28], rsi
mov dword [rax], r14d
mov r8, rax
movsd xmm0, qword [rbp + 0x17]
mov rcx, rbx
movsd qword [rax + 4], xmm0
mov edx, dword [rbp + 0x1f]
mov dword [rax + 0xc], edx
xor edx, edx
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
mov ebx, esi
cmovne ebx, r14d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
je 0x14005de5e
mov rdx, qword [rbp - 0x19]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
je 0x14005de5e
call fcn.14005d5b0
mov dword [rbp + 0xf], eax
cmp eax, 0xffffffff
je 0x14005de5e
lea rdx, [rbp - 1]
call fcn.14005d650
test eax, eax
je 0x14005de5e
mov rcx, qword [rbp - 1]
lea rax, [rbp - 0x11]
mov qword [rsp + 0x28], rax
lea r9d, [rsi + 2]
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x14005de5e
mov rbx, qword [rbp - 0x11]
lea r8, [rbp - 0x29]
mov rcx, rbx
mov qword [rbp - 0x29], rsi
lea edx, [rsi + 3]
call fcn.14005d810
test eax, eax
je 0x14005de5e
mov rdi, qword [rbp - 0x29]
mov edx, esi
cmp dword [rdi], edx
jbe 0x14005dd66
nop
mov eax, edx
inc edx
inc rax
lea rax, [rax + rax*2]
mov dword [rdi + rax*4], 2
cmp edx, dword [rdi]
jb 0x14005dd50
mov r8d, dword [rdi]
lea rdx, [rdi + 4]
mov rcx, rbx
call fcn.14005d4d0
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
je 0x14005de5e
mov rdx, qword [rbp - 0x11]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
je 0x14005de5e
lea rdx, [rbp + 0x27]
lea rcx, str.TrustedInstaller
call fcn.14005d9a0
test eax, eax
jne 0x14005de5e
mov r8d, dword [rbp + 0x43]
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x14005de5e
lea r8, [rbp + 7]
mov edx, 0x2000000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x14005de5e
mov rcx, qword [rbp + 7]
lea rax, [rbp - 0x21]
mov qword [rsp + 0x28], rax
mov r9d, r14d
xor r8d, r8d
mov dword [rsp + 0x20], r14d
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x14005de5e
mov rcx, qword [rbp - 0x21]
lea r8, [rbp + 0xf]
mov r9d, 4
lea edx, [r9 + 8]
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
je 0x14005de5e
mov rcx, qword [rbp - 0x21]
mov edx, 2
call fcn.14005d910
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
cmovne esi, r14d
mov r14, qword [rsp + 0xd0]
mov rbx, qword [rsp + 0xc0]
mov rdi, qword [rsp + 0xc8]
mov eax, esi
mov rcx, qword [rbp + 0x4f]
xor rcx, rsp
call fcn.140125a70
mov rsi, qword [rsp + 0xd8]
add rsp, 0xb0
pop rbp
ret