Function at 0x4238a9
Capabilities:
Create process on windows

Disassembly:
push 0x88
mov eax, 0x5ba144
call fcn.00580e9e
lea esi, [ebp - 0x38]
call fcn.00476200
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 [0x6af38c], esi
jl 0x4238f1
push eax
push str.WD_session:__u
push ebx
push esi
call fcn.00532962
add esp, 0x10
cmp dword [ebp - 0x24], 0xffffffff
je 0x423b63
call fcn.00423740
mov edi, eax
cmp dword [0x6af38c], esi
jl 0x42391a
push edi
push str.WD_TI_pid__u
push ebx
push esi
call fcn.00532962
add esp, 0x10
cmp edi, 0xffffffff
je 0x423b63
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 0x423b32
and dword [ebp - 0x20], 0
mov byte [ebp - 4], 3
lea esi, [ebp - 0x20]
call fcn.00426879
push eax
push 0xf01ff
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x423afd
cmp dword [ebp - 0x20], 0
je 0x423b1d
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.00426879
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 0x423aca
xor edi, edi
cmp dword [ebp - 0x18], edi
je 0x423ae8
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 0x423ab4
mov ecx, dword [ebp - 0x24]
call fcn.00423787
mov dword [ebp - 0x1c], eax
cmp dword [0x6af38c], esi
jl 0x4239f3
xor eax, eax
cmp dword [ebp - 0x1c], edi
setne al
push eax
push str.WD_env__i
push ebx
push esi
call fcn.00532962
add esp, 0x10
mov dword [ebp - 0x2c], 0x30
cmp dword [ebp - 0x1c], edi
je 0x423a06
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.005783f0
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 0x423a88
cmp dword [0x6af38c], 1
jl 0x423a88
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WD_CreateProcessAsUser__i
push ebx
push 1
call fcn.00532962
add esp, 0x10
cmp dword [ebp - 0x44], edi
je 0x423a96
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x48], edi
je 0x423aa4
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1c], edi
je 0x423ae8
push dword [ebp - 0x1c]
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
jmp 0x423ae8
cmp dword [0x6af38c], esi
jl 0x423ae8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WD_SetTokenInformation__i
jmp 0x423ade
cmp dword [0x6af38c], esi
jl 0x423ae8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WD_DuplicateTokenEx__i
push ebx
push esi
call fcn.00532962
add esp, 0x10
mov byte [ebp - 4], 3
cmp dword [ebp - 0x18], 0
je 0x423b1d
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x423b1d
cmp dword [0x6af38c], 1
jl 0x423b1d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WD_OpenProcessToken__i
push ebx
push 1
call fcn.00532962
add esp, 0x10
mov byte [ebp - 4], 2
cmp dword [ebp - 0x20], 0
je 0x423b50
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x423b50
cmp dword [0x6af38c], esi
jl 0x423b50
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WD_OpenProcess__i
push ebx
push esi
call fcn.00532962
add esp, 0x10
mov byte [ebp - 4], 1
cmp dword [ebp - 0x28], 0
je 0x423b63
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.00476240
call fcn.00580f43
ret