Field-aligned and gyrophase bunched ion beams are observed in the foreshock of the Earth bow shock. One of the mechanisms proposed for their production is non-specular reflection at the shock front. We study the distributions which are formed at the stationary quasi-perpendicular shock front within the same process which is responsible for the generation of reflected ions and transmitted gyrating ions. The test particle motion analysis in a model shock allows one to identify the parameters which control the efficiency of the process and the features of the escaping ion distribution. These parameters are: the angle between the shock normal and the upstream magnetic field, the ratio of the ion thermal velocity to the flow velocity upstream, and the cross-shock potential. A typical distribution of escaping ions exhibits a bimodal pitch angle distribution (in the plasma rest frame).