Ronnie,
Welcome to the forum.
The e60 525i year 2004 was the 1st batch of e60 using the proven M54 double vanos engine. M54 engine was also used in the later batch of e39. I don't think there are any major problem with the e60 525i. For a year 2004 car, you could be looking at RM 15k to replace parts due to normal wear & tear. Having said that, it also depend how the car is maintained and service by your friend. My advice to you is to bring the car to a reputable BMW workshop and have them do a diagnostic and mechanical test. Other than this, check the VIN number to confirm year of production and other relevant information.