Turning Corner Pin into 3d coordinates

Probably a long shot, but I was wondering if there would be a way to turn the corner pin effect into 3d coordinates to have a solid moving in z space exactly the same way a solid is moving in the fake 3d space of corner pin?

Theoretically, you should be able to do it with just three corners. You know that one side is the solid's width and the other is the height and that the actual angle between the sides is 90 degrees. Given that, and the coordinates of the three corners projected onto the comp view should be enough (I think) to calculate the position and orientation of the solid. I don't have the 3D transform chops to do it though.

by averaging out the cornerpins, and doing some extra math, we get position, rotation and scale that roughly tracks the layer. So we get motion blur for free.
Now we need the corner-pin effect again, but only to do some minor adjustment of the corners. In other words, add back the perspective
Add these expressions to the corner-pins of the motion blurred layer: