Function at 0x1800039d0
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.180002930
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 0x180003de2
cmp qword [rsp + 0x68], 0
je 0x180003de2
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 0x180003ae2
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xb0], rax
jmp 0x180003aef
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 0x180003dc6
cmp qword [rsp + 0x80], 0
je 0x180003b45
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xb8], rax
jmp 0x180003b52
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 0x180003d89
mov dword [rsp + 0x78], 0
mov rdx, qword [rsp + 0x190]
lea rcx, [rsp + 0xa8]
call fcn.1800018f0
nop
lea rdx, [0x180106680]
lea rcx, [rsp + 0x90]
call fcn.180001920
nop
xor r8d, r8d
mov dx, 0x3f
mov rcx, qword [rsp + 0x190]
call fcn.180002a00
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0xffffffff
je 0x180003c48
mov rdx, qword [rsp + 0x190]
lea rcx, [rsp + 0x90]
call fcn.180001ec0
mov r8d, dword [rsp + 0x70]
lea rdx, [rsp + 0xf0]
mov rcx, qword [rsp + 0x190]
call fcn.180003180
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.180001ec0
nop
lea rcx, [rsp + 0xf0]
call fcn.180001cb0
mov r8w, 0x20
mov edx, dword [rsp + 0x70]
lea rcx, [rsp + 0x90]
call fcn.1800037a0
mov dword [rsp + 0x74], 0
jmp 0x180003c5c
mov eax, dword [rsp + 0x74]
inc eax
mov dword [rsp + 0x74], eax
cmp dword [rsp + 0x74], 0xa
jge 0x180003d0e
lea rcx, [rsp + 0x90]
call fcn.180002cb0
mov qword [rsp + 0xf8], rax
lea rcx, [rsp + 0xa8]
call fcn.180003110
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 0x180003d09
jmp 0x180003d0e
jmp 0x180003c52
cmp dword [rsp + 0x78], 0
je 0x180003d1a
mov byte [rsp + 0x60], 1
cmp qword [rsp + 0xc0], 0
je 0x180003d3e
cmp qword [rsp + 0xc0], 0xffffffffffffffff
je 0x180003d3e
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rsp + 0xc8], 0
je 0x180003d62
cmp qword [rsp + 0xc8], 0xffffffffffffffff
je 0x180003d62
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.180001cb0
nop
lea rcx, [rsp + 0xa8]
call fcn.180001cb0
cmp qword [rsp + 0x98], 0
je 0x180003da1
mov rcx, qword [rsp + 0x98]
call sub.USERENV.dll_DestroyEnvironmentBlock
cmp qword [rsp + 0x88], 0
je 0x180003dc6
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x88], 0
cmp qword [rsp + 0x68], 0
je 0x180003de2
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.180001cb0
movzx eax, byte [rsp + 0x61]
add rsp, 0x180
pop rdi
ret