That is a Definitive Arms underfolder to M4 stock adapter. Looks to be Gen 2. You should show that to DA so they can update their website to confirm that it works with the SAM7UF.
Is that grease in the picture, or something crazy like JB weld all over the adapter? If you can do so without stripping those hex screws, you need to take the adapter off and show us what it looks like under there. If the previous owner did a drop in installation then you should be able to take that off, put on the appropriate underfolder stock, and you are good to go. If PO drilled into the receiver and rear trunnion or hogged out the original holes for the UF stock, you're going to need to take it to a competent gunsmith to see if what you want can be done.
On the bright side, the SAM7 series is highly sought after, so you may be able to sell on GunBroker and get back at least some of what you put into it. Possibly profit if you didn't pay current GunBroker prices for a milled Arsenal rifle.
Assuming this has the proper underfolding rear trunnion underneath (not a pistol build) you should be able to take off that ugly looking contraption and replace with a UF stock. That adapter required drilling four holes in the receiver, but aside from having four extra holes, it didn't change anything that can't be changed back. The holes can be filled by a competent welder or you can get plastic plugs that look like rivets.
As long as the installer didn't bork something else up. The JB Weld or whatever that crap is may give you a little grief; chances are the screws are coated as well, so you may have to drill the screws out. You'll probably have to sand and paint the back of the receiver, so you may as well weld up the holes.