Find CGameRules_ClientSettingsChanged
Locate CGameRules::ClientSettingsChanged in CS2 server.dll or server.so using IDA Pro MCP tools.
Method
Search for the string:
mcp__ida-pro-mcp__find_regex pattern="fov_desired"Get cross-references to the string:
mcp__ida-pro-mcp__xrefs_to addrs="<string_addr>"Decompile the referencing functions and look for this pattern:
mcp__ida-pro-mcp__decompile addr="<function_addr>"The target function should contain code similar to:
if ( (_DWORD)PlayerInfo != -1 ) v4 = (_DWORD)PlayerInfo - 1; v31 = (_BYTE *)v30(g_Source2EngineToServer, v4, "fov_desired"); v23 = v22; if ( v22 && *v22 && (unsigned int)V_atoi(v22) )You should also see references to
oldname,newnameandplayer_changenamewithin the function.Rename the function:
mcp__ida-pro-mcp__rename batch={"func": [{"addr": "<function_addr>", "name": "CGameRules_ClientSettingsChanged"}]}Find VTable and Calculate Offset:
ALWAYS Use SKILL
/get-vftable-indexto get vtable offset and index for the function.Generate and validate unique signature:
ALWAYS Use SKILL
/generate-signature-for-functionto generate a robust and unique signature for the function.Write IDA analysis output as YAML beside the binary:
ALWAYS Use SKILL
/write-vfunc-ida-analysis-output-as-yamlto write the analysis results.Required parameters:
func_name:CGameRules_ClientSettingsChangedfunc_addr: The function address from step 3func_sig: The validated signature from step 6
VTable parameters (when this is a virtual function):
vtable_name:CGameRulesorCCSGameRules(depending on which vtable contains it)vfunc_offset: The offset from step 5vfunc_index: The index from step 5
Signature Pattern
The function contains a call to get the fov_desired convar value:
v31 = (_BYTE *)v30(g_Source2EngineToServer, v4, "fov_desired");
And contains string references related to player name changes:
oldnamenewnameplayer_changename
Function Characteristics
- Prototype:
bool CGameRules::ClientSettingsChanged(CGameRules *pGameRules, CBasePlayerController *pPlayerController) - Parameters:
pGameRules: Pointer to the CGameRules instance (this)pPlayerController: Pointer to the player controller whose settings changed
- Return:
boolindicating success/failure
DLL Information
- DLL:
server.dll(Windows) /server.so(Linux)
Output YAML Format
The output YAML filename depends on the platform:
server.dll→CGameRules_ClientSettingsChanged.windows.yamlserver.so→CGameRules_ClientSettingsChanged.linux.yaml
func_va: 0x180XXXXXX # Virtual address of the function - This can change when game updates.
func_rva: 0xXXXXXX # Relative virtual address (VA - image base) - This can change when game updates.
func_size: 0xXXX # Function size in bytes - This can change when game updates.
func_sig: XX XX XX XX XX # Unique byte signature for pattern scanning - This can change when game updates.
vtable_name: CGameRules # (if virtual function)
vfunc_offset: 0xXXX # Offset from vtable start - This can change when game updates. (if virtual function)
vfunc_index: XX # vtable[XX] - This can change when game updates. (if virtual function)