Nintendo is an example of a company that currently does not agree with modding or hacking. In most cases, it is perfectly legal although it goes against certain company policies on their games. It highly depends on the game and company, it is often referred to as modding.