Hacking Decrypting Wii VC nfs files

MisterTea

Well-Known Member
Newcomer
Joined
Oct 10, 2010
Messages
48
Trophies
1
XP
441
Country
France
I did some comparisons between wii and wiiu format. I have some python code too for reassembling files. Anyone with coding skills wanna team up (C or python whatever)?
 

C0mm4nd_

Aspirant Wii U homebrew dev :P
Member
Joined
Oct 9, 2016
Messages
697
Trophies
0
Website
127.0.0.1
XP
540
Country
Italy

sabykos

Well-Known Member
Member
Joined
Jun 10, 2013
Messages
283
Trophies
1
Age
36
XP
729
Country
Gambia, The
OK, played around a bit

http://pastebin.com/74xxYt4p

This code is a terrible pain in the ass. The reason for this is that I'm not a dev. I have a theoretical understanding of coding, but practically no experiences. What does this code do? Well, you compile it, place it in the content folder of a decrypted WiiVC game and run it. It will combine the nfs files, removes EGGS header, decrypts and moves around certain parts of the file as instructed here:

http://gbatemp.net/threads/decrypting-wii-vc-nfs-files.452426/page-4#post-6925186

However it places the game partition at 0x50000 and not at 0xF800000. This seems to be the normal location for it (at least for SMG2). If you want that data in 0xF800000, remove the commentary in lines 199 and 200. For anything further, I need your help @Falo . Any hint how I encrypt/decrypt the game partition? I want to recreate what you have described in your post before I try to revert it. Would be nice, if you could give some hints. :)
 

sabykos

Well-Known Member
Member
Joined
Jun 10, 2013
Messages
283
Trophies
1
Age
36
XP
729
Country
Gambia, The
Actually here's all the information needed:

http://wiibrew.org/wiki/Wii_Disc

Actually all thats left to do, is to encrypt the game partition. But for this the partition key is needed and I have no idea to get that.

"Partition data is encrypted using a key, which can be obtained from the partition header and the master key."

If anyone knows how to construct this key I might be able to finish the nfs to iso program and can start on trying to revert it. I don't really have the time to spend 20+ hours figuring out this stuff. :/ So any help would be appreciated.
 

AboodXD

I hack NSMB games, and other shiz.
Member
Joined
Oct 11, 2014
Messages
2,880
Trophies
1
Location
Not under a rock.
XP
2,921
Country
United Arab Emirates
This code is a terrible pain in the ass. The reason for this is that I'm not a dev. I have a theoretical understanding of coding, but practically no experiences.
You don't have to be a dev, you just need experience.

Your code is good, but writing it in Python would be cleaner.
Any hint how I encrypt/decrypt the game partition? I want to recreate what you have described in your post before I try to revert it. Would be nice, if you could give some hints. :)
Use the game's title key to decrypt/encrypt the game partitions, the title key itself is encrypted, so you need to decrypt it using the Wii common key.

I can help you later if you want, right now I'm in a vacation. That's why I didn't make a tool myself.

The encrypted title key is inside the game's partition, I don't know how tools like Dolphin or Wiiscrubber obtain it before decrypting the partition first.
 
Last edited by AboodXD,
  • Like
Reactions: sabykos

victormr21

Well-Known Member
Member
Joined
Dec 29, 2015
Messages
565
Trophies
0
XP
498
Country
OK, played around a bit

http://pastebin.com/74xxYt4p

This code is a terrible pain in the ass. The reason for this is that I'm not a dev. I have a theoretical understanding of coding, but practically no experiences. What does this code do? Well, you compile it, place it in the content folder of a decrypted WiiVC game and run it. It will combine the nfs files, removes EGGS header, decrypts and moves around certain parts of the file as instructed here:

http://gbatemp.net/threads/decrypting-wii-vc-nfs-files.452426/page-4#post-6925186

However it places the game partition at 0x50000 and not at 0xF800000. This seems to be the normal location for it (at least for SMG2). If you want that data in 0xF800000, remove the commentary in lines 199 and 200. For anything further, I need your help @Falo . Any hint how I encrypt/decrypt the game partition? I want to recreate what you have described in your post before I try to revert it. Would be nice, if you could give some hints. :)
In what language is written your code?
I tried to rename it to .Bat but nothing...
Bye!
 

victormr21

Well-Known Member
Member
Joined
Dec 29, 2015
Messages
565
Trophies
0
XP
498
Country
Oh boy...

If you can't recognize when something isn't batch code, I feel sorry for you.
When i saw the beginning of the file slowly, i saw that it was C, but Chakratos replied me after this
I don't know if this will work, but if you don't know the key to encrypt/decrypt and you will inject it into an existing Wii VC game, use the same key that the original game, maybe...
Bye
 

sabykos

Well-Known Member
Member
Joined
Jun 10, 2013
Messages
283
Trophies
1
Age
36
XP
729
Country
Gambia, The
Guys, the code isnt finished anyway. It just combines the nfs files, removes EGGS header, decrypts and moves around some stuff. The result is NOT a usable iso file, since the partition table points to the wrong place and the game partition is decrypted. All iso loaders expect encrypted game partitions.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: https://www.kohls.com/product/prd-6512692/arcade-1-up-infinity-50-games-game-board.jsp?pfm=bdrecs...