AMPXI:DecryptDSiWareData

AMPXI:DecryptDSiWareData

Request #

Index WordDescription
0Header code [0x00450108]
1Input buffer size
2Output buffer size
3IV size (0x10)
4(u8) DSiWare section index
5(Input buffer size << 8) | 0x6
6Input buffer pointer
7(IV size << 8) | 0x16
8Input IV buffer pointer
9(Output buffer size << 8) | 0x24
10Output buffer pointer
11(IV size << 8) | 0x34
12Output IV buffer pointer

Response #

Index WordDescription
0Header code [0x00450041]
1Result code

Description #

This is used during AM:ImportTwlBackup.

The input IV is gotten from the block metadata at the end of each section.

This command will decrypt the input buffer using the given IV, size and DSiWare section index, and outputs the resulting IV after the decryption to be reused with this command to decrypt all data until the entire section has been read.