Function at 0x7ff6763e21f0
Capabilities:
Create process on windows
Get common file path
Get comspec environment variable
Get token privileges
Query environment variable

Disassembly:
mov r11, rsp
push rbp
push rdi
lea rbp, [r11 - 0x68]
sub rsp, 0x158
mov rax, qword [0x7ff6763ea008]
xor rax, rsp
mov qword [rbp + 0x30], rax
xorps xmm0, xmm0
mov qword [r11 + 0x10], rbx
mov qword [r11 + 0x18], rsi
xor eax, eax
mov qword [r11 - 0x18], r13
xor edi, edi
mov qword [r11 - 0x20], r14
mov ebx, edi
mov r14, rcx
mov qword [rbp - 0x80], 0xffffffffffffffff
mov ecx, 0x208
mov qword [rbp - 0x78], 0xffffffffffffffff
movups xmmword [rbp - 0x3c], xmm0
mov dword [rbp + 0x24], eax
movups xmmword [rbp - 0x2c], xmm0
mov qword [rbp - 0x60], rax
movups xmmword [rbp - 0x1c], xmm0
mov dword [rbp - 0x40], 0x68
movups xmmword [rbp - 0xc], xmm0
movups xmmword [rbp + 4], xmm0
movups xmmword [rbp + 0x14], xmm0
movups xmmword [rbp - 0x70], xmm0
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rcx, rax
mov edx, 0x104
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
lea r9, [rbp - 0x80]
xor r8d, r8d
mov rcx, rax
mov qword [rsp + 0x68], rax
mov edx, 0xf01ff
mov rsi, rax
call qword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
jne 0x7ff6763e22c0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____OpenThreadToken___failed__Err:__d__n
call fcn.7ff6763e1010
jmp 0x7ff6763e2396
mov qword [rsp + 0x188], r12
mov qword [rsp + 0x140], r15
mov r15d, dword [r14]
test r15d, r15d
je 0x7ff6763e22e7
lea rcx, str.___OpenThreadToken___OK_n
call fcn.7ff6763e1010
mov r15d, dword [r14]
mov r12, qword [rbp - 0x80]
lea rax, [rsp + 0x78]
xor r9d, r9d
mov dword [rsp + 0x70], edi
xor r8d, r8d
mov dword [rsp + 0x78], edi
mov rcx, r12
mov qword [rsp + 0x20], rax
lea edx, [r9 + 3]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x7ff6763e2331
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 0x7a
je 0x7ff6763e2331
mov edx, eax
lea rcx, str.____GetTokenInformation_failed__Err:__d__n
call fcn.7ff6763e1010
jmp 0x7ff6763e2383
mov edx, dword [rsp + 0x78]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rsi, rax
test rax, rax
je 0x7ff6763e237e
mov r9d, dword [rsp + 0x78]
lea rax, [rsp + 0x78]
mov r8, rsi
mov qword [rsp + 0x20], rax
mov edx, 3
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x7ff6763e2434
mov edx, ebx
lea rcx, str.____GetTokenInformation_failed__Err:__d__n
call fcn.7ff6763e1010
mov rsi, qword [rsp + 0x68]
mov rbx, rdi
mov r12, qword [rsp + 0x188]
mov r15, qword [rsp + 0x140]
mov rcx, qword [rbp - 0x80]
mov r14, qword [rsp + 0x148]
test rcx, rcx
je 0x7ff6763e23ad
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x78]
test rcx, rcx
je 0x7ff6763e23bc
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rsi, rsi
je 0x7ff6763e23ca
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rsi, qword [rsp + 0x180]
test rbx, rbx
je 0x7ff6763e23e0
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rsp + 0x178]
test r13, r13
je 0x7ff6763e23f6
mov rcx, r13
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [rbp - 0x70]
mov r13, qword [rsp + 0x150]
test rcx, rcx
je 0x7ff6763e240d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x68]
test rcx, rcx
je 0x7ff6763e241c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov rcx, qword [rbp + 0x30]
xor rcx, rsp
call fcn.7ff6763e3c80
add rsp, 0x158
pop rdi
pop rbp
ret
test r15d, r15d
je 0x7ff6763e2445
lea rcx, str.___GetTokenInformation___OK_n
call fcn.7ff6763e1010
mov eax, dword [rsi]
mov ebx, edi
mov dword [rsp + 0x74], eax
mov r15d, 0x10
test eax, eax
je 0x7ff6763e24a3
nop word [rax + rax]
mov eax, ebx
lea r8, [rbp - 0x58]
mov qword [rsp + 0x28], rdi
mov r9d, r15d
xor edx, edx
mov dword [rbp - 0x58], 1
mov dword [rbp - 0x4c], 2
lea rcx, [rax + rax*2]
mov qword [rsp + 0x20], rdi
mov rax, qword [rsi + rcx*4 + 4]
mov rcx, r12
mov qword [rbp - 0x54], rax
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x7ff6763e2517
inc ebx
cmp ebx, dword [rsi]
jb 0x7ff6763e2460
mov dword [rsp + 0x70], 1
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [rsp + 0x70], edi
je 0x7ff6763e237e
mov edx, dword [rsp + 0x74]
lea rcx, str.___Got_new_token__Privilege_count:__d_n
call fcn.7ff6763e1010
cmp dword [r14 + 4], edi
lea rax, [rbp - 0x78]
mov rcx, qword [rbp - 0x80]
mov r9d, 2
cmovne r15d, edi
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x7ff6763e2530
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____DuplicateTokenEx___failed__Err:__d__n
jmp 0x7ff6763e2379
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____AdjustTokenPrivileges___failed__Err:__d__n
call fcn.7ff6763e1010
jmp 0x7ff6763e24ab
mov r8, qword [r14 + 0x20]
test r8, r8
je 0x7ff6763e25aa
cmp dword [r14], edi
je 0x7ff6763e2551
mov rdx, r8
lea rcx, str.___Using_custom_command:__ls_n
call fcn.7ff6763e1010
mov r8, qword [r14 + 0x20]
mov rcx, qword [rbp - 0x78]
lea rax, [rbp - 0x70]
mov qword [rsp + 0x50], rax
xor r9d, r9d
lea rax, [rbp - 0x40]
xor edx, edx
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x7ff6763e2631
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____CreateProcessAsUser___failed__Err:__d__n
jmp 0x7ff6763e2379
mov ecx, 0x800
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov r8d, 0x400
lea rcx, str.COMSPEC
mov rdx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov rcx, qword [rbp - 0x78]
lea rax, [rbp - 0x70]
mov qword [rsp + 0x50], rax
xor r9d, r9d
lea rax, [rbp - 0x40]
xor r8d, r8d
mov qword [rsp + 0x48], rax
mov rdx, rbx
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], r15d
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], rdi
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x7ff6763e2634
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____CreateProcessAsUser___failed__Err:__d__n
call fcn.7ff6763e1010
mov rsi, qword [rsp + 0x68]
jmp 0x7ff6763e2386
mov rbx, rdi
lea rcx, str.___CreateProcessAsUser___OK_n
call fcn.7ff6763e1010
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fflush]
cmp dword [r14 + 4], edi
je 0x7ff6763e2669
mov rcx, qword [rbp - 0x70]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rsi, qword [rsp + 0x68]
mov edi, 1
jmp 0x7ff6763e2386