No, it is not illegal, and in fact, offered by some OEMs as well. However, it can be risky if not done correctly. Make sure that you take a proper backup and have a recovery drive available in case the system starts crashing. You will need to fix the boot logo path or replace it with a working file for it to proceed normally.