Function at 0x401170
Capabilities:
Accept command line arguments
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Create thread
Get common file path
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x478
mov dword [esp + 0x18], 1
push ebx
push esi
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x40412c], 0
test eax, 0x80000000
jne 0x4011df
mov ecx, dword [str.cmd__c]
mov eax, str.cmd__c
lea edx, [esp + 0x88]
mov ebx, dword [esp + 0x48c]
mov eax, dword [eax + 4]
cmp ebx, 4
mov dword [edx], ecx
mov dword [edx + 4], eax
jge 0x4011cc
push str.Wrong_Parameters___NT
call fcn.00401710
add esp, 4
mov eax, 1
mov dword [esp + 0x40], eax
mov dword [0x40412c], eax
jmp 0x40127a
cmp al, 4
jae 0x401211
mov esi, str.uespawn.exe_command__c__e:2048
lea edi, [esp + 0x88]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
mov ebx, dword [esp + 0x48c]
cmp ebx, 3
jge 0x40127a
push str.Wrong_Parameters___Win32s
call fcn.00401710
add esp, 4
jmp 0x40127a
lea eax, [esp + 0x88]
push 0x400
push eax
mov edi, str.command.com__E:2048__c
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x88]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebx, dword [esp + 0x48c]
cmp ebx, 4
jge 0x401272
push str.Wrong_Parameters___Windows_95
call fcn.00401710
add esp, 4
mov dword [esp + 0x40], 1
cmp ebx, 4
jl 0x4013ae
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov ebp, dword [esp + 0x490]
mov ecx, dword [ebp + 4]
mov eax, dword [ebp + 8]
mov dword [esp + 0x30], eax
mov al, byte [ecx]
cmp al, 0x46
je 0x4012a4
cmp al, 0x66
jne 0x4012ac
mov dword [esp + 0x28], 0
cmp ebx, 3
jle 0x4013ae
add ebp, 0xc
sub ebx, 3
push 0x20
mov eax, dword [ebp]
push eax
call fcn.00401730
add esp, 8
test eax, eax
je 0x40133c
mov edi, 0x4070ac
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x88]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x88]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4070ac
jmp 0x40133f
mov edi, dword [ebp]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x88]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4070a8
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x88]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
add ebp, 4
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
dec ebx
jne 0x4012bb
mov edi, str.null
mov ecx, 5
mov esi, dword [esp + 0x30]
repe cmpsb byte [esi], byte es:[edi]
je 0x4013f0
mov eax, dword [esp + 0x30]
push 0
push 0
push 4
push 0
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push 2
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
mov dword [0x404104], eax
push 0
push eax
call ebp
jmp 0x4013fa
mov dword [0x404104], 0
push 0xfffffffffffffff5
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esp + 0x3c], 0xc
mov dword [esp + 0x40], 0
call esi
push 0xfffffffffffffff6
mov dword [0x404124], eax
call esi
lea ecx, [esp + 0x18]
push 0
mov edi, dword [sym.imp.KERNEL32.dll_CreatePipe]
mov dword [0x404120], eax
lea eax, [esp + 0x3c]
push eax
push 0x40410c
push ecx
call edi
test eax, eax
jne 0x40144c
push str.Error_Creating_Pipe_In
call fcn.00401710
add esp, 4
lea eax, [esp + 0x38]
push 0
lea ecx, [esp + 0x24]
push eax
lea edx, [esp + 0x34]
push ecx
push edx
call edi
test eax, eax
jne 0x401470
push str.Error_Creating_Pipe_Out
call fcn.00401710
add esp, 4
lea eax, [esp + 0x14]
push 2
push 0
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 0
push eax
call ebx
mov ecx, dword [esp + 0x3c]
push eax
push ecx
call ebx
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_DuplicateHandle]
call ebp
test eax, eax
jne 0x4014a5
push str.DuplicateHandle_failed
call fcn.00401710
add esp, 4
mov eax, dword [esp + 0x2c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
push 2
push 0
push 0
push 0x404108
call ebx
push eax
mov ecx, dword [0x40410c]
push ecx
call ebx
push eax
call ebp
test eax, eax
jne 0x4014dd
push str.DuplicateHandle_failed
call fcn.00401710
add esp, 4
mov eax, dword [0x40410c]
push eax
call esi
lea eax, [esp + 0x38]
push 0
lea ecx, [esp + 0x20]
push eax
lea edx, [esp + 0x18]
push ecx
push edx
call edi
test eax, eax
jne 0x401509
push str.Error_Creating_Pipe_Err
call fcn.00401710
add esp, 4
mov dword [esp + 0x44], 0x44
mov dword [esp + 0x50], str.UltraEdit_DOS_Command_Window
xor ecx, ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], ecx
mov eax, dword [esp + 0x18]
mov dword [esp + 0x5c], ecx
mov edx, dword [esp + 0x20]
mov dword [esp + 0x60], ecx
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x58], ecx
mov word [esp + 0x74], cx
mov dword [esp + 0x54], ecx
mov word [esp + 0x76], cx
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], edx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x78], ecx
cmp dword [0x40412c], ecx
je 0x401571
mov dword [esp + 0x70], 0x100
jmp 0x40157e
mov dword [esp + 0x70], 0x101
mov ecx, 0x10
cmp dword [esp + 0x28], 0
je 0x40158a
or dword [esp + 0x70], 1
lea eax, [esp + 0x44]
push 0x404110
push eax
push 0
lea edx, [esp + 0x94]
push 0
push ecx
push 1
lea ecx, [esp + 0x50]
push 0
push ecx
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x4015bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [0x404110]
lea ecx, [esp + 0x24]
mov edx, dword [esp + 0x10]
push ecx
push 0
mov ebx, dword [sym.imp.KERNEL32.dll_CreateThread]
push edx
mov dword [0x404128], eax
push section..text
push 0
push 0
call ebx
mov edi, eax
test edi, edi
jne 0x4015f6
push str.Error_Creating_Thread_1
call fcn.00401710
add esp, 4
push 2
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetThreadPriority]
call edi
lea eax, [esp + 0x24]
mov ecx, dword [esp + 0x14]
push eax
push 0
push ecx
push section..text
push 0
push 0
call ebx
mov ebp, eax
test ebp, ebp
jne 0x40162b
push str.Error_Creating_Thread_1
call fcn.00401710
add esp, 4
push 2
push ebp
call edi
lea eax, [esp + 0x24]
mov ecx, dword [0x404108]
push eax
push 0
push ecx
push 0x4010d0
push 0
push 0
call ebx
mov ebx, eax
test ebx, ebx
jne 0x40165c
push str.Error_Creating_Thread_1
call fcn.00401710
add esp, 4
push 2
push ebx
call edi
mov eax, dword [0x404114]
push eax
call esi
push 0xffffffffffffffff
mov eax, dword [0x404128]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
je 0x40168e
lea eax, [esp + 0x34]
mov ecx, dword [0x404128]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [esp + 0x20]
xor edi, edi
push eax
xor ebx, ebx
call esi
mov eax, dword [esp + 0x1c]
push eax
call esi
mov dword [0x407004], 1
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [section..data], edi
jne 0x4016ca
inc ebx
push 0x64
call ebp
cmp dword [0x40412c], edi
jne 0x4016b0
cmp ebx, 4
jne 0x4016b0
cmp dword [0x404104], 0
je 0x4016db
mov eax, dword [0x404104]
push eax
call esi
mov eax, dword [esp + 0x18]
push eax
call esi
mov eax, dword [esp + 0x14]
push eax
call esi
mov eax, dword [0x404108]
push eax
call esi
mov eax, dword [esp + 0x10]
push eax
call esi
mov eax, dword [0x404128]
push eax
call esi
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x478
ret