A multimode analytic cylindrical model for the stabilization of the resistive wall modes