That's a really good question. I believe we are probably talking about 450 to 475 horsepower at the engine. You certainly would need headers and a unrestricted exhaust, improved S/W ie. Powerchip, CAI is debateable, perhaps different "trumpets" as well. Of course having a stronger motor to begin with is a big help. There was a pretty wide range of OEM outputs seen on this board. BMW allowed for a 10% difference in output new. So 396 horespower stated by BMW could have been as low as 360HP( I have never seen one that low mentioned here) or as high as 435HP. I believe most are close to the published output, but a difference of 10HP is certainly the norm here.
Dinan claims 470HP at the crank with the S2 setup. I just had the velocity stacks and throttle bodies installed a week ago. The software is still adapting but I did notice a decent increase in pulling in the higher rpms. The headers were the biggest increase for sure though. I plan to get the car dyno tested in the near future and will post the results.
I think it depends if your talking about out of box mods or custom mods. Most likely you could get 470 with out of box with an engine dyno with the s2 stuff.
Now if you did some custom stuff like cams (course dinan has this now) and higher compression say 12:1 (stock is 11:1) or even higher than yeah you got over 500 hp more than likely as long as you do all the other approprate stuff.
Keep in mind the ascari kz1 has the m5 motor in it and makes 500 hp, so it can be done.
I remember reading somewhere (Roundel or otherwise) that BMW's power output tolerance for the M engines are -1% to 10% of the published figures, so that the published HP figures tend to be on the conservative side of the average.