Alot of your question depends on what type or how extensive you are going to go. Depending on what you are doing and the engine, you will be somewhere between $7,000 to as high $15,000.
A 500 HP Cummins should not be at the rebuild stage with those miles.
Also keep in mind to budget extra...