Function at 0x140027310
Capabilities:
Create process on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], r8
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rax - 0x48]
sub rsp, 0x120
mov qword [rbp - 0x70], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov ebx, r9d
mov r14, r8
mov rdi, rdx
mov r15, rcx
xor r12d, r12d
mov qword [rsp + 0x78], r12
xor eax, eax
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
xor edx, edx
lea r8d, [r12 + 0x60]
lea rcx, [rbp - 0x48]
call fcn.140052580
mov dword [rbp - 0x50], 0x68
mov dword [rbp - 0x14], 0x100
movdqa xmm0, xmmword [0x140095740]
movdqa xmmword [rbp], xmm0
or rsi, 0xffffffffffffffff
mov qword [rbp + 0x10], rsi
call fcn.140003500
mov rcx, rax
test rax, rax
jne 0x1400273a3
mov ecx, 0x80004005
call fcn.140003260
int3
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x60], rax
mov r9, rdi
mov r8, r15
lea rdx, str._s__s
lea rcx, [rsp + 0x60]
call fcn.140008820
mov edi, r12d
test ebx, ebx
je 0x140027494
lea rax, str.winsta0default
mov qword [rbp - 0x40], rax
mov qword [rsp + 0x70], r12
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov ebx, eax
mov dword [rsp + 0x68], r12d
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
lea rdx, [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
cmp dword [rsp + 0x68], ebx
je 0x140027494
lea rdx, [rsp + 0x70]
mov ecx, ebx
call qword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
mov rbx, qword [rsp + 0x60]
test eax, eax
je 0x140027597
cmp dword [rbx - 8], 1
jle 0x140027440
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x60]
call fcn.140007330
mov rbx, qword [rsp + 0x60]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x38], r12
mov dword [rsp + 0x30], 0x8000020
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], r12
xor r9d, r9d
mov r8, rbx
xor edx, edx
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov edi, eax
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1400274f1
mov rbx, qword [rsp + 0x60]
cmp dword [rbx - 8], 1
jle 0x1400274b1
mov edx, dword [rbx - 0x10]
lea rcx, [rsp + 0x60]
call fcn.140007330
mov rbx, qword [rsp + 0x60]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x8000020
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
mov edi, eax
test edi, edi
je 0x140027599
cmp qword [r14 + 8], 0
je 0x140027597
or edx, 0xffffffff
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [rsp + 0x6c], r12d
lea rdx, [rsp + 0x6c]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov edi, eax
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x140027594
mov rax, qword [r14]
mov qword [rbp - 0x68], rax
mov rcx, qword [rax + 8]
mov rdx, rax
mov r8d, dword [rsp + 0x6c]
cmp byte [rcx + 0x19], 0
jne 0x140027578
nop dword [rax + rax]
cmp dword [rcx + 0x1c], r8d
jge 0x14002756c
mov rcx, qword [rcx + 0x10]
jmp 0x140027572
mov rdx, rcx
mov rcx, qword [rcx]
cmp byte [rcx + 0x19], 0
je 0x140027560
mov qword [rbp - 0x60], rax
cmp rdx, rax
je 0x140027587
cmp r8d, dword [rdx + 0x1c]
jge 0x14002758a
mov rdx, rax
cmp rdx, rax
mov edi, 1
jne 0x140027597
mov edi, r12d
test edi, edi
setne dil
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x1400275b5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov r8, qword [r14]
mov r9, r8
mov r8, qword [r8]
lea rdx, [rbp - 0x58]
mov rcx, r14
call fcn.1400023d0
mov rcx, qword [r14]
call fcn.1400300f0
movzx eax, dil
lea r11, [rsp + 0x120]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret