The bank failed to act on warnings about a local firm which was helping Iran, leaked documents show.