What you are wanting to do doesn't appear to be possible. I had tried to restore my friend code from a dump of my 3DS before it got bricked. The guy I sold it too was able to unbrick it and sent me the decrypted dump. But the Movable.sed file appears to be the issue.
Part of the KeyY string in the Movable.sed has to be updated to match the new console's unique KeyY. The rest of the key determines the encryption for the contends of the "data" folder in the NAND partitition. (this also controls encryption of SD card content). So you can't just move that folder from your old image to the new 3DS image with having it go through System Transfer. The end result will be it simply rejecting the data folder contents and ending up with a factory reset state where it asks for your information as if you just formatted it.
Also modifying the movable.sed with the correct key appears to break signature checks of the file. Because of this, modifying the file bricks emunand (and would brick the console if you attempted this on sysnand). So no way to manually move your data over unfortunately.
Perhaps someone can code a tool to import export sysdata/extdata from the data partition using homebrew as I've seen on 3DBrew that there is a service command that is available for apps to use to access that data. But this content is beyond the reach of SaveDataFiler, so you can't use that one to access it. Someone will need to make homebrew or Arm9 homebrew to decrypt/encrypt it. (rxTools might provide this I hope?)
But the friend code appears to be derived from the keyY stored in the movable.sed. Because of this, I'm SOL because I can't modify the file.
The only real solution would be to patch out signecture checks for NAND/system files. Something Gateway hasn't done yet. (thus no custom SecureInfo_A file or modified movable.sed file. Also the reason you can't install custom themes via CIAs right now.