Function at 0x405fa4
Capabilities:
Create a process with modified i/o handles and window
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x260
push ebx
push esi
push edi
push 0x10
pop ecx
xor eax, eax
lea edi, [ebp - 0x54]
mov dword [ebp - 0x58], 0x44
rep stosd dword es:[edi], eax
xor ebx, ebx
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x2c], 0x101
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov word [ebp - 0x28], bx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebp - 4], eax
push 2
push 1
lea eax, [ebp - 0x20]
mov esi, dword [sym.imp.MSVCRT.dll__get_osfhandle]
push ebx
push eax
push dword [ebp - 4]
push dword [ebp + 0x18]
call esi
mov edi, dword [sym.imp.KERNEL32.dll_DuplicateHandle]
pop ecx
push eax
push dword [ebp - 4]
call edi
push 2
push 1
lea eax, [ebp - 0x1c]
push ebx
push eax
push dword [ebp - 4]
push dword [ebp + 0x1c]
call esi
pop ecx
push eax
push dword [ebp - 4]
call edi
mov edi, dword [ebp + 8]
mov esi, 0x104
mov eax, dword [edi + 0x230]
mov eax, dword [eax + 0x14]
cmp eax, ebx
jne 0x406108
push dword [ebp + 0xc]
lea eax, [ebp - 0x260]
mov byte [ebp - 0x15a], bl
push 0x5c
push dword [ebp + 0x20]
push str._s_c_s
push esi
push eax
push edi
call fcn.004031a2
lea eax, [ebp - 0x260]
push 0x41f314
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x24
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x406102
push eax
lea eax, [ebp - 0x15c]
push esi
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
cmp byte [ebp - 0x15c], 0x23
jne 0x4060f2
cmp byte [ebp - 0x15b], 0x21
jne 0x4060f2
lea eax, [ebp - 0x15c]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
lea ecx, [ebp + eax - 0x15d]
lea eax, [ebp - 0x15c]
mov dword [ebp + 8], ecx
cmp ecx, eax
jbe 0x4060f8
mov eax, dword [sym.imp.MSVCRT.dll___mb_cur_max]
cmp dword [eax], 1
jle 0x4060d8
movsx eax, byte [ecx]
push 8
push eax
call dword [sym.imp.MSVCRT.dll__isctype]
pop ecx
pop ecx
mov ecx, dword [ebp + 8]
jmp 0x4060e9
mov edx, dword [sym.imp.MSVCRT.dll__pctype]
movsx eax, byte [ecx]
mov edx, dword [edx]
mov al, byte [edx + eax*2]
and eax, 8
cmp eax, ebx
je 0x4060f8
mov byte [ecx], bl
dec ecx
jmp 0x4060ae
mov byte [ebp - 0x15a], bl
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
lea eax, [ebp - 0x15a]
cmp byte [eax], bl
mov ecx, 0x4220b8
je 0x406116
mov ecx, 0x41f47c
push dword [ebp + 0xc]
push 0x5c
push dword [ebp + 0x20]
push ecx
push eax
push str._s_s_s_c_s
lea eax, [ebp - 0x260]
push esi
push eax
push edi
call fcn.004031a2
add esp, 0x24
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x260]
push dword [ebp + 0x20]
push dword [ebp + 0x10]
push 0x200
push 1
push ebx
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x406186
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x260]
push eax
push str.line_1225
push str._s:_CreateProcess__s_:__d
push edi
call fcn.00401e9c
add esp, 0x14
or dword [ebp - 0x14], 0xffffffff
jmp 0x406198
push dword [ebp + 0x18]
mov esi, dword [sym.imp.MSVCRT.dll__close]
call esi
push dword [ebp + 0x1c]
call esi
pop ecx
pop ecx
push dword [ebp - 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x20]
call esi
push dword [ebp - 0x10]
call esi
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
leave
ret 0x1c