Currents and the anomalies in chiral gauge theories: Dynamical approach in higher dimensions