Function at 0x401700
Capabilities:
Create process on windows
Create process suspended
Query environment variable
Read file on windows
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4ec
mov edi, dword [0x406014]
test edi, edi
je 0x401780
lea esi, [esi]
lea edi, [edi]
mov eax, dword [edi]
test eax, eax
je 0x401780
mov dword [esp], eax
add edi, 4
call sub.cygwin1.dll_strdup
mov ebx, eax
mov eax, 0x3d
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.cygwin1.dll_strchr
test eax, eax
je 0x401774
mov byte [eax], 0
lea esi, [eax + 1]
mov eax, 2
mov dword [esp + 8], eax
lea eax, [ebp - 0x49a]
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.KERNEL32.dll_GetEnvironmentVariableA
sub esp, 0xc
test eax, eax
je 0x4019b5
mov dword [esp], ebx
call sub.cygwin1.dll_free
test edi, edi
jne 0x401720
call fcn.00401050
mov dword [esp + 4], eax
lea edx, [ebp - 0x4a0]
lea ebx, [ebp - 0x68]
mov dword [esp + 0x18], edx
lea edx, [ebp - 0x4a4]
mov dword [esp + 0x14], edx
lea edx, [ebp - 0x4a8]
mov dword [esp + 0x10], edx
lea edx, [ebp - 0x4ac]
mov dword [esp + 0xc], edx
lea edx, [ebp - 0x4b0]
mov dword [esp + 8], edx
mov dword [esp], ebx
call fcn.004011f0
test eax, eax
je 0x401a07
cld
xor eax, eax
lea edi, [ebp - 0x78]
mov ecx, 4
xor edx, edx
rep stosd dword es:[edi], eax
mov dword [esp + 0x20], ebx
lea eax, [ebp - 0x78]
xor ebx, ebx
mov dword [esp + 0x24], eax
mov eax, 1
xor ecx, ecx
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp], 0
mov dword [esp + 4], eax
call sub.KERNEL32.dll_CreateProcessA
mov ebx, eax
mov eax, dword [ebp - 0x4b0]
sub esp, 0x28
test eax, eax
jne 0x4019e0
test ebx, ebx
je 0x401986
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x401930
mov eax, dword [ebp - 0x4b0]
test eax, eax
je 0x401a1f
mov eax, dword [ebp - 0x78]
lea ebx, [ebp - 0x98]
mov edi, 0xffffffff
lea esi, [ebp - 0x4b8]
mov dword [ebp - 0x4b8], eax
mov eax, dword [ebp - 0x4a8]
mov dword [ebp - 0x4b4], eax
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.KERNEL32.dll_GetCommTimeouts
mov dword [ebp - 0x98], edi
sub esp, 8
xor ecx, ecx
mov dword [ebp - 0x94], ecx
xor edx, edx
mov dword [ebp - 0x90], edx
mov dword [esp + 4], ebx
mov eax, dword [ebp - 0x4a8]
mov dword [esp], eax
call sub.KERNEL32.dll_SetCommTimeouts
sub esp, 8
jmp 0x4018ea
xor eax, eax
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x4bc]
mov dword [esp + 0xc], eax
mov eax, 0x400
mov dword [esp + 8], eax
lea eax, [ebp - 0x498]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x4a8]
mov dword [esp], eax
call sub.KERNEL32.dll_ReadFile
sub esp, 0x14
mov dword [esp + 4], esi
mov eax, 0xffffffff
mov dword [esp + 0xc], eax
xor eax, eax
mov dword [esp + 8], eax
mov dword [esp], 2
call sub.KERNEL32.dll_WaitForMultipleObjects
sub esp, 0x10
dec eax
je 0x4018b6
lea eax, [ebp - 0x4c0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x78]
mov dword [esp], eax
call sub.KERNEL32.dll_GetExitCodeProcess
sub esp, 8
mov esi, esi
lea edi, [edi]
mov eax, dword [ebp - 0x74]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x78]
sub esp, 4
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x4b0]
sub esp, 4
test eax, eax
je 0x4019a7
mov eax, dword [ebp - 0x4a8]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x4ac]
sub esp, 4
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
mov eax, dword [ebp - 0x4c0]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [ebp - 0x4b0]
test edi, edi
jne 0x401a53
mov eax, dword [ebp + 8]
mov dword [esp], str.could_not_start__s
mov dword [esp + 4], eax
call fcn.00401580
mov eax, dword [ebp - 0x4c0]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xcb
jne 0x401774
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.KERNEL32.dll_SetEnvironmentVariableA
sub esp, 8
jmp 0x401774
mov eax, dword [ebp - 0x4a0]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x4a4]
sub esp, 4
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x401833
mov eax, dword [ebp + 8]
mov dword [esp], str.could_not_start__s
mov dword [esp + 4], eax
call fcn.00401580
jmp 0x4017ce
mov eax, 0xffffffff
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x78]
mov dword [esp], eax
call sub.KERNEL32.dll_WaitForSingleObject
sub esp, 8
lea eax, [ebp - 0x4c0]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x78]
mov dword [esp], eax
call sub.KERNEL32.dll_GetExitCodeProcess
sub esp, 8
jmp 0x401930
mov eax, dword [ebp - 0x4a8]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x4ac]
sub esp, 4
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
jmp 0x401994