Complex Twisted square

I am trying to reconstruct a model of the curve below, it is an extruded square with a slight inward tilt and a twist to end 45 degrees rotated by the time it reaches the top.


s

I have experimented with Bend, twist, SweepRail, and SweepRail 2 but I am still stuck. Please let me know if you have any suggestions. Thanks!

Hello- please post a Rhino filke with what you have so far.
I guess something like this
Twisty.3dm (216.9 KB)

-Pascal

New Cyclone Pull - Proper.3dm (2.5 MB)
Let me know if you need any other information!

There’s also a slight gap, 1 mm, at the cross-section (so fabricators can weld between)