Function at 0x401000
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Read file on windows
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x1080
call fcn.00459460
mov eax, dword [esp + 0x108c]
push ebx
xor ebx, ebx
push ebp
push esi
cmp eax, ebx
push edi
jne 0x401020
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
push str.ExecuteCmd:___s_n
call fcn.00401810
mov al, byte [esp + 0x2b]
add esp, 8
lea ecx, [esp + 0x10]
mov byte [esp + 0x10], al
push ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, 0x46af90
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x14]
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x401087
mov edi, dword [esp + 0x14]
mov ecx, ebp
mov edx, ecx
mov esi, 0x46af90
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
lea eax, [esp + 0x2c]
push ebx
lea ecx, [esp + 0x28]
push eax
lea edx, [esp + 0x30]
push ecx
push edx
mov dword [esp + 0x3c], 0xc
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], 1
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x401113
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x40]
mov dword [esp + 0x3c], 0x44
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x24]
mov word [esp + 0x6c], bx
mov dword [esp + 0x7c], eax
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x109c]
mov dword [esp + 0x68], 0x101
cmp eax, ebx
jne 0x4010f3
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea ecx, [esp + 0x80]
lea edx, [esp + 0x3c]
push ecx
push edx
push ebx
push ebx
push ebx
push 1
push ebx
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x401168
mov esi, dword [esp + 0x1094]
mov al, byte [esp + 0x10]
push ebx
mov ecx, esi
mov byte [esi], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea eax, [esp + 0x10]
mov edx, dword [ecx]
mov ecx, esi
push edx
push ebx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x109c]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1080
ret
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x90]
lea edx, [esp + 0x38]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x28]
push ebx
push edx
lea eax, [esp + 0x98]
push 0xfff
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40121d
lea edi, [esp + 0x90]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
repne scasb al, byte es:[edi]
mov eax, dword [edx]
mov edx, dword [esp + 0x18]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x4011d0
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
cmp esi, ebx
jbe 0x401173
mov ecx, dword [esp + 0x18]
push ebx
lea ebp, [ecx + esi]
lea ecx, [esp + 0x14]
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x401173
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, esi
lea esi, [esp + 0x90]
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x18], ebp
mov byte [eax + ebp], bl
jmp 0x401173
mov esi, dword [esp + 0x1094]
mov cl, byte [esp + 0x10]
mov byte [esi], cl
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea ecx, [esp + 0x10]
mov eax, dword [edx]
push eax
push ebx
push ecx
mov ecx, esi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov ecx, dword [esp + 0x14]
cmp ecx, ebx
je 0x40126e
mov al, byte [ecx - 1]
cmp al, bl
je 0x401264
cmp al, 0xff
je 0x401264
dec al
mov byte [ecx - 1], al
jmp 0x40126e
dec ecx
push ecx
call fcn.00459410
add esp, 4
mov ecx, dword [esp + 0x109c]
mov dword [esp + 0x14], ebx
cmp ecx, ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
je 0x4012ac
mov al, byte [ecx - 1]
cmp al, bl
je 0x4012a2
cmp al, 0xff
je 0x4012a2
dec al
pop edi
mov byte [ecx - 1], al
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x1080
ret
dec ecx
push ecx
call fcn.00459410
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1080
ret