It could be top end damage or a wrist pin that has gone bad if it sounds like it is coming from the top of ent engine. If it sounds like it is coming from the bottom it may be a connecting rod. Check the oil for small metal particles as this will be an indicator of internal engine damage. Otherwise the timing may be off and the crankshaft position sensor may be bad. Have the trouble codes pulled to rule that out.