Function at 0x47f211
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x40]
and eax, 1
test al, al
jne 0x47f236
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x30]
test eax, eax
jns 0x47f236
mov eax, 1
jmp 0x47f23b
mov eax, 0
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x47f28a
lea eax, [ebp - 0x30]
mov dword [esp], eax
call sub.cygwin1.dll_pipe
test eax, eax
jns 0x47f281
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
test eax, eax
jle 0x47f275
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov dword [ebp - 0x10], str.standard_input
jmp 0x47f3c9
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp + 8]
mov dword [eax + 0x30], edx
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x40]
and eax, 2
test al, al
jne 0x47f2b7
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x40]
and eax, 0xffffff80
test al, al
jne 0x47f2b7
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
test eax, eax
jns 0x47f2b7
mov eax, 1
jmp 0x47f2bc
mov eax, 0
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x47f31e
lea eax, [ebp - 0x38]
mov dword [esp], eax
call sub.cygwin1.dll_pipe
test eax, eax
jns 0x47f315
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x1c], 0
je 0x47f2f1
lea eax, [ebp - 0x30]
mov dword [esp], eax
call fcn.0047e1b9
jmp 0x47f309
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x30]
test eax, eax
je 0x47f309
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x30]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov dword [ebp - 0x10], str.standard_output
jmp 0x47f3c9
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp + 8]
mov dword [eax + 0x34], edx
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x40]
and eax, 4
test al, al
jne 0x47f33d
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x38]
test eax, eax
jns 0x47f33d
mov eax, 1
jmp 0x47f342
mov eax, 0
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x47f423
lea eax, [ebp - 0x40]
mov dword [esp], eax
call sub.cygwin1.dll_pipe
test eax, eax
jns 0x47f41a
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x1c], 0
je 0x47f37f
lea eax, [ebp - 0x30]
mov dword [esp], eax
call fcn.0047e1b9
jmp 0x47f397
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x30]
test eax, eax
je 0x47f397
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x30]
mov dword [esp], eax
call sub.cygwin1.dll_close
cmp dword [ebp - 0x20], 0
je 0x47f3aa
lea eax, [ebp - 0x38]
mov dword [esp], eax
call fcn.0047e1b9
jmp 0x47f3c2
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
test eax, eax
je 0x47f3c2
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov dword [ebp - 0x10], str.standard_error
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sub.cygwin1.dll_strerror
mov edx, dword [ebp + 8]
mov edx, dword [edx]
mov edx, dword [edx]
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov eax, dword [ebp - 0x10]
mov dword [esp + 4], eax
mov dword [esp], str.cannot_create__s_pipe_for__s:__s
call fcn.004ae2ca
call fcn.0047dcdd
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0047df41
call sub.cygwin1.dll___errno
mov edx, dword [ebp - 0xc]
mov dword [eax], edx
mov eax, 0xffffffff
jmp 0x47fad8
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp + 8]
mov dword [eax + 0x38], edx
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x2d1
mov dword [esp], str.run_command.c
call fcn.0049a1e8
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0047f0ee
mov dword [esp], 0
call sub.cygwin1.dll_fflush
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x40]
and eax, 0x40
test al, al
je 0x47f473
mov eax, dword [0x62f280]
mov eax, dword [eax + 8]
mov dword [esp], eax
call fcn.0043e156
mov dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x54], 0x62f62c
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
lea eax, [ebp - 0x54]
mov dword [esp], eax
call fcn.0047e819
test eax, eax
jns 0x47f4f3
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x18], 0xffffffff
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x40]
and eax, 0x10
test al, al
jne 0x47f980
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.cannot_run__s
call fcn.004ae275
call fcn.0047dcdd
jmp 0x47f981
lea eax, [ebp - 0x48]
mov dword [esp], eax
call sub.cygwin1.dll_pipe
test eax, eax
je 0x47f50f
mov dword [ebp - 0x44], 0xffffffff
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x40]
and eax, 1
test al, al
jne 0x47f539
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x40]
and eax, 2
test al, al
jne 0x47f539
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x40]
and eax, 4
test al, al
je 0x47f55b
mov dword [esp + 4], 0x40002
mov dword [esp], 0x5b0625
call fcn.004b4572
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.0047ecf4
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call fcn.0047e92b
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x64]
mov dword [esp], eax
call fcn.0047eb74
call sub.cygwin1.dll_fork
mov edx, eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x18], edx
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
test eax, eax
jne 0x47f885
mov dword [esp], 0x47e6b4
call fcn.004adf80
mov dword [esp], 0x47e5de
call fcn.004adf98
mov dword [esp], 0x47e64b
call fcn.004adfb0
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call fcn.0047ecf4
mov eax, dword [ebp - 0x44]
mov dword [0x59bb8c], eax
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x40]
and eax, 1
test al, al
je 0x47f601
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.0047e569
jmp 0x47f655
cmp dword [ebp - 0x1c], 0
je 0x47f627
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0047e569
lea eax, [ebp - 0x30]
mov dword [esp], eax
call fcn.0047e5b8
jmp 0x47f655
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x30]
test eax, eax
je 0x47f655
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x30]
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.0047e569
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x30]
mov dword [esp], eax
call fcn.0047e594
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x40]
and eax, 4
test al, al
je 0x47f678
mov dword [esp + 4], 2
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.0047e569
jmp 0x47f6cd
cmp dword [ebp - 0x24], 0
je 0x47f69e
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], 2
mov dword [esp], eax
call fcn.0047e569
lea eax, [ebp - 0x40]
mov dword [esp], eax
call fcn.0047e5b8
jmp 0x47f6cd
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x38]
cmp eax, 1
jle 0x47f6cd
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x38]
mov dword [esp + 4], 2
mov dword [esp], eax
call fcn.0047e569
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call fcn.0047e594
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x40]
and eax, 2
test al, al
je 0x47f6f0
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call fcn.0047e569
jmp 0x47f769
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x40]
and eax, 0xffffff80
test al, al
je 0x47f714
mov dword [esp + 4], 1
mov dword [esp], 2
call fcn.0047e569
jmp 0x47f769
cmp dword [ebp - 0x20], 0
je 0x47f73a
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], 1
mov dword [esp], eax
call fcn.0047e569
lea eax, [ebp - 0x38]
mov dword [esp], eax
call fcn.0047e5b8
jmp 0x47f769
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
cmp eax, 1
jle 0x47f769
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], 1
mov dword [esp], eax
call fcn.0047e569
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
mov dword [esp], eax
call fcn.0047e594
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x3c]
test eax, eax
je 0x47f791
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x3c]
mov dword [esp], eax
call sub.cygwin1.dll_chdir
test eax, eax
je 0x47f791
mov dword [esp], 0
call fcn.0047e52b
mov dword [ebp - 0x18], 1
jmp 0x47f7c9
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.cygwin1.dll_signal
cmp eax, 1
jne 0x47f7c5
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.cygwin1.dll_signal
add dword [ebp - 0x18], 1
cmp dword [ebp - 0x18], 0x20
jle 0x47f79a
mov dword [esp + 8], 0
lea eax, [ebp - 0x64]
add eax, 4
mov dword [esp + 4], eax
mov dword [esp], 0
call sub.cygwin1.dll_sigprocmask
test eax, eax
je 0x47f7fd
mov dword [esp], 3
call fcn.0047e52b
mov eax, dword [ebp - 0x54]
lea ecx, [eax + 4]
mov eax, dword [ebp - 0x54]
add eax, 4
mov eax, dword [eax]
mov edx, dword [ebp - 0x28]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.cygwin1.dll_execve
call sub.cygwin1.dll___errno
mov eax, dword [eax]
cmp eax, 8
jne 0x47f845
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x54]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x28]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.cygwin1.dll_execve
call sub.cygwin1.dll___errno
mov eax, dword [eax]
cmp eax, 2
jne 0x47f879
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x40]
and eax, 0x10
test al, al
je 0x47f86b
mov dword [esp], 5
call fcn.0047e52b
mov dword [esp], 4
call fcn.0047e52b
jmp 0x47f885
mov dword [esp], 6
call fcn.0047e52b
lea eax, [ebp - 0x64]
mov dword [esp], eax
call fcn.0047ec40
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
test eax, eax
jns 0x47f8b8
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str.cannot_fork___for__s
call fcn.004ae275
call fcn.0047dcdd
jmp 0x47f8db
mov eax, dword [ebp + 8]
movzx eax, byte [eax + 0x41]
and eax, 1
test al, al
je 0x47f8db
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov edx, dword [ebp + 8]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0047e102
mov eax, dword [ebp - 0x44]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov eax, dword [ebp - 0x48]
mov dword [esp + 8], 8
lea edx, [ebp - 0x5c]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.004b46c0
cmp eax, 8
jne 0x47f94c
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov edx, dword [eax]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.0047ed36
lea eax, [ebp - 0x5c]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0047e724
call sub.cygwin1.dll___errno
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
mov dword [eax + 0x18], 0xffffffff
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call sub.cygwin1.dll_close
cmp dword [ebp - 0x14], 0
js 0x47f968
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.cygwin1.dll_close
lea eax, [ebp - 0x54]
mov dword [esp], eax
call fcn.0048f067
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.cygwin1.dll_free
jmp 0x47f981
nop
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x18]
test eax, eax
jns 0x47fa52
mov dword [esp + 0xc], 0xffffffff
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x3a9
mov dword [esp], str.run_command.c
call fcn.0049a2d2
cmp dword [ebp - 0x1c], 0
je 0x47f9c5
lea eax, [ebp - 0x30]
mov dword [esp], eax
call fcn.0047e1b9
jmp 0x47f9dd
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x30]
test eax, eax
je 0x47f9dd
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x30]
mov dword [esp], eax
call sub.cygwin1.dll_close
cmp dword [ebp - 0x20], 0
je 0x47f9f0
lea eax, [ebp - 0x38]
mov dword [esp], eax
call fcn.0047e1b9
jmp 0x47fa08
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
test eax, eax
je 0x47fa08
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
mov dword [esp], eax
call sub.cygwin1.dll_close
cmp dword [ebp - 0x24], 0
je 0x47fa1b
lea eax, [ebp - 0x40]
mov dword [esp], eax
call fcn.0047e1b9
jmp 0x47fa33
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x38]
test eax, eax
je 0x47fa33
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0047df41
call sub.cygwin1.dll___errno
mov edx, dword [ebp - 0xc]
mov dword [eax], edx
mov eax, 0xffffffff
jmp 0x47fad8
cmp dword [ebp - 0x1c], 0
je 0x47fa65
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call sub.cygwin1.dll_close
jmp 0x47fa7d
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x30]
test eax, eax
je 0x47fa7d
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x30]
mov dword [esp], eax
call sub.cygwin1.dll_close
cmp dword [ebp - 0x20], 0
je 0x47fa90
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sub.cygwin1.dll_close
jmp 0x47faa8
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
test eax, eax
je 0x47faa8
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x34]
mov dword [esp], eax
call sub.cygwin1.dll_close
cmp dword [ebp - 0x24], 0
je 0x47fabb
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sub.cygwin1.dll_close
jmp 0x47fad3
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x38]
test eax, eax
je 0x47fad3
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x38]
mov dword [esp], eax
call sub.cygwin1.dll_close
mov eax, 0
leave
ret