Counter generation(info from
http://3dbrew.org/wiki/Extdata):
First, take the path of the file you want you want to decrypt.
Let's use 'X:/Nintendo 3DS/<ID0>/<ID1>/extdata/00000000/0000008f/00000000/00000001' ('00000001' is the file, it has no extension)
We only need what's after X:/Nintendo 3DS/<ID0>/<ID1>
So, '/extdata/00000000/0000008f/00000000/00000001'
Convert that to UTF16, add two null bytes to the end, then take the SHA256.
The counter is then CTRword
= Hashword ^ Hashword[4+i]
For the example file, the counter is {0x24, 0xE2, 0xF7, 0x91, 0x92, 0x6A, 0xDC, 0x96, 0x49, 0x4E, 0x81, 0xA9, 0x7B, 0x3C, 0x90, 0xCF}
This works for anything in 'extdata', 'dbs', 'title', and possibly 'backups'(haven't tested this one)