Function at 0x1401003d0
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.1402bfa30
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.1401002b0
nop
lea rcx, [0x140346ce0]
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x58], r15
or rdi, 0xffffffffffffffff
mov r8, qword [rsp + 0x60]
test r8, r8
je 0x1401004c1
mov rax, rdi
inc rax
cmp word [r8 + rax*2], 0
jne 0x140100450
test rax, rax
je 0x1401004c1
lea rdx, str.WinSta0_s
lea rcx, [rbp - 0x78]
call fcn.1401fcfe0
mov rbx, rax
mov edx, dword [rax + 0xc]
lea rcx, [rsp + 0x50]
call fcn.1401fcb40
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.1402ba94c
mov edx, dword [rbx + 0xc]
lea rcx, [rsp + 0x50]
call fcn.1401fde50
nop
cmp dword [rbp - 0x70], 0
jle 0x1401004b7
mov rcx, qword [rbp - 0x78]
call fcn.1402b7350
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x1401004da
inc rdi
cmp word [rcx + rdi*2], 0
jne 0x1401004c1
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 0x14010050a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rbp + 0x40], r15
jmp 0x14010051b
xor r8d, r8d
mov rdx, qword [rbp + 0x40]
lea rcx, [rbp + 0x50]
call qword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
mov ecx, 0x800
call fcn.1402b2274
mov rbx, rax
mov r8, qword [r14]
mov edx, 0x104
mov rcx, rax
call fcn.1402b6e28
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 0x1401005fe
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 [0x140428b78]
test rbx, rbx
je 0x1401005fe
mov rcx, qword [rbx + 0x2f0]
test rcx, rcx
je 0x1401005fe
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 0x1401005f7
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 0x1401005fe
mov byte [rcx + 0xaf], 0
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x14010060d
call qword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov rcx, qword [rbp + 0x40]
test rcx, rcx
je 0x14010061d
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp dword [rsp + 0x58], 0
jle 0x14010062f
mov rcx, qword [rsp + 0x50]
call fcn.1402b7350
nop
cmp dword [rsp + 0x68], 0
jle 0x140100640
mov rcx, qword [rsp + 0x60]
call fcn.1402b7350
movzx eax, sil
mov rbx, qword [rsp + 0x158]
add rsp, 0x110
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret