The headers are equal in size for both the CC4 and CC5 terrain files.
Both 20 bytes.
So just replace the 20 first bytes of the new file
with the 20 first bytes from the original CC5 terrain file.
That takes care of the header. Then the footer.
The CC4 footer is the last 1972 bytes ( Starting with the sequence EA 03
).
The CC5 footer is the last 1980 bytes ( ditto ).
So you'll have to delete the last 1972 bytes from the file created by
sprtool
and copy and paste the last 1980 bytes from the original cc5
file
in place of the deleted portion.
CplFilth