Excuse my lack of knowledge, but I got a little lost at the contents of this topic. OK, figuring the hex string for the moves was easy enough.
Let me say, I know hex. In years gone I did a lot of game memory hacking on the original Playstation with Gran Turismo 2 and even had some scripts on a Web site to generate Action Replay Codes (with their attendant encryption) from game data in "English". I know bit "functions" such as And (if bits are 1 on both arguments) and Or (1 on either) and I presume Xor (1 on either but not both?).
Is there somewhere with an example decryption taken at a slightly lower level that I may be able to follow. The reason I ask is that I like to put the PP values into Pokegen and currently have the moves in Excel, for ease, and given a decent insight into the workings of the Encryption, I could create a spreadsheet to maybe create an AR code from the Pokemon data which would automatically pick up the PP value. I do have the hex functions active in my Spreadsheet and do use them.