this cpo is really dependent on the will of the dealer. according to the law, you can modify whatever you want. the warranty is voided only if it can be proven that your modification caused the damage you are claiming should be covered by warranty.
1. you modified the engine computer, and you are claiming that the car is rusted to shit. it is likely that bmw will accept your claim.
2. you modified the engine computer and the engine blew up. you discovered that it was the main bearing retainers that were at fault, and you can show that engine was never over-reved, and never overheated. so in truth, you are right.
hahahah: good luck winning case2. bmw will say: you caused, sue us. sueing will cost you about 5 times the cost of a new engine, with no guarantees that you win.
so really, you are on your own.