It depends on which version of the game you're playing, in Diamond and Pearl only 85h is used, which is used for where the Pokemon was caught/received, for example whether it was caught in the grass, received as a starter, hatched from an egg, etc. From Platinum and on, in addition to 85h 44-47h are also used, 44h and 45h being used only for eggs and being where they were received from, Daycare Couple, Riley, etc. 46h and 47h are for the met at location, meaning where you caught, received, or hatched the Pokemon. A Pokemon in any of these three games will pass the legal check on Battle Revolution and WiFi and what not without bothering, and will look perfectly legal at a glance as long as nobody Pokesavs it and checks the hex values you wouldn't notice a difference. However, in Heart of Gold and Soul of Silver they're vital as the current version of Pokesav doesn't include Johto and Kanto locations in the drop boxes, so you have to set the met at location to Faraway Place and manually imput the hex values for where the Pokemon was met, you also have to select the regular Pokeball from the drop box, no matter what Pokeball it will actually be in, and input the hex value for the Pokeball in 86h. The reason for this is mostly compatibility I assume. The Sinnoh games don't have Apricorns nor Apricorn balls, they also don't have the Johto and Kanto locations, so the hidden hex values are used to make it so a Pokemon from Johto caught with a Heavy Ball will properly display in Heart of Gold and Soul of Silver, while if it's traded to the older games they'll simply ignore them and will display the Pokemon as being caught in a regular Pokeball and coming from a Faraway Place.