That message will come if the xp version you are running is likely to be a cracked version. It is, of course not legal to use cracked software, and yes, it could cause a legal problem for you, as much as it could for anyone using a cracked version of windows.
Depending on what you are doing for 'study purpose', there might be other solutions. But else, if you don't want to use counterfeit software, go buy XP.