Theory of Resistive Modes in the Ballooning Representation