Function at 0x413880
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x461dc4
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x47c070]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov edi, ecx
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x74], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x90], eax
push 0x40
mov dword [ebp - 4], 0
lea eax, [ebp - 0x50]
push 0
push eax
mov esi, 1
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x60], 0
call fcn.0043b5b0
add esp, 0xc
mov dword [ebp - 0x54], 0x44
xorps xmm0, xmm0
movups xmmword [ebp - 0x70], xmm0
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
lea ecx, [ebp - 0x5c]
push ecx
push eax
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x4139ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, str.WTSQueryUserToken_ERROR
call fcn.00413600
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0xa8]
call fcn.00413140
push eax
mov edx, str.Last_error:
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x8c]
call fcn.00405cc0
add esp, 4
mov byte [ebp - 4], 2
cmp dword [eax + 0x14], 0x10
jb 0x413960
mov eax, dword [eax]
mov ecx, eax
call fcn.00413600
mov eax, dword [ebp - 0x78]
cmp eax, 0x10
jb 0x413982
inc eax
lea ecx, [ebp - 0x8c]
push eax
push dword [ebp - 0x8c]
call fcn.004036e0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x78], 0xf
mov dword [ebp - 0x7c], 0
mov byte [ebp - 0x8c], 0
cmp eax, 0x10
jb 0x4139b9
inc eax
lea ecx, [ebp - 0xa8]
push eax
push dword [ebp - 0xa8]
call fcn.004036e0
lea eax, [ebp - 0x5c]
push eax
push 2
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
test eax, eax
jne 0x4139ee
sub esp, 0x18
xor esi, esi
mov ecx, esp
push str.WTSQueryUserToken_error_
call fcn.004027a0
mov edx, 0xfa6
mov ecx, edi
call fcn.004137f0
add esp, 0x18
jmp 0x413bf4
mov ecx, str.WTSQueryUserToken_SUCCESS
call fcn.00413600
lea eax, [ebp - 0x58]
push eax
push 1
push 1
push 0
push 0x2000000
push dword [ebp - 0x5c]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x413a43
mov ecx, str.DuplicateTokenEx_ERROR
call fcn.00413600
sub esp, 0x18
mov ecx, esp
push str.DuplicateTokenEx_error_
call fcn.004027a0
mov edx, 0xfa7
mov ecx, edi
call fcn.004137f0
add esp, 0x18
xor esi, esi
jmp 0x413bf4
mov ecx, str.DuplicateTokenEx_SUCCESS
call fcn.00413600
push 0
push dword [ebp - 0x58]
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
jne 0x413a8f
mov ecx, str.CreateEnvironmentBlock_ERROR
call fcn.00413600
sub esp, 0x18
mov ecx, esp
push str.CreateEnvironmentBlock_error_
call fcn.004027a0
mov edx, 0xfa8
mov ecx, edi
call fcn.004137f0
add esp, 0x18
xor esi, esi
jmp 0x413bf4
mov ecx, str.CreateEnvironmentBlock_SUCCESS
call fcn.00413600
cmp dword [ebp + 0x1c], 0x10
lea ecx, [ebp + 8]
mov edx, dword [ebp + 0x18]
cmovae ecx, dword [ebp + 8]
push 1
push 0x4725f4
call fcn.004054c0
add esp, 8
test eax, eax
je 0x413b00
cmp dword [ebp + 0x1c], 0x10
lea ecx, [ebp + 8]
push 1
cmovae ecx, dword [ebp + 8]
push 0x4725f8
call fcn.004054c0
add esp, 8
test eax, eax
jne 0x413ae1
mov eax, ebx
mov ebx, 0x4725fc
jmp 0x413b03
mov ecx, dword [ebp - 0x90]
call fcn.00413720
mov ecx, eax
call fcn.00413600
mov eax, dword [ebp - 0x90]
mov ebx, 0x472638
jmp 0x413b03
mov eax, dword [ebp - 0x74]
lea ecx, [ebp - 0x70]
push ecx
lea ecx, [ebp - 0x54]
push ecx
push 0
push dword [ebp - 0x60]
push 0x430
push 0
push 0
push 0
push eax
push ebx
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x413bea
mov ecx, str.CreateProcessAsUser_ERROR
call fcn.00413600
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0xa8]
call fcn.00413140
push eax
mov edx, str.Last_error:
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x8c]
call fcn.00405cc0
add esp, 4
mov byte [ebp - 4], 4
cmp dword [eax + 0x14], 0x10
jb 0x413b6f
mov eax, dword [eax]
mov ecx, eax
call fcn.00413600
mov eax, dword [ebp - 0x78]
cmp eax, 0x10
jb 0x413b91
inc eax
lea ecx, [ebp - 0x8c]
push eax
push dword [ebp - 0x8c]
call fcn.004036e0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x78], 0xf
mov dword [ebp - 0x7c], 0
mov byte [ebp - 0x8c], 0
cmp eax, 0x10
jb 0x413bc8
inc eax
lea ecx, [ebp - 0xa8]
push eax
push dword [ebp - 0xa8]
call fcn.004036e0
sub esp, 0x18
mov ecx, esp
push str.CreateProcessAsUser_error_
call fcn.004027a0
mov edx, 0xfa9
mov ecx, edi
call fcn.004137f0
add esp, 0x18
xor esi, esi
jmp 0x413bf4
mov ecx, str.CreateProcessAsUser_SUCCESS
call fcn.00413600
mov eax, dword [ebp - 0x60]
test eax, eax
je 0x413c02
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
mov eax, dword [ebp - 0x58]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x413c12
push eax
call edi
mov eax, dword [ebp - 0x5c]
test eax, eax
je 0x413c1c
push eax
call edi
mov ecx, dword [ebp + 0x1c]
cmp ecx, 0x10
jb 0x413c31
inc ecx
push ecx
push dword [ebp + 8]
lea ecx, [ebp + 8]
call fcn.004036e0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004381bc
mov esp, ebp
pop ebp
ret