Function at 0x1800038e0
Capabilities:
Create process on windows

Disassembly:
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x180
mov qword [rsp + 0x100], 0xfffffffffffffffe
mov byte [rsp + 0x60], 0
call fcn.180002850
mov dword [rsp + 0x110], 0
lea rax, [rsp + 0x118]
mov rdi, rax
xor eax, eax
mov ecx, 0x60
rep stosb byte [rdi], al
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x80], 0
mov dword [rsp + 0xa0], 0
mov qword [rsp + 0x98], 0
mov qword [rsp + 0xc0], 0
lea rax, [rsp + 0xc8]
mov rdi, rax
xor eax, eax
mov ecx, 0x10
rep stosb byte [rdi], al
lea rdx, [rsp + 0x68]
mov ecx, dword [rsp + 0x198]
call sub.WTSAPI32.dll_WTSQueryUserToken
test eax, eax
je 0x180003cf2
cmp qword [rsp + 0x68], 0
je 0x180003cf2
mov qword [rsp + 0x88], 0
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x20], rax
mov r9d, 8
lea r8, [rsp + 0x80]
mov edx, 0x13
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov dword [rsp + 0xd8], eax
cmp qword [rsp + 0x80], 0
je 0x1800039f2
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xb0], rax
jmp 0x1800039ff
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0xb0], rax
lea rax, [rsp + 0x88]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 1
mov r9d, 2
xor r8d, r8d
mov edx, 0x2000000
mov rcx, qword [rsp + 0xb0]
call qword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x180003cd6
cmp qword [rsp + 0x80], 0
je 0x180003a55
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xb8], rax
jmp 0x180003a62
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0xb8], rax
xor r8d, r8d
mov rdx, qword [rsp + 0xb8]
lea rcx, [rsp + 0x98]
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
je 0x180003c99
mov dword [rsp + 0x78], 0
mov rdx, qword [rsp + 0x190]
lea rcx, [rsp + 0xa8]
call fcn.180001830
nop
lea rdx, [0x180106680]
lea rcx, [rsp + 0x90]
call fcn.180001860
nop
xor r8d, r8d
mov dx, 0x3f
mov rcx, qword [rsp + 0x190]
call fcn.180002920
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0xffffffff
je 0x180003b58
mov rdx, qword [rsp + 0x190]
lea rcx, [rsp + 0x90]
call fcn.180001de0
mov r8d, dword [rsp + 0x70]
lea rdx, [rsp + 0xf0]
mov rcx, qword [rsp + 0x190]
call fcn.180003090
mov qword [rsp + 0xe0], rax
mov rax, qword [rsp + 0xe0]
mov qword [rsp + 0xe8], rax
mov rdx, qword [rsp + 0xe8]
lea rcx, [rsp + 0xa8]
call fcn.180001de0
nop
lea rcx, [rsp + 0xf0]
call fcn.180001bd0
mov r8w, 0x20
mov edx, dword [rsp + 0x70]
lea rcx, [rsp + 0x90]
call fcn.1800036b0
mov dword [rsp + 0x74], 0
jmp 0x180003b6c
mov eax, dword [rsp + 0x74]
inc eax
mov dword [rsp + 0x74], eax
cmp dword [rsp + 0x74], 0xa
jge 0x180003c1e
lea rcx, [rsp + 0x90]
call fcn.180002bd0
mov qword [rsp + 0xf8], rax
lea rcx, [rsp + 0xa8]
call fcn.1800044a0
lea rcx, [rsp + 0xc0]
mov qword [rsp + 0x50], rcx
lea rcx, [rsp + 0x110]
mov qword [rsp + 0x48], rcx
mov qword [rsp + 0x40], 0
mov rcx, qword [rsp + 0x98]
mov qword [rsp + 0x38], rcx
mov dword [rsp + 0x30], 0x400
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
xor r9d, r9d
mov rcx, qword [rsp + 0xf8]
mov r8, rcx
mov rdx, rax
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov dword [rsp + 0x78], eax
mov ecx, 0xc8
call qword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [rsp + 0x78], 0
je 0x180003c19
jmp 0x180003c1e
jmp 0x180003b62
cmp dword [rsp + 0x78], 0
je 0x180003c2a
mov byte [rsp + 0x60], 1
cmp qword [rsp + 0xc0], 0
je 0x180003c4e
cmp qword [rsp + 0xc0], 0xffffffffffffffff
je 0x180003c4e
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rsp + 0xc8], 0
je 0x180003c72
cmp qword [rsp + 0xc8], 0xffffffffffffffff
je 0x180003c72
mov rcx, qword [rsp + 0xc8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
nop
lea rcx, [rsp + 0x90]
call fcn.180001bd0
nop
lea rcx, [rsp + 0xa8]
call fcn.180001bd0
cmp qword [rsp + 0x98], 0
je 0x180003cb1
mov rcx, qword [rsp + 0x98]
call sub.USERENV.dll_DestroyEnvironmentBlock
cmp qword [rsp + 0x88], 0
je 0x180003cd6
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x88], 0
cmp qword [rsp + 0x68], 0
je 0x180003cf2
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x68], 0
movzx eax, byte [rsp + 0x60]
mov byte [rsp + 0x61], al
mov rcx, qword [rsp + 0x190]
call fcn.180001bd0
movzx eax, byte [rsp + 0x61]
add rsp, 0x180
pop rdi
ret