Function at 0x422120
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x534098
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x58dd4c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x88], edx
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
push esi
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x14], 0
call fcn.00424890
mov dword [ebp - 4], 0
or edi, 0xffffffff
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], 0
jl 0x422277
push 0x583d84
push eax
call fcn.00510bf4
add esp, 8
test eax, eax
je 0x422277
sub eax, dword [ebp - 0x14]
sar eax, 1
cmp eax, edi
je 0x422277
call fcn.00424370
mov ecx, eax
test ecx, ecx
jne 0x4221d5
push 0x80004005
call fcn.00425150
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 1
lea eax, [ebp - 0x18]
push dword [ebp - 0x14]
push 0x583d88
push eax
call fcn.00423bb0
mov eax, dword [ebp - 0x18]
add esp, 0xc
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
mov dword [ebp - 0x80], edx
lea esi, [eax - 0x10]
cmp esi, edx
je 0x42225f
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
mov dword [ebp - 0x7c], ecx
jl 0x422253
mov ecx, dword [esi]
cmp ecx, dword [edx]
jne 0x422253
mov ecx, esi
call fcn.00423f40
mov edx, dword [ebp - 0x7c]
mov ecx, edi
mov dword [ebp - 0x84], eax
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x42224b
mov eax, dword [ebp - 0x80]
push eax
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x84]
add eax, 0x10
mov dword [ebp - 0x14], eax
jmp 0x42225f
push dword [eax - 0xc]
lea ecx, [ebp - 0x14]
push eax
call fcn.00424790
mov byte [ebp - 4], 0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x422277
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.00424370
mov ecx, eax
test ecx, ecx
jne 0x42228c
push 0x80004005
call fcn.00425150
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
push dword [ebp - 0x88]
mov byte [ebp - 4], 2
lea eax, [ebp - 0x18]
push dword [ebp - 0x14]
push str._s__s
push eax
call fcn.00423bb0
mov esi, dword [ebp - 0x18]
mov ecx, 1
add esp, 0x10
sub ecx, dword [esi - 4]
mov eax, dword [esi - 8]
or eax, ecx
jge 0x4222d6
push 0
lea ecx, [ebp - 0x18]
call fcn.004251b0
mov esi, dword [ebp - 0x18]
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x8c]
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x4222f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WTSQueryUserToken_error:_errorcode___d
jmp 0x422320
lea eax, [ebp - 0x30]
push eax
push 1
push 1
push 0
push 0x2000000
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x422336
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.DuplicateTokenEx_error:_errorcode___d
call fcn.00426e00
add esp, 8
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4223dc
push 0
push dword [ebp - 0x30]
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
jne 0x42235f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateEnvironmentBlock_error:_errorcode___d
call fcn.00426e00
add esp, 8
jmp 0x4223c9
push 0x44
lea eax, [ebp - 0x78]
push 0
push eax
call fcn.00510f30
add esp, 0xc
mov dword [ebp - 0x78], 0x44
lea eax, [ebp - 0x28]
mov dword [ebp - 0x70], str.winsta0default
xorps xmm0, xmm0
movups xmmword [ebp - 0x28], xmm0
push eax
lea eax, [ebp - 0x78]
push eax
push 0
push dword [ebp - 0x34]
push 0x430
push 0
push 0
push 0
push esi
push 0
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x42241a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateProcessAsUser_error:_errorcode___d
call fcn.00426e00
add esp, 8
push dword [ebp - 0x34]
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
push dword [ebp - 0x30]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x2c]
call edi
or edi, 0xffffffff
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4223f7
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
lea edx, [eax - 0x10]
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x422416
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor al, al
jmp 0x42247f
push dword [ebp - 0x34]
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
push dword [ebp - 0x30]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp - 0x2c]
call edi
lea edx, [esi - 0x10]
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x422451
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x422470
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push str.CreateProcessAsUser_is_ok
call fcn.00426e00
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050e1f3
mov esp, ebp
pop ebp
ret