I had the same problem.
When I disabled the "Avast" antivirus for 10 minutes, "composer" installed just fine.