The dependence of dark matter profiles on the stellar-to-halo mass ratio: a prediction for cusps versus cores