You could just use Gmsh GUI or Gmsh command line access to read binary msh file and then to write it a desired format. It have to work without writing some code.