How Could the Sons of Yaakov Do What They Did at Shechem?

Working with the assumption that the sons of Yaakov were generally righteous, Ramban asks how they could possibly kill a horde of ostensibly innocent people in Shechem, or even act deceptively with Shechem's deal in the first place. To answer this question, Ramban examines what was happening in the story and raises a number of possibilities. He points out that what Shechem did was against Torah law, but also against the law of the Land (and the Seven Noahide Laws)-- but nobody in his town was bringing him to justice. Did that make the rest liable to the death penalty, too? Where the sons of Yaakov seeking to exact justice, or revenge? Were there acts justified, or did they make a horrible mistake, even if they had good intentions? Or was Yaakov's reaction the one that was flawed?