ROM Hack Mii research lab

Goombi

my_crypto = meme_crypto
OP
Member
Joined
Jun 1, 2014
Messages
144
Trophies
0
Location
RnVja1lvdU15RHVkZQ
Website
www.goombi.fr
XP
178
Country
France
Okay, here we go, I found a fix for the QRcode export thing. That still has an online dependency (on PHP on my server tho, someone who wants to rehost it can PM me if you want the PHP files).

Since some Mii research were freshly published, this thread will keep track of it.
We still don't know what does many bytes of a decrypted Mii.
The goal of this thread is understanding which bit define what on a Mii.

- Ressources -
3dbrew
Those pages are full of useful information:
Mii
Mii Maker

Mii formats
In decrypted state they are 0x60 bytes long or 0x5c bytes long in CFL_DB.dat.
The 4 bytes of difference are 2 null bytes and a 2 bytes of CRC16.
Let's call those 0x60 bytes long, ".mii" files.

In encrypted state they are 0x70 bytes long. Simply the 0x60 decrypted bytes passed through APT:Wrap (AES-CMM adds 16 bytes of integrity checks).
As those are encrypted, let's call them ".bin" files.

Finally, the only stuff you could get without homebrew, QR codes. It's simply a .bin encoded in QR code format.

Tools
QR <-> .bin
Webapp: editMii.
You can open .bin or images and exports them to .bin or image.
You can also open .mii and re-export it in .mii right away, that will fix the CRC before downloading.
.bin <-> .mii
Homebrew: cipherMii Calls APT:Wrap on input.mii and APT:Unwrap on input.bin (input and output should be placed in the .3dsx folder)
Extract CFL_DB.dat
Homebrew: extdata_dump will do. config.txt is already set to dump CFL_DB.dat
Real time edition
CFW: NTR (with NTR debugger or RAM explorer). Sorry for non CFW users, but the RAM viewing is one of the best tools we have.

Research
- I'm now sure that putting a wrong CRC 16 at the end of a .mii doesn't do anything when scanned back in Mii Maker.
- Also, editing the special Mii (gold pants) then ciphering the Mii produces an invalid Mii (CRC fixed or not). This probably means there are more about how the Mii datas are moved when put inside a QR code.
- The "CFOG" section of CFL_DB.dat is loaded in RAM at 0x14895a20. It is only written when saving. You can watch a Mii with RAM explorer, do a change+save, reopen an see if you can spot what changed.
- If you edit the special bit in RAM with NTR then load the Mii for editing, it crashes the editor and reboots the console.

What's to be done
- Understand better the Mii <-> QR code done by Mii Maker. That will probably need some REing.
- Map each Mii variable to the bits in a .mii. The Mii page on 3D brew contains all my findings about those values order in RAM and possible values range.
- Port the 3DS APT:Wrap and APT:Unwrap to PC. More testing than anything (and we have to get the 0x31 key. With Miitomo that has to have it, we have 2 ways to get our hands on the key). That would greatly speed things up.

Feel free to post any offset you found or tool you made that could help, I'll keep the OP up to date :) (but since I don't know anything about true REing, I'll need some help, if someone could tell me about an ARM dissassembler that a noob in RE can use AND that does not cost two legs would be really nice).
 
Last edited by Goombi,

that girl

Entrepreneur
Member
Joined
Jul 25, 2015
Messages
436
Trophies
0
Age
37
Location
Omnipresent
XP
269
Country
Canada
Uhm, at the time I posted this editMii's link in OP goes to the wrong URL…

Clear your cache for homebrew.is-best.net webpages and try scanning this, if you can.
Should load a one-time Special Mii that can not be scanned again.
Markiplier.png


If I can, it will be made re-usable later on.
----------------------------------
To be more clear, it's one-use per 3DS.
 
Last edited by that girl, , Reason: Clarifying.

Ryccardo

Penguin accelerator
Member
Joined
Feb 13, 2015
Messages
7,690
Trophies
1
Age
28
Location
Imola
XP
6,911
Country
Italy
Yep, that's my leading theory on CFHE.

Or maybe it has to do with blocking Mii Plaza users through Maker (press left+x+y)...
 
Last edited by Ryccardo,

Ryccardo

Penguin accelerator
Member
Joined
Feb 13, 2015
Messages
7,690
Trophies
1
Age
28
Location
Imola
XP
6,911
Country
Italy
Maybe. It appeared in the save for Mii Maker itself (not CFL), so that could be the list of already scanned gold Miis (the suspicious middle section in CFL was untouched, btw)
 

that girl

Entrepreneur
Member
Joined
Jul 25, 2015
Messages
436
Trophies
0
Age
37
Location
Omnipresent
XP
269
Country
Canada
Well, Markiplier was the only one I got to work.
It's also the only one that went straight from .mii to QR.
I have not been able to get a .mii file before, nor after, that attempt.
 
Joined
Aug 4, 2008
Messages
1,234
Trophies
1
Location
Commonwealth of Virginia
Website
www.facebook.com
XP
784
Country
United States
Well, Markiplier was the only one I got to work.
It's also the only one that went straight from .mii to QR.
I have not been able to get a .mii file before, nor after, that attempt.
How were you able to generate a .mii file? I know it's rather easy on Wii but I cannot find anything for 3DS.
 

Goombi

my_crypto = meme_crypto
OP
Member
Joined
Jun 1, 2014
Messages
144
Trophies
0
Location
RnVja1lvdU15RHVkZQ
Website
www.goombi.fr
XP
178
Country
France
A QR code contains an encrypted Mii, you can't do anything with it.
You have to decrypt it first with the homebrew I linked in the OP.
Also be careful how you scans the QR code, many reader I found expects regular text in it and reads it in an unwanted encoding, outputing sh*t.
I suggest you use the editMii webapp (also in the OP).
 

Goombi

my_crypto = meme_crypto
OP
Member
Joined
Jun 1, 2014
Messages
144
Trophies
0
Location
RnVja1lvdU15RHVkZQ
Website
www.goombi.fr
XP
178
Country
France
No way unfortunately. Miitomo is a dumb graphical interface for a big webservice. Every single touch on your screen requires Internet access to process your request. Even Mii decryption is handled server side.
 

that girl

Entrepreneur
Member
Joined
Jul 25, 2015
Messages
436
Trophies
0
Age
37
Location
Omnipresent
XP
269
Country
Canada
I wonder if you could hack miitomo to give you're mini good pants
No way unfortunately. Miitomo is a dumb graphical interface for a big webservice. Every single touch on your screen requires Internet access to process your request. Even Mii decryption is handled server side.
Besides, the Mii actually starts with default pants and shirt, regardless of what colour they are on the source mii.
There is a problem when you encrypt a .mii with the gold pant bit set: the 3DS does not read the resulting QR code.
The scanable Markiplier code was a .mii your webapp allowed straight to QR code, but I haven't been able to do it since.
 

Ryccardo

Penguin accelerator
Member
Joined
Feb 13, 2015
Messages
7,690
Trophies
1
Age
28
Location
Imola
XP
6,911
Country
Italy
...I don't know why I posted my (disputed) findings on position on grid and system ID in this topic instead of the PC editor's...

Anyway, favorites: at 0x19 from the start of a Mii, the bit worth 0x40 marks a favorite (crown)!


UPDATE on Personal Mii: I have successfully changed it through manual editing. I literally copied and pasted a(nother favorite) Mii (I created) to the first position of the file, while meanwhile swapping the original personal Mii to the original position of its to-be-successor, saved, recalculated CRC, saved, installed and... bam, it was changed!
 
Last edited by Ryccardo, , Reason: We might have as well won!

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Veho @ Veho: Psi has been banned in the state of California. +1