Ask the insurance company about the buyback price; they can give that figure to you.
I think you can reasonably expect to be able to buy the car back, get a new engine, and pay someone to put it in for you, all for less than what you're getting for the payout. I'm assuming a buyback is a low amount here; less than $2k. If it's more, it may not be worth it as you'd be out of pocket after all is said and done.