Quite a lot of code, yeah.
The built CIA is almost identical to GM9, with the following differences:
1. Paddings are zeroed out
2. Title key is not written (GM9 gets it from support data/ticket db)
3. Ticket content index is slightly different (GM9 likely takes it from the legit ticket, while we are building a fake one)
The 2, 3 points can be fixed probably.
A new "quick" decryptor is implemented. This is not really much faster (not slower either) but provides the benefit of being able to report progress on a single file. The frontend is updated accordingly to support this feature.