It's possible, and simple if you didn't delete any of the html threads.
Just upload your old ubb cgi files, run copycat's deletehacklines script found in chit chat (do a search for it) then reset your general settings, your forums, styles, update threads, and re-index. That should do it.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.