I got a shiny Rayquaza on Pokémon White 2. It has the normal ability, and normal stats/moves, but it was caught in Sinnoh on level 41. I would like to know if it is hacked, would it affect my Pokémon X game? Would the save file corrupt?
Trying to transfer hacked/altered pokemon from Gen V games to Pokemon X/Y will not result in any save file corruption or ban. I speak from experience, since one of my traded pokemon in Pokemon Black 2 was flagged as hacked by the PokeTransporter and was excluded from the transfer. (If you are curious it was a Japanese Torterra I had traded through GTS) This does not corrupt the Gen V or the X/Y game.
If your pokemon is detected as a hacked/illegal pokemon, it will just stay in your Gen V game, and won't be transferred through Poketransporter. No side-effects occur. I recommend releasing that pokemon to never be bothered by it again.