Function at 0x140101520
Capabilities:
Create process on windows

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x10]
sub rsp, 0x110
mov qword [rbp - 0x68], 0xfffffffffffffffe
mov qword [rsp + 0x158], rbx
mov r14, rcx
xor sil, sil
xor edx, edx
lea r8d, [rdx + 0x60]
lea rcx, [rbp - 0x58]
call fcn.1402c22a0
xor r15d, r15d
mov qword [rsp + 0x70], r15
xor eax, eax
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rax
mov dword [rbp - 0x60], 0x68
lea rcx, [rsp + 0x60]
call fcn.140101400
nop
lea rcx, [0x140348ca0]
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x58], r15
or rdi, 0xffffffffffffffff
mov r8, qword [rsp + 0x60]
test r8, r8
je 0x140101611
mov rax, rdi
inc rax
cmp word [r8 + rax*2], 0
jne 0x1401015a0
test rax, rax
je 0x140101611
lea rdx, str.WinSta0_s
lea rcx, [rbp - 0x78]
call fcn.1401ff700
mov rbx, rax
mov edx, dword [rax + 0xc]
lea rcx, [rsp + 0x50]
call fcn.1401ff260
movsxd r9, dword [rbx + 0xc]
mov eax, dword [rsp + 0x58]
inc eax
movsxd rdx, eax
mov r8, qword [rbx]
mov rcx, qword [rsp + 0x50]
call fcn.1402bd21c
mov edx, dword [rbx + 0xc]
lea rcx, [rsp + 0x50]
call fcn.140200570
nop
cmp dword [rbp - 0x70], 0
jle 0x140101607
mov rcx, qword [rbp - 0x78]
call fcn.1402b9c20
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14010162a
inc rdi
cmp word [rcx + rdi*2], 0
jne 0x140101611
test rdi, rdi
mov rax, qword [rbp - 0x50]
cmovne rax, rcx
mov qword [rbp - 0x50], rax
mov qword [rbp + 0x50], r15
mov qword [rbp + 0x40], r15
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rbp + 0x40]
mov edx, 8
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x14010165a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rbp + 0x40], r15
jmp 0x14010166b
xor r8d, r8d
mov rdx, qword [rbp + 0x40]
lea rcx, [rbp + 0x50]
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
mov ecx, 0x800
call fcn.1402b4964
mov rbx, rax
mov r8, qword [r14]
mov edx, 0x104
mov rcx, rax
call fcn.1402b96f8
lea rax, [rsp + 0x70]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x60]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], 1
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x14010174e
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov sil, 1
mov rbx, qword [0x14042bb58]
test rbx, rbx
je 0x14010174e
mov rcx, qword [rbx + 0x2f0]
test rcx, rcx
je 0x14010174e
mov qword [rbp + 0x48], r15
mov rax, qword [rcx]
lea rdx, [rbp + 0x48]
call qword [rax + 0xc0]
mov rcx, qword [rbx + 0x2e8]
cmp qword [rcx + 8], 0
je 0x140101747
mov rax, qword [rcx]
call qword [rax]
mov rcx, rax
mov dword [rsp + 0x30], 0x13
mov dword [rsp + 0x28], r15d
mov dword [rsp + 0x20], r15d
xor r9d, r9d
xor r8d, r8d
lea rdx, [r9 - 2]
call qword [sym.imp.USER32.dll_SetWindowPos]
jmp 0x14010174e
mov byte [rcx + 0xaf], 0
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x14010175d
call qword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov rcx, qword [rbp + 0x40]
test rcx, rcx
je 0x14010176d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp dword [rsp + 0x58], 0
jle 0x14010177f
mov rcx, qword [rsp + 0x50]
call fcn.1402b9c20
nop
cmp dword [rsp + 0x68], 0
jle 0x140101790
mov rcx, qword [rsp + 0x60]
call fcn.1402b9c20
movzx eax, sil
mov rbx, qword [rsp + 0x158]
add rsp, 0x110
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret