Actually, what I do (which is essentially the same as what I used to do in VB.Net) is I write out a serializable structure for the Pokémon data. After I read the raw data from the save file, I decrypt and unshuffle it, and then deserialize it into my Pokémon object. After messing with the Pokémon object's data in whatever way I see fit, I calculate and update the checksum, shuffle and encrypt it, and serialize it back into the save file.
I find this approach makes it easiest to work with the raw data while coding up the functions to make sense of said data, since you're calling on a variable instead of having to remember what each offset is for. Plus, I can use the Pokémon structure within the save file structure, making it way easy to reach a Pokémon within a save file.
Speaking of which, I uploaded all my old VB.Net source code to Google Drive, so enjoy that.