Help!
by VoroneTZ. 10/14/25 05:04
|
|
|
|
|
|
|
|
|
2 registered members (VoroneTZ, TipmyPip),
9,297
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Location of _sphere.mdl, _cube.mdl and _shadow.dds
[Re: oliver2s]
#435990
01/16/14 17:54
01/16/14 17:54
|
Joined: Oct 2011
Posts: 1,082 Germany
Ch40zzC0d3r
Serious User
|
Serious User
Joined: Oct 2011
Posts: 1,082
Germany
|
Well I thought its loading a "real" WRS from the directory into a buffer located @ this offset, but the file is hardcoded there <_< Here are 2 functions for a byte signature:
bool CMisc::bDataCompare(const BYTE *pData, const BYTE *bMask, const char *szMask)
{
for(; *szMask; ++szMask, ++pData, ++bMask)
{
if(*szMask == 'x' && *pData != *bMask)
{
return false;
}
}
return (*szMask) == NULL;
}
DWORD CMisc::FindPattern(DWORD dwAddress, DWORD dwLen, BYTE *bMask, char *szMask)
{
for(DWORD i=0; i < dwLen; i++)
{
if(bDataCompare((BYTE*)(dwAddress + i), bMask, szMask) )
{
return (DWORD)(dwAddress + i);
}
}
return 0;
}
Use:
FindPattern(0xEntryPoint, 0xSizeOfScan, (BYTE*)"\xFF\xFF\xFF\x00\x00\xFF\x00, "xxx??x?");
x = known byte ? = unknown byte (could change after an update etc.)
Last edited by Ch40zzC0d3r; 01/16/14 17:56.
|
|
|
Re: Location of _sphere.mdl, _cube.mdl and _shadow.dds
[Re: oliver2s]
#435992
01/16/14 18:04
01/16/14 18:04
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Ask for the symbol that contains the address to the WRS section to be exported. And then hope for an update that contains it within our lifetime  In the meantime, this is probably the best you can do other than dumping the WRS itself from the dll and then putting it in its own file (which isn't future compatible either.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: Location of _sphere.mdl, _cube.mdl and _shadow.dds
[Re: FBL]
#435995
01/16/14 18:10
01/16/14 18:10
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
I thought the premise was that that was equally ugly and to be avoided? Also, where would be the fun in that?
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
|