Function at 0x14008057c
Capabilities:
Create process on windows
Create process suspended

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], rbx
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x48]
sub rsp, 0x110
mov r12d, r9d
mov edi, r9d
shr r12d, 0xf
btc edi, 0xf
and r12d, 1
mov rbx, r8
mov r15, rcx
mov dword [rsp + 0x7c], r12d
test r12d, r12d
lea rcx, [rbp - 0x60]
cmove edi, r9d
xor eax, eax
xor esi, esi
mov dword [rsp + 0x78], edi
and qword [rsp + 0x60], rsi
xor edx, edx
and qword [rsp + 0x68], rsi
xor r13d, r13d
mov qword [rbp - 0x80], rax
lea r8d, [rsi + 0x68]
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
call fcn.1401a72b0
cmp edi, 5
je 0x140080617
test edi, edi
je 0x14008070c
call qword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov dword [rbp + 0x68], eax
cmp eax, 0xffffffff
jne 0x140080617
xor eax, eax
jmp 0x140080a76
test edi, edi
je 0x14008070c
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov r14d, 2
lea r8, [rsp + 0x60]
mov edx, r14d
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x140080663
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x31c
mov r9d, r14d
mov dword [rsp + 0x20], eax
lea rdx, str...microstackILibProcessPipe.c
xor ecx, ecx
call fcn.14007f3d4
jmp 0x140080610
mov rcx, qword [rsp + 0x60]
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
mov r9d, r14d
xor r8d, r8d
mov dword [rsp + 0x20], 1
mov edx, 0x2000000
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x1400806a8
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x31d
jmp 0x14008064c
mov eax, dword [rbp + 0x68]
lea r8, [rbp + 0x68]
mov rcx, qword [rsp + 0x68]
mov r9d, 4
cmp edi, 5
cmove eax, dword [rbp + 0x70]
lea edx, [r9 + 8]
mov dword [rbp + 0x68], eax
call qword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
jne 0x1400806f9
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, 0x31f
jmp 0x14008064c
cmp edi, r14d
lea rax, str.Winsta0Winlogon
cmovne rax, qword [rbp - 0x50]
mov qword [rbp - 0x50], rax
test rbx, rbx
je 0x1400807ee
mov rax, qword [rbx]
test rax, rax
je 0x1400807ee
mov rcx, qword [rbx + 8]
test rcx, rcx
jne 0x140080732
mov rsi, rax
jmp 0x1400807ee
xor r14d, r14d
mov rax, rbx
xor r15d, r15d
mov rcx, qword [rax]
test rcx, rcx
jne 0x140080747
xor eax, eax
jmp 0x140080751
mov edx, 0x10000
call fcn.1401ade00
inc eax
inc rsi
add r15d, eax
inc r14d
lea rax, [rbx + rsi*8]
cmp qword [rax], r13
jne 0x14008073b
lea eax, [r14 - 1]
add eax, r15d
movsxd rcx, eax
mov dword [rsp + 0x74], eax
call fcn.1401ae494
and dword [rsp + 0x70], r13d
xor r14d, r14d
mov r8, qword [rbx]
mov rsi, rax
lea r13d, [r14 + 1]
test r8, r8
je 0x1400807ea
mov r12d, dword [rsp + 0x70]
xor r15d, r15d
mov edi, dword [rsp + 0x74]
lea rax, [0x140230378]
mov qword [rsp + 0x20], r8
test r12d, r12d
movsxd rcx, r14d
lea r9, [0x140236ffc]
cmove r9, rax
lea r8, [0x140232280]
mov eax, edi
add rcx, rsi
sub eax, r14d
movsxd rdx, eax
call fcn.1400010e4
inc r15
add r14d, eax
inc r12d
mov r8, qword [rbx + r15*8]
test r8, r8
jne 0x14008079b
mov edi, dword [rsp + 0x78]
mov r12d, dword [rsp + 0x7c]
mov r15, qword [rbp + 0x50]
mov ecx, 0x78
call fcn.1401ae494
xor r9d, r9d
mov rcx, rax
xor r8d, r8d
lea edx, [r9 + 0x60]
call fcn.140079034
mov r14d, dword [rbp + 0x80]
mov rbx, rax
cmp edi, 4
je 0x14008082c
mov r9d, r14d
mov rcx, r15
call fcn.14008013c
mov qword [rbx + 0x38], rax
mov qword [rax + 0x28], rbx
mov qword [rbx + 0x10], r15
mov rcx, qword [r15 + 0x18]
mov qword [rbx + 0x58], rcx
mov dword [rbp - 0x60], 0x68
cmp edi, 4
je 0x1400808ba
mov r9d, r14d
mov rcx, r15
call fcn.14008013c
mov qword [rbx + 0x28], rax
mov r9d, r14d
mov rcx, r15
mov qword [rax + 0x28], rbx
call fcn.14008013c
mov qword [rbx + 0x30], rax
mov qword [rax + 0x28], rbx
mov rcx, qword [rbx + 0x28]
add rcx, 0x70
call fcn.14007ffe0
mov rcx, qword [rbx + 0x30]
add rcx, 0x68
call fcn.14007ffe0
mov rcx, qword [rbx + 0x38]
add rcx, 0x68
call fcn.14007ffe0
mov rax, qword [rbx + 0x38]
mov rcx, qword [rax + 0x70]
mov qword [rbp], rcx
mov rax, qword [rbx + 0x28]
mov rcx, qword [rax + 0x68]
mov qword [rbp - 0x10], rcx
mov rax, qword [rbx + 0x30]
mov rcx, qword [rax + 0x70]
bts dword [rbp - 0x24], 8
mov qword [rbp - 8], rcx
mov r14, qword [rbp + 0x78]
mov r15, qword [rbp + 0x58]
test edi, 0xfffffffb
jne 0x14008091e
mov eax, r12d
lea rdx, [rbp - 0x80]
mov qword [rsp + 0x48], rdx
neg eax
lea rdx, [rbp - 0x60]
sbb ecx, ecx
mov qword [rsp + 0x40], rdx
and ecx, 0x208
xor eax, eax
bts ecx, 0x1b
mov rdx, rsi
cmp edi, 4
setne al
and qword [rsp + 0x38], 0
mov qword [rsp + 0x30], r14
xor r9d, r9d
mov dword [rsp + 0x28], ecx
xor r8d, r8d
mov rcx, r15
mov dword [rsp + 0x20], eax
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x14008097b
test edi, edi
je 0x1400809d9
lea rcx, [rbp - 0x80]
neg r12d
mov qword [rsp + 0x50], rcx
mov r8, rsi
sbb eax, eax
lea rcx, [rbp - 0x60]
mov qword [rsp + 0x48], rcx
and eax, 0x208
and qword [rsp + 0x40], 0
bts eax, 0x1b
mov rcx, qword [rsp + 0x68]
xor r9d, r9d
mov qword [rsp + 0x38], r14
mov rdx, r15
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], 1
and qword [rsp + 0x20], 0
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
jne 0x1400809d9
cmp edi, 4
je 0x14008099b
mov rcx, qword [rbx + 0x38]
call fcn.14007fed0
mov rcx, qword [rbx + 0x30]
call fcn.14007fed0
mov rcx, qword [rbx + 0x28]
call fcn.14007fed0
test r13d, r13d
je 0x1400809a8
mov rcx, rsi
call fcn.1401ad038
mov rcx, rbx
call fcn.14007911c
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x1400809c0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140080610
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140080610
test r13d, r13d
je 0x1400809e6
mov rcx, rsi
call fcn.1401ad038
cmp edi, 4
je 0x140080a30
mov rcx, qword [rbx + 0x30]
mov rcx, qword [rcx + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbx + 0x30]
and qword [rax + 0x70], 0
mov rcx, qword [rbx + 0x38]
mov rcx, qword [rcx + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbx + 0x38]
and qword [rax + 0x70], 0
mov rcx, qword [rbx + 0x28]
mov rcx, qword [rcx + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rbx + 0x28]
and qword [rax + 0x68], 0
mov rax, qword [rbp - 0x80]
mov qword [rbx + 0x48], rax
mov rcx, qword [rbp - 0x78]
test rcx, rcx
je 0x140080a47
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rbp - 0x70]
mov dword [rbx + 0x18], eax
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x140080a63
call qword [sym.imp.KERNEL32.dll_CloseHandle]
and qword [rsp + 0x60], 0
mov rcx, qword [rsp + 0x68]
test rcx, rcx
je 0x140080a73
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rbx
mov rbx, qword [rsp + 0x160]
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret