Function at 0x4291e7
Capabilities:
Create process on windows

Disassembly:
push 0x88
mov eax, 0x5c8e2e
call fcn.0058ec5e
lea esi, [ebp - 0x38]
call fcn.0048e9e0
and dword [ebp - 4], 0
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov dword [ebp - 0x24], eax
xor esi, esi
inc esi
mov ebx, str.Helper::runAsTI
cmp dword [0x6c438c], esi
jl 0x42922f
push eax
push str.WD_session:__u
push ebx
push esi
call fcn.00540a02
add esp, 0x10
cmp dword [ebp - 0x24], 0xffffffff
je 0x4294a1
call fcn.0042907e
mov edi, eax
cmp dword [0x6c438c], esi
jl 0x429258
push edi
push str.WD_TI_pid__u
push ebx
push esi
call fcn.00540a02
add esp, 0x10
cmp edi, 0xffffffff
je 0x4294a1
push edi
push esi
mov edi, 0x1f0fff
push edi
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x429470
and dword [ebp - 0x20], 0
mov byte [ebp - 4], 3
lea esi, [ebp - 0x20]
call fcn.0042c0ba
push eax
push 0xf01ff
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x42943b
cmp dword [ebp - 0x20], 0
je 0x42945b
and dword [ebp - 0x18], 0
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
lea esi, [ebp - 0x18]
call fcn.0042c0ba
push eax
xor esi, esi
inc esi
push esi
push esi
push 0
push edi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x429408
xor edi, edi
cmp dword [ebp - 0x18], edi
je 0x429426
push 4
lea eax, [ebp - 0x24]
push eax
push 0xc
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
je 0x4293f2
mov ecx, dword [ebp - 0x24]
call fcn.004290c5
mov dword [ebp - 0x1c], eax
cmp dword [0x6c438c], esi
jl 0x429331
xor eax, eax
cmp dword [ebp - 0x1c], edi
setne al
push eax
push str.WD_env__i
push ebx
push esi
call fcn.00540a02
add esp, 0x10
mov dword [ebp - 0x2c], 0x30
cmp dword [ebp - 0x1c], edi
je 0x429344
mov dword [ebp - 0x2c], 0x430
mov dword [ebp - 0x48], edi
xor eax, eax
lea edi, [ebp - 0x44]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor edi, edi
mov dword [ebp - 0x94], edi
push 0x40
push edi
lea eax, [ebp - 0x90]
push eax
call fcn.00586790
add esp, 0xc
mov dword [ebp - 0x94], 0x44
mov dword [ebp - 0x8c], str.winsta0default
mov eax, dword [ebp + 8]
mov eax, dword [eax]
lea ecx, [ebp - 0x48]
push ecx
lea ecx, [ebp - 0x94]
push ecx
push edi
push dword [ebp - 0x1c]
push dword [ebp - 0x2c]
push edi
push edi
push edi
push eax
push edi
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
cmp eax, edi
jne 0x4293c6
cmp dword [0x6c438c], 1
jl 0x4293c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WD_CreateProcessAsUser__i
push ebx
push 1
call fcn.00540a02
add esp, 0x10
cmp dword [ebp - 0x44], edi
je 0x4293d4
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x48], edi
je 0x4293e2
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1c], edi
je 0x429426
push dword [ebp - 0x1c]
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
jmp 0x429426
cmp dword [0x6c438c], esi
jl 0x429426
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WD_SetTokenInformation__i
jmp 0x42941c
cmp dword [0x6c438c], esi
jl 0x429426
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WD_DuplicateTokenEx__i
push ebx
push esi
call fcn.00540a02
add esp, 0x10
mov byte [ebp - 4], 3
cmp dword [ebp - 0x18], 0
je 0x42945b
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x42945b
cmp dword [0x6c438c], 1
jl 0x42945b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WD_OpenProcessToken__i
push ebx
push 1
call fcn.00540a02
add esp, 0x10
mov byte [ebp - 4], 2
cmp dword [ebp - 0x20], 0
je 0x42948e
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x42948e
cmp dword [0x6c438c], esi
jl 0x42948e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WD_OpenProcess__i
push ebx
push esi
call fcn.00540a02
add esp, 0x10
mov byte [ebp - 4], 1
cmp dword [ebp - 0x28], 0
je 0x4294a1
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [ebp - 4], 0
or dword [ebp - 4], 0xffffffff
lea esi, [ebp - 0x38]
call fcn.0048ea20
call fcn.0058ed03
ret