So, i got bored and figured this might be something cool to do.
Basically, by hooking SFile::OpenFile you can intercept the accessing of files inside of the archives. A quick example i have provided turns any female model into a male (curse those woman!).
Code:
u_int WINAPI SFile__OpenFile( DWORD dwUnk1, const char* pszFilePath, DWORD dwUnk2, DWORD dwUnk3 )
{
std::string modelPath( pszFilePath );
for( ; ; )
{
boost::iterator_range< std::string::iterator > Iter = boost::algorithm::ifind_first( modelPath, "female" );
if ( Iter.size() )
boost::ireplace_first( modelPath, "female", "male" );
else
break;
}
return oOpenFile( dwUnk1, modelPath.c_str(), dwUnk2, dwUnk3 );
}
3.1.1 Address: 0x4584D0
This may not appear elsewhere without permission but may be linked to. The source may also not be used in any closed source commercial applications without prior consent.