An energy-principle-based dispersion relation is derived for the resistive wall mode, which incorporates both the drift kinetic resonance between the mode and energetic particles and the resistive layer physics. The equivalence between the energy-principle approach and the resistive layer matching approach is first demonstrated for the resistive plasma resistive wall mode. As a key new result, it is found that the resistive wall mode, coupled to the favorable average curvature stabilization inside the resistive layer (as well as the toroidal plasma flow), can be substantially more stable than that predicted by drift kinetic theory with fast ion stabilization, but with the ideal fluid assumption. Since the layer stabilization becomes stronger with decreasing plasma resistivity, this regime is favorable for reactor scale, high-temperature fusion devices.