# Bundle Decryption & Extraction ## Overview Holo's Hanafuda (Unity 6000.0.25f1, IL2CPP) encrypts its 559 addressable asset bundles using a custom **AES-256-ECB** stream cipher implementation. This document outlines the encryption scheme, the discovery process, and how to use the `extract_bundles.py` script to decrypt and extract the assets. ## Encryption Scheme The game implements a custom stream cipher by leveraging AES-256-ECB as a keystream generator. The encryption keys were found by developing a custom **EOSSDK** proxy DLL that dumps keys at runtime. | Property | Value | |---|---| | Cipher | AES-256-ECB, `PaddingMode.None` | | Key | 32 ASCII bytes: `rK7CcATuZk7LAmhqqU4iBLNmAq8QbK3s` | | Keystream | `AES_ECB(key, counter_block)` | | Counter block | `[le64(counter) \| 8 zero bytes]` (16 bytes) | | Counter start | `pos/16 + 1` (first block = counter 1) | ### Decryption Logic Files are encrypted using a block-by-block XOR operation against an AES-generated keystream. To decrypt these bundles, you can use the `extract_bundles.py` script, which calculates the counter for each 16-byte block and reverses the XOR encryption. ```python # The process is something like this: counter_block = struct.pack('