Function at 0x14005dea0
Capabilities:
Acquire debug privileges
Create process on windows
Query environment variable
Resume thread

Disassembly:
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r15
lea rbp, [rsp - 0x280]
sub rsp, 0x380
mov rax, qword [0x1403a0088]
xor rax, rsp
mov qword [rbp + 0x270], rax
mov ecx, dword [rbp + 0x2c0]
xor edi, edi
mov r15, qword [rbp + 0x2d8]
test ecx, ecx
je 0x14005df13
sub ecx, 1
je 0x14005df0c
sub ecx, 1
je 0x14005df08
sub ecx, 1
je 0x14005df01
cmp ecx, 1
je 0x14005defa
mov eax, 0x80070057
jmp 0x14005e2d0
mov esi, 6
jmp 0x14005df18
mov esi, 3
jmp 0x14005df18
mov esi, edi
jmp 0x14005df18
mov esi, 5
jmp 0x14005df18
mov esi, 0xa
mov dword [rbp + 0x20], 0xffffffff
mov qword [rbp - 0x80], 0xffffffffffffffff
mov qword [rsp + 0x68], 0xffffffffffffffff
mov qword [rbp - 0x78], 0xffffffffffffffff
mov qword [rsp + 0x70], 0xffffffffffffffff
mov qword [rsp + 0x60], 0xffffffffffffffff
mov qword [rbp - 0x70], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rbp - 0x80]
mov edx, 0x2000000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x14005e2ce
mov rcx, qword [rbp - 0x80]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov r9d, 2
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x14005e2ce
lea r8, [rbp + 0x28]
xor ecx, ecx
lea rdx, str.SeDebugPrivilege
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x14005e2ce
mov qword [rsp + 0x3a0], rbx
mov rbx, qword [rsp + 0x68]
mov qword [rsp + 0x3b0], r14
mov dword [rbp + 0x30], 2
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov edx, 8
mov rcx, rax
lea r8d, [rdx + 8]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r14, rax
test rax, rax
je 0x14005e2be
mov qword [rsp + 0x3a8], r12
mov r8, rax
mov r12d, 1
mov qword [rsp + 0x28], rdi
mov dword [rax], r12d
xor edx, edx
movsd xmm0, qword [rbp + 0x28]
movsd qword [rax + 4], xmm0
mov ecx, dword [rbp + 0x30]
lea r9d, [r12 + 0xf]
mov dword [rax + 0xc], ecx
mov rcx, rbx
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
mov ebx, edi
cmovne ebx, r12d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
je 0x14005e2b6
mov rdx, qword [rsp + 0x68]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
je 0x14005e2b6
call fcn.14005d5b0
mov dword [rbp + 0x20], eax
cmp eax, 0xffffffff
je 0x14005e2b6
lea rdx, [rbp - 0x78]
call fcn.14005d650
test eax, eax
je 0x14005e2b6
mov rcx, qword [rbp - 0x78]
lea rax, [rsp + 0x70]
mov qword [rsp + 0x28], rax
lea r9d, [r12 + 1]
xor r8d, r8d
mov dword [rsp + 0x20], 2
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x14005e2b6
mov rcx, qword [rsp + 0x70]
lea edx, [r12 + 1]
call fcn.14005d910
test eax, eax
je 0x14005e2b6
mov rdx, qword [rsp + 0x70]
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_SetThreadToken]
test eax, eax
je 0x14005e2b6
lea rdx, [rbp + 0x38]
lea rcx, [0x14031e780]
call fcn.14005d9a0
test eax, eax
jne 0x14005e2b6
mov r8d, dword [rbp + 0x54]
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r14, rax
test rax, rax
je 0x14005e2b6
lea r8, [rbp - 0x70]
mov edx, 0x2000000
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov rcx, r14
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x14005e2b6
mov rcx, qword [rbp - 0x70]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
mov r9d, r12d
xor r8d, r8d
mov dword [rsp + 0x20], r12d
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x14005e2b6
mov rcx, qword [rsp + 0x60]
lea r9d, [r12 + 3]
lea r8, [rbp + 0x20]
lea edx, [r12 + 0xb]
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
je 0x14005e2b6
mov rcx, qword [rsp + 0x60]
lea edx, [r12 + 1]
call fcn.14005d910
xor edx, edx
lea r8d, [r12 + 0x5f]
lea rcx, [rbp - 0x48]
call fcn.1402767a0
mov rdx, qword [rsp + 0x60]
lea rcx, [rsp + 0x78]
or dword [rbp - 0x14], r12d
xor eax, eax
mov qword [rbp - 0x60], rax
mov r8d, r12d
mov qword [rbp - 0x58], rax
lea rax, [0x14031e7a8]
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x68], rdi
mov dword [rbp - 0x50], 0x68
mov word [rbp - 0x10], si
mov qword [rsp + 0x78], rdi
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x14005e2b6
mov r8d, 0x104
lea rdx, [rbp + 0x60]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x14005e2ab
mov rcx, qword [rsp + 0x60]
lea rax, [rbp - 0x68]
mov qword [rsp + 0x50], rax
lea r8, [rbp + 0x60]
lea rax, [rbp - 0x50]
xor r9d, r9d
mov qword [rsp + 0x48], rax
xor edx, edx
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x404
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x14005e2ab
mov rcx, qword [rbp - 0x68]
mov edx, 0x100
call qword [sym.imp.KERNEL32.dll_SetPriorityClass]
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_ResumeThread]
mov edx, dword [rbp + 0x2c8]
xor r8d, r8d
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
mov rcx, qword [rbp - 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, r12d
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov r12, qword [rsp + 0x3a8]
mov rbx, qword [rsp + 0x3a0]
mov r14, qword [rsp + 0x3b0]
mov eax, edi
mov rcx, qword [rbp + 0x270]
xor rcx, rsp
call fcn.140125a70
mov rsi, qword [rsp + 0x3b8]
add rsp, 0x380
pop r15
pop rdi
pop rbp
ret