Just a quick example on how to get interface list from game modules with s_pInterfaceRegs (CreateInterfaceInternal), in CS:S. ๐ฝ
Well you could sigscan for every interface pointer OR use exported "CreateInterface" (which is the easy way), but this way is easier/cleaner imo. (and gets everything you need basically)
Signatures btw:
client_interface_list; /* 89 01 a1 ? ? ? ? 89 41 08 8b c1 (client.dll) */
engine_interface_list; /* a1 ? ? ? ? 89 41 08 8b c1 (engine.dll) */
vguimatsurface_interface_list; /* a1 ? ? ? ? 89 41 08 8b c1 (vguimatsurface.dll) */
vstdlib_interface_list; /* a1 ? ? ? ? 89 41 08 8b c1 (vstdlib.dll) */
vgui2_interface_list; /* a1 ? ? ? ? 89 41 08 8b c1 (vgui2.dll) */
By getting the interface list, you can easily get a pointer to your desired interface.
InterfaceReg* client_interface_list
= **(InterfaceReg***)utils::find_pattern((char*)"\x89\x01\xa1\x00\x00\x00\x00\x89\x41\x08\x8b\xc1 ", (char*)"xxx????xxxxx", dll_client, 0x552EC8, 3);
InterfaceReg* engine_interface_list
= **(InterfaceReg***)utils::find_pattern((char*)"\xa1\x00\x00\x00\x00\x89\x41\x08\x8b\xc1", (char*)"x????xxxxx", dll_engine, 0x243FF5 , 1);
InterfaceReg* vgui2_interface_list
= **(InterfaceReg***)utils::find_pattern((char*)"\xa1\x00\x00\x00\x00\x89\x41\x08\x8b\xc1", (char*)"x????xxxxx", dll_vgui2, 0x1EE45 , 1);
InterfaceReg* vstdlib_interface_list
= **(InterfaceReg***)utils::find_pattern((char*)"\xa1\x00\x00\x00\x00\x89\x41\x08\x8b\xc1", (char*)"x????xxxxx", dll_vstdlib, 0xBCDA , 1);
InterfaceReg* vguimatsurface_interface_list
= **(InterfaceReg***)utils::find_pattern((char*)"\xa1\x00\x00\x00\x00\x89\x41\x08\x8b\xc1", (char*)"x????xxxxx", dll_vguimatsurface, 0x6DF51 , 1);
uintptr_t* client = get_interface_ptr<uintptr_t*>("VClient017", client_interface_list);
uintptr_t* engine = get_interface_ptr<uintptr_t*>("VEngineClient013", engine_interface_list);
uintptr_t* panel = get_interface_ptr<uintptr_t*>("VGUI_Panel009", vgui2_interface_list);
uintptr_t* entity_list = get_interface_ptr<uintptr_t*>("VClientEntityList003", client_interface_list);
uintptr_t* cvar = get_interface_ptr<uintptr_t*>("VEngineCvar004", vstdlib_interface_list);
uintptr_t* surface = get_interface_ptr<uintptr_t*>("VGUI_Surface030", vguimatsurface_interface_list);
If you want to debug all interfaces from the list, you can use this function:
debug_interface_list(InterfaceReg* interface_list);
Now you can use interface pointers and do what you want! ๐
Credits (really well explained here): https://aixxe.net/2017/03/walking-interface-list