OK first problem if it has cooked likely to have damaged the threads in the block so its 50/50 if the block can be salvaged there is a thread insert system that can work but id the block has softened up then if scrap!
fitting a s/h engine will not gain much as it maybe just as bad as the once...