Before anyone jumps on the "stealership" bandwagon;
if it's lost all the oil and gone bang you don't want just a top end rebuild or it's going to be half a job.
Strip the thing to the cases and see what the actual story is.
We've just finished an XR650r that came in for a rattly cam chain. It turned into a full rebuild including repinning the crank and replacing the piston, cam, rod and most of the ancillaries. Poor bastard isn't getting much if any change from $3k and he's got a bargain price for the time we've put in. But now it's pretty much a new engine.
For $5k it would need to be the box as well...
An inmate here brought me their DRz after it locked up. It was looking like a many thousand $$ job to get rebuilt after the head lost oil pressure and ate the cam journal and heat pinched the piston. It took the main with it and a bunch of other parts. He found a repairable write off and got an awesome deal, now the job is just an engine swap over. When it's done he'll probably part the rolling chassis out and it'll pay for itself.
Might be worth spending a bit of time looking around at options.