Function at 0x412310
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x580198
mov eax, dword fs:[0]
push eax
sub esp, 0x94
mov eax, dword [0x634f58]
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 - 4], 1
sub esp, 0x18
movups xmm0, xmmword [ebp + 8]
mov eax, esp
push str.UserShellExecuteEx:__s
movups xmmword [eax], xmm0
movq xmm0, qword [ebp + 0x18]
movq qword [eax + 0x10], xmm0
call fcn.004049d0
movups xmm0, xmmword [ebp + 0x20]
add esp, 4
mov eax, esp
push str.UserShellExecuteEx:__s
movups xmmword [eax], xmm0
movq xmm0, qword [ebp + 0x30]
movq qword [eax + 0x10], xmm0
call fcn.004049d0
push str.______________________________________WTSQueryUserToken__________________________________
call fcn.004047e0
add esp, 0x20
mov dword [ebp - 0x40], 0
lea eax, [ebp + 8]
mov dword [ebp - 0x2c], 0
lea ecx, [ebp - 0x28]
push eax
call fcn.00403f20
mov byte [ebp - 4], 2
xor ecx, ecx
mov edi, dword [ebp - 0x18]
mov edx, 2
lea eax, [edi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
mov dword [ebp - 0x30], ecx
call fcn.00413217
mov esi, eax
mov dword [ebp - 0x3c], eax
add esp, 4
test esi, esi
je 0x4123ea
push dword [ebp - 0x30]
push 0
push esi
call fcn.005552b0
add esp, 0xc
jmp 0x4123ef
xor esi, esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x48], esi
lea eax, [edi*2 + 2]
mov byte [ebp - 4], 3
push eax
push 0
push esi
call fcn.005552b0
add esp, 0xc
lea ecx, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
mov edx, esi
cmovae ecx, dword [ebp - 0x28]
sub edx, ecx
nop dword [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x412420
mov eax, dword [ebp + 0x30]
xor ecx, ecx
inc eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
mov dword [ebp - 0x30], ecx
call fcn.00413217
mov edi, eax
mov dword [ebp - 0x44], eax
add esp, 4
test edi, edi
je 0x412469
push dword [ebp - 0x30]
push 0
push edi
call fcn.005552b0
add esp, 0xc
jmp 0x41246e
xor edi, edi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x4c], edi
mov byte [ebp - 4], 4
mov eax, dword [ebp + 0x30]
lea eax, [eax*2 + 2]
push eax
push 0
push edi
call fcn.005552b0
add esp, 0xc
lea ecx, [ebp + 0x20]
cmp dword [ebp + 0x34], 8
mov edx, edi
cmovae ecx, dword [ebp + 0x20]
sub edx, ecx
nop word [eax + eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x4124a0
push str.ShellExecuteManage::UserShellExecute
call fcn.004049d0
push esi
push str.Session0ShellExecute_CreateProcessAsUser_cmd_line:_s
call fcn.00404640
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov esi, eax
push esi
push str.WTSGetActiveConsoleSessionId_:__d
call fcn.004047e0
add esp, 8
lea eax, [ebp - 0x2c]
push eax
push esi
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x412610
call esi
push eax
push str.WTSQueryUserToken_getlasterror_:__d
call fcn.004047e0
add esp, 8
mov dword [ebp - 0x34], 0
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], 0
push eax
lea eax, [ebp - 0x34]
push eax
push 1
push 0
push 0
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateSessionsW]
xor edi, edi
cmp dword [ebp - 0x38], edi
jbe 0x4125ac
xor esi, esi
mov eax, dword [ebp - 0x34]
push dword [esi + eax + 8]
push dword [esi + eax]
push dword [esi + eax + 4]
push str.WTSQueryUserToken_pWinStationName:_s__sessionid:__d__State_:_d
call fcn.004047e0
mov eax, dword [ebp - 0x34]
add esp, 0x10
cmp dword [esi + eax + 8], 0
jne 0x412575
lea ecx, [ebp - 0x2c]
push ecx
push dword [esi + eax]
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x4125d3
push str.WTSQueryUserToken_errror_1
call fcn.004047e0
add esp, 4
mov eax, dword [ebp - 0x34]
cmp dword [esi + eax + 8], 1
jne 0x41259d
lea ecx, [ebp - 0x2c]
push ecx
push dword [esi + eax]
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x4125f0
push str.WTSQueryUserToken_errror_2
call fcn.004047e0
add esp, 4
inc edi
add esi, 0xc
cmp edi, dword [ebp - 0x38]
jb 0x412532
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor edi, edi
push dword [ebp - 0x34]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
test edi, edi
jne 0x41260d
push dword [ebp - 0x38]
push str.WTSQueryUserToken__is_FALSE_dont_popup_windows._Romote_User_count__d
call fcn.004047e0
mov esi, dword [ebp - 0x3c]
add esp, 8
jmp 0x4126c1
mov edi, 1
push str.WTSQueryUserToken_success_1
mov dword [ebp - 0x40], edi
call fcn.004047e0
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 4
jmp 0x4125ae
mov edi, 1
push str.WTSQueryUserToken_success_2
mov dword [ebp - 0x40], edi
call fcn.004047e0
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 4
jmp 0x4125ae
mov edi, dword [ebp - 0x44]
push 0x44
lea eax, [ebp - 0xa0]
push 0
push eax
call fcn.005552b0
add esp, 0xc
mov dword [ebp - 0xa0], 0x44
mov eax, 5
mov dword [ebp - 0x74], 1
mov word [ebp - 0x70], ax
xorps xmm0, xmm0
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push 0
push dword [ebp - 0x2c]
movups xmmword [ebp - 0x5c], xmm0
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
jne 0x412676
call esi
push eax
push str.CreateEnvironmentBlock_Failed__d
call fcn.004047e0
mov esi, dword [ebp - 0x3c]
add esp, 8
mov edi, dword [ebp - 0x40]
jmp 0x4126c1
mov esi, dword [ebp - 0x3c]
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0xa0]
push eax
push 0
push dword [ebp - 0x30]
push 0x430
push 0
push 0
push 0
push edi
push esi
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x4126bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.CreateProcessAsUser_Failed__d
call fcn.004047e0
mov edi, dword [ebp - 0x40]
add esp, 8
jmp 0x4126c1
mov edi, 1
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x4126d4
cmp eax, 0xffffffff
je 0x4126d4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x4126e4
push eax
call fcn.00413212
add esp, 4
test esi, esi
je 0x4126f1
push esi
call fcn.00413212
add esp, 4
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x41272b
mov edx, dword [ebp - 0x28]
lea ecx, [eax*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x412721
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4127ca
push ecx
push edx
call fcn.0054cfd9
add esp, 8
mov edx, dword [ebp + 0x1c]
cmp edx, 8
jb 0x412761
mov ecx, dword [ebp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x412757
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4127cf
push edx
push ecx
call fcn.0054cfd9
add esp, 8
mov edx, dword [ebp + 0x34]
xor eax, eax
mov dword [ebp + 0x18], 0
mov dword [ebp + 0x1c], 7
mov word [ebp + 8], ax
cmp edx, 8
jb 0x4127ab
mov ecx, dword [ebp + 0x20]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4127a1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4127d4
push edx
push ecx
call fcn.0054cfd9
add esp, 8
mov eax, edi
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.0054cfc8
mov esp, ebp
pop ebp
ret 0x30
call fcn.00558f09
call fcn.00558f09
call fcn.00558f09
int3