Can you provide the dump for this update? thanks.
No, sorry, not anytime soon - I'm using a metered connection right now and the update is too huge to download :)
Consider making your own dumper though - it's fairly trivial. For me the most difficult part was nicely formatting and indenting the data as text.
Read the original post, read all the other posts in the thread, and if you still don't know/understand something - just ask here specifically what part you don't understand. I/others will gladly share insights/hints/chunks of code etc.
If you just need offsets for specific fields - extract them from CSchemaSystem at runtime.
This dumper consists of several parts:
convars/concommands - moslty stuff from
https://yougame.biz/threads/267157/
gamesystems - almost the same as source1 engine, except IIRC source1 had a table of gamesystems, source2 uses a linked list
//xref "IGameSystem::InitAllSystems"
//target function is IGameSystem::InitAllSystems(IGameSystem *__hidden this)
class FirstGameSystemPtr_Client : PatternParent<FirstGameSystemPtr_Client,
"client.dll",
"FirstGameSystemPtr",
"40 53 55 56 57 41 55 48 81 ec ?? ?? ?? ?? 48 8b 1d"
>
...
constexpr auto GAMESYSTEMS_insn_mov_offset = 0xE;
//xref in IGameSystem::InitAllSystems, a mov+test right at the start
//target function is IGameSystem::InitAllSystems(IGameSystem *__hidden this)
//target variable is CBaseGameSystemFactory::sm_pFirst
you get the first gamesystemfactory from pattern(pattern points at the beginning of a function and there's a mov referencing sm_pFirst followed by a test) and keep factory->next until it's nullptr
factories are either static or reallocating
class IGameSystemFactory : public VClass
{
public:
IGameSystemFactory* Next{};
const char* FactoryName{};
private:
struct ReallocatingFactoryData
{
IGameSystem* System_Ptr;
//...
};
union SystemData
{
IGameSystem* Static_Ptr;
ReallocatingFactoryData* Reallocating_Ptr;
};
SystemData Ptr{};
bool IsReallocating() const
{
return CallVFunc<8, bool>();
}
public:
IGameSystem* GetSystem() const
{
if (IsReallocating())
{
if (const auto* realloc_data_ptr = Ptr.Reallocating_Ptr; realloc_data_ptr)
return realloc_data_ptr->System_Ptr;
else
return nullptr;
}
return Ptr.Static_Ptr;
}
};
interfaces - you iterate every module in dota2.exe, check for export "CreateInterface", get the export address,
check if first 3 bytes are 0x4c 0x8b 0x0d(it's a mov instruction)
if so, you extract the address from the instruction and you get the first InterfaceReg - it's a linked list so you keep reg-> m_pNext until it's nullptr
network field change callbacks - CNetworkMessages has a CUtlStringMap of callbacks at 0x4c0
schema - stuff from this thread(large part of it is
https://yougame.biz/threads/139802/page-4#post-2582741), also you can consult
(from
https://yougame.biz/threads/263327/)