How to straighten edges along an axis point
I'm hoping this is the situation:

.. you have a good reference top edge to the plane containing the skew loops.

Create a Custom Orientation from the top edge by using the little '+' in the Header &gt; Transform Orientation dropdown, and set Pivot to Active Element, then:



(above) Bottom edge selected, with its good reference vertex active,
in the new orientation,SShiftY0 make the bottom edge parallel to the top edge.



Left edge, all verts selected, Loop Tools &gt; Space make them regular



Same for the right edge.

If you're missing the good reference points in this answer, let us know what else you need to fix before following these steps.