Jump to content

Recommended Posts

Hi all,

I am a IT student and I am currently trying to reverse engineer the inner working of the Gen IV Distribution ROM. I already figured out the basics but...

Right now, I am facing an issue with the way data is encrypted. I already know of tools such as WC4PCD or PokeGen, PokeHex... but I am trying to understand and create my own program to decrypt and reencrypt all by myself.

So I am asking if any one here as any leads or straight up know what encryption algorithm is used. I obviously did some research but no luck yet. (Chat GPT told me to XOR the file but idk what key to use).

Thanks in advance, and my apologies if I made any english mistake

Edited by Julian52575
Link to comment
Share on other sites

Thanks for the reply, I'm sorry about the link, I should have put more thought into it.

These are really valuable information so thank you again for replying. But I don't think it works this way for 2 reasons :

  1. The PGT file is not 136 bytes long but 260.
  2. I don't have any personality values to use for block shuffling, as I believe it is only generated after the gift is received (hence the random IVs and Natures).

I tried nonetheless to program an decryption tool (without the block shuffling bit) but the result is nowhere near the decrypted file I got with the online tool (probably due to a bug on my end though).

My best chance is probably to understand the PCDWC4 source code but it feels wrong and too easy...

Edit :  about the data structure, according to this reddit thread and my personal research, the .Pokemon Card T? file contain the Wondercard text alongside the .Pokemon Gift T? file which contain the gift data (What item or pokémon).

Edited by Julian52575
Explaning the PCT / Wondercard data structure
Link to comment
Share on other sites

  • Julian52575 changed the title to How to decrypt a .PGT file ?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...