Function at 0x401d80
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x894
mov eax, dword [0x40701c]
xor eax, esp
mov dword [esp + 0x890], eax
mov eax, dword [esp + 0x898]
push ebp
push esi
push edi
mov dword [esp + 0x1c], eax
call fcn.00402db0
cmp eax, 0x80
jl 0x401f35
call fcn.00402eb0
test eax, eax
je 0x401f35
call fcn.00402f50
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x3c], ebp
je 0x401df3
lea ecx, [esp + 0x10]
push ecx
push 0xf01ff
push ebp
mov dword [esp + 0x1c], 0xffffffff
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x401dfa
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4020a8
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x40]
push edx
push 4
lea eax, [esp + 0x20]
push eax
push 0x13
xor edi, edi
push ecx
mov dword [esp + 0x54], edi
mov dword [esp + 0x2c], edi
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov esi, dword [esp + 0x18]
push edi
push esi
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x20], edi
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
jne 0x401e62
cmp esi, 0xffffffff
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x401e44
push esi
call edi
mov eax, dword [esp + 0x10]
cmp eax, 0xffffffff
je 0x401e58
push eax
call edi
mov dword [esp + 0x10], 0xffffffff
push ebp
call edi
xor eax, eax
jmp 0x4020a8
xor eax, eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov eax, 0xc
push 0x40
mov dword [esp + 0x24], eax
mov dword [esp + 0x48], eax
lea eax, [esp + 0x58]
push edi
push eax
mov dword [esp + 0x38], edi
call sub.MSVCR80.dll_memset
mov eax, dword [esp + 0x20]
add esp, 0xc
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x54]
push edx
push edi
push eax
push 0x400
push edi
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x3c]
push edx
push ebx
push edi
push esi
mov dword [esp + 0x7c], 0x44
mov dword [esp + 0x84], str.WinSta0Default
mov dword [esp + 0xa8], 0x41
mov word [esp + 0xac], 5
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov ebp, eax
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.USERENV.dll_DestroyEnvironmentBlock]
cmp esi, 0xffffffff
je 0x401f0f
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
jmp 0x401f15
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
cmp eax, 0xffffffff
je 0x401f29
push eax
call esi
mov dword [esp + 0x10], 0xffffffff
mov ecx, dword [esp + 0x3c]
push ecx
call esi
jmp 0x402031
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], 1
call fcn.00403050
add esp, 4
test eax, eax
je 0x401df3
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
or esi, 0xffffffff
push ecx
mov dword [esp + 0x1c], esi
call sub.WTSAPI32.dll_WTSQueryUserToken
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x10]
push edx
xor eax, eax
push 1
push 2
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
lea eax, [esp + 0x2c]
push eax
push 0x2000000
push ecx
mov dword [esp + 0x28], esi
xor edi, edi
mov dword [esp + 0x38], 0xc
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
je 0x401df3
push 0x40
xor eax, eax
lea edx, [esp + 0x58]
push edi
push edx
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
call sub.MSVCR80.dll_memset
mov edx, dword [esp + 0x1c]
add esp, 0xc
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x54]
push ecx
push edi
push edi
push edi
push edi
push edi
push edi
push ebx
push edi
push edx
mov dword [esp + 0x7c], 0x44
mov dword [esp + 0x84], str.WinSta0Default
mov dword [esp + 0xa8], 0x41
mov word [esp + 0xac], 5
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov ebp, eax
mov eax, dword [esp + 0x10]
cmp eax, esi
je 0x402022
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x10], esi
mov eax, dword [esp + 0x14]
cmp eax, esi
je 0x402031
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x7fe
lea eax, [esp + 0x9e]
push edi
push eax
mov word [esp + 0xa4], di
call sub.MSVCR80.dll_memset
add esp, 0xc
cmp ebp, edi
push ebx
jne 0x40207d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0xa0]
push str.Create_Process_Failed_error_d._r_nCommond_line:__s
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 4
lea edx, [esp + 0x9c]
push edx
jmp 0x40209d
lea eax, [esp + 0x9c]
push str.Create_Process_Successful._r_nCommond_line:__s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 4
lea ecx, [esp + 0x9c]
push ecx
mov edi, dword [esp + 0x24]
call fcn.00403800
mov eax, ebp
mov ecx, dword [esp + 0x89c]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.00403cf4
add esp, 0x894
ret 4