Function at 0x140097090
Capabilities:
Create process on windows

Disassembly:
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov rax, qword [0x140164030]
xor rax, rsp
mov qword [rbp + 8], rax
xor r14d, r14d
movzx edi, dl
mov qword [rsp + 0x60], r14
mov rsi, rcx
test r8b, r8b
je 0x140097163
mov qword [rsp + 0x68], r14
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentProcess]
lea r8, [rsp + 0x68]
mov edx, 0xf01ff
mov rcx, rax
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_OpenProcessToken]
test eax, eax
je 0x140097158
mov rcx, qword [rsp + 0x68]
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
lea r9d, [r14 + 2]
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov edx, 0xf01ff
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_DuplicateTokenEx]
test eax, eax
je 0x14009714d
call qword [sym.imp.api_ms_win_core_kernel32_legacy_l1_1_0.dll_WTSGetActiveConsoleSessionId]
mov rcx, qword [rsp + 0x60]
lea r9d, [r14 + 4]
lea r8, [rbp]
mov dword [rbp], eax
lea edx, [r14 + 0xc]
call qword [sym.imp.api_ms_win_security_base_l1_1_0.dll_SetTokenInformation]
test eax, eax
jne 0x14009714d
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov qword [rsp + 0x60], r14
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
cmp qword [rsp + 0x60], r14
jne 0x1400971ff
xor edx, edx
mov qword [rsp + 0x138], rbx
lea rax, [rbp]
mov qword [rsp + 0x68], r14
lea r9, [rsp + 0x68]
mov dword [rbp], r14d
xor ecx, ecx
mov qword [rsp + 0x20], rax
lea r8d, [rdx + 1]
call qword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
test eax, eax
je 0x1400971e6
mov edx, dword [rbp]
mov ebx, r14d
test edx, edx
je 0x1400971ec
nop
mov eax, ebx
lea rcx, [rax + rax*2]
mov rax, qword [rsp + 0x68]
movups xmm0, xmmword [rax + rcx*8]
movsd xmm1, qword [rax + rcx*8 + 0x10]
movsd qword [rbp - 0x80], xmm1
movups xmmword [rsp + 0x70], xmm0
cmp dword [rbp - 0x80], r14d
jne 0x1400971de
cmp qword [rsp + 0x60], r14
jne 0x1400971de
mov ecx, dword [rsp + 0x70]
lea rdx, [rsp + 0x60]
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
mov edx, dword [rbp]
inc ebx
cmp ebx, edx
jb 0x1400971a0
jmp 0x1400971ec
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov rbx, qword [rsp + 0x138]
cmp qword [rsp + 0x60], r14
je 0x140097308
mov rdx, qword [rsp + 0x60]
lea rcx, [rsp + 0x68]
xor r8d, r8d
mov qword [rsp + 0x68], r14
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
mov rcx, qword [rsp + 0x60]
xorps xmm0, xmm0
xor eax, eax
mov dword [rbp], r14d
mov qword [rbp - 0x10], rax
xor r9d, r9d
mov qword [rbp - 0x80], rax
mov r8, rsi
lea rax, str.Winsta0Default
xor edx, edx
movups xmmword [rbp - 0x60], xmm0
mov qword [rbp - 0x60], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x70]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 0x410
movups xmmword [rbp - 0x70], xmm0
mov dword [rsp + 0x28], r14d
mov qword [rsp + 0x20], r14
movups xmmword [rbp - 0x50], xmm0
mov dword [rbp - 0x70], 0x68
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rsp + 0x70], xmm0
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_CreateProcessAsUserW]
test eax, eax
je 0x1400972e8
mov rcx, qword [rsp + 0x70]
cmp rcx, 0xffffffffffffffff
je 0x1400972d7
test dil, dil
je 0x1400972d1
mov edx, 0xffffffff
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_WaitForSingleObject]
mov rcx, qword [rsp + 0x70]
lea rdx, [rbp]
call qword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetExitCodeProcess]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov rcx, qword [rsp + 0x78]
cmp rcx, 0xffffffffffffffff
je 0x1400972e8
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov rcx, qword [rsp + 0x68]
mov qword [rsp + 0x60], r14
call qword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov eax, dword [rbp]
jmp 0x14009730d
mov eax, 0xffffffff
mov rcx, qword [rbp + 8]
xor rcx, rsp
call fcn.1400c2450
mov rsi, qword [rsp + 0x140]
add rsp, 0x110
pop r14
pop rdi
pop rbp
ret