Function at 0x180003780
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.1800027b0
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 0x180003b92
cmp qword [rsp + 0x68], 0
je 0x180003b92
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 0x180003892
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xb0], rax
jmp 0x18000389f
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 0x180003b76
cmp qword [rsp + 0x80], 0
je 0x1800038f5
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xb8], rax
jmp 0x180003902
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 0x180003b39
mov dword [rsp + 0x78], 0
mov rdx, qword [rsp + 0x190]
lea rcx, [rsp + 0xa8]
call fcn.1800017b0
nop
lea rdx, [0x18010a700]
lea rcx, [rsp + 0x90]
call fcn.1800017e0
nop
xor r8d, r8d
mov dx, 0x3f
mov rcx, qword [rsp + 0x190]
call fcn.180002880
mov dword [rsp + 0x70], eax
cmp dword [rsp + 0x70], 0xffffffff
je 0x1800039f8
mov rdx, qword [rsp + 0x190]
lea rcx, [rsp + 0x90]
call fcn.180001d90
mov r8d, dword [rsp + 0x70]
lea rdx, [rsp + 0xf0]
mov rcx, qword [rsp + 0x190]
call fcn.180002f30
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.180001d90
nop
lea rcx, [rsp + 0xf0]
call fcn.180001b80
mov r8w, 0x20
mov edx, dword [rsp + 0x70]
lea rcx, [rsp + 0x90]
call fcn.180003550
mov dword [rsp + 0x74], 0
jmp 0x180003a0c
mov eax, dword [rsp + 0x74]
inc eax
mov dword [rsp + 0x74], eax
cmp dword [rsp + 0x74], 0xa
jge 0x180003abe
lea rcx, [rsp + 0x90]
call fcn.180002b30
mov qword [rsp + 0xf8], rax
lea rcx, [rsp + 0xa8]
call fcn.180008190
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 0x180003ab9
jmp 0x180003abe
jmp 0x180003a02
cmp dword [rsp + 0x78], 0
je 0x180003aca
mov byte [rsp + 0x60], 1
cmp qword [rsp + 0xc0], 0
je 0x180003aee
cmp qword [rsp + 0xc0], 0xffffffffffffffff
je 0x180003aee
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [rsp + 0xc8], 0
je 0x180003b12
cmp qword [rsp + 0xc8], 0xffffffffffffffff
je 0x180003b12
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.180001b80
nop
lea rcx, [rsp + 0xa8]
call fcn.180001b80
cmp qword [rsp + 0x98], 0
je 0x180003b51
mov rcx, qword [rsp + 0x98]
call sub.USERENV.dll_DestroyEnvironmentBlock
cmp qword [rsp + 0x88], 0
je 0x180003b76
mov rcx, qword [rsp + 0x88]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x88], 0
cmp qword [rsp + 0x68], 0
je 0x180003b92
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.180001b80
movzx eax, byte [rsp + 0x61]
add rsp, 0x180
pop rdi
ret