/dev/es

From WiiBrew
< /dev
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The ES (EncryptionSystem?) is responsible for the security of Wii, making it the enemy!

Here are some ES functions:

ios_ioctlv( fd, 2, 4, 0, vec);
ios_ioctlv( fd, 3, 2, 0, vec);
ios_ioctlv( fd, 4, 2, 0, vec);
ios_ioctlv( fd, 5, 1, 0, vec);
ios_ioctlv( fd, 6, 0, 0, vec);
ios_ioctlv( fd, 0x0C, 0, 1, vec);
ios_ioctlv( fd, 0x0D, 1, 1, vec);
ios_ioctlv( fd, 0x0E, 0, 1, vec);	ES_ListTitlesOnCard
ios_ioctlv( fd, 0x0F, 1, 1, vec);
ios_ioctlv( fd, 0x2B, 1, 0, vec);
ios_ioctlv( fd, 0x2F, 0, 0, vec);
ES_LaunchTitle
((u32*)vec)[(0x40>>2)]   = TitleIDL;
((u32*)vec)[(0x40>>2)+1] = TitleIDH;

((u32*)vec)[0]=(u32)PHYSADDR(vec+0x40);
((u32*)vec)[1]=8;
((u32*)vec)[2]=(u32)PHYSADDR(vec+0x60); // data returned by ES_GetTicketViews
((u32*)vec)[3]=0xD8;

ios_ioctlvReboot( fd, 8, 2, 0, vec);  
ES_GetTicketViewNumber:

((u32*)vec)[(0x40>>2)]   = TitleIDL;
((u32*)vec)[(0x40>>2)+1] = TitleIDH;

((u32*)vec)[0]=(u32)PHYSADDR(vec+0x40);
((u32*)vec)[1]=8;
((u32*)vec)[2]=(u32)PHYSADDR(vec+0x60);
((u32*)vec)[3]=4;

ios_ioctlv( fd, 0x12, 1, 1, vec);


ES_GetTicketViews

((u32*)vec)[(0x40>>2)]   = TitleIDL;
((u32*)vec)[(0x40>>2)+1] = TitleIDH;

((u32*)vec)[(0x60>>2)]   = num; // value returned by ES_GetTicketViewNumber

((u32*)vec)[0]=(u32)PHYSADDR(vec+0x40);
((u32*)vec)[1]=8;
((u32*)vec)[2]=(u32)PHYSADDR(vec+0x60);
((u32*)vec)[3]=4;
((u32*)vec)[4]=(u32)PHYSADDR(vec+0x80);
((u32*)vec)[5]=num*0xD8;

ios_ioctlv( fd, 0x13, 2, 1, vec);