Find CCSPlayerController_ChangeTeam
Locate CCSPlayerController_ChangeTeam in CS2 server.dll or server.so using IDA Pro MCP tools.
Method
Search for the debug string:
mcp__ida-pro-mcp__find_regex pattern="ChangeTeam\(\) CTMDBG"Get cross-references to the string:
mcp__ida-pro-mcp__xrefs_to addrs="<string_addr>"Decompile the referencing function:
mcp__ida-pro-mcp__decompile addr="<function_addr>"Rename the function:
mcp__ida-pro-mcp__rename batch={"func": [{"addr": "<function_addr>", "name": "CCSPlayerController_ChangeTeam"}]}Find VTable and Calculate Offset:
ALWAYS Use SKILL /get-vtable-index to get vtable offset and index for the function.
VTable class name: CCSPlayerController
Generate and validate unique signature:
ALWAYS Use SKILL
/generate-signature-for-functionto generate a robust and unique signature forCCSPlayerController_ChangeTeam.Write IDA analysis output as YAML beside the binary:
ALWAYS Use SKILL
/write-vfunc-as-yamlto write the analysis results forCCSPlayerController_ChangeTeam.Required parameters:
func_name:CCSPlayerController_ChangeTeamfunc_addr: The function address from step 3func_sig: The validated signature from step 6
VTable parameters (when this is a virtual function):
vtable_name:CCSPlayerControllervfunc_offset: The offset from step 5vfunc_index: The index from step 5
Signature Pattern
The function contains a debug log call with format string:
"%s<%i><%s><%s>" ChangeTeam() CTMDBG , team %d, req team %d willSwitch %d, %.2f
Function Characteristics
- Parameters:
(this, team_id)wherethisis CCSPlayerController pointer,team_idis the target team
Team IDs
0: Unassigned1: Spectator2: Terrorist3: Counter-Terrorist
VTable Information
- VTable Name:
CCSPlayerController::\vftable'` - VTable Mangled Name:
??_7CCSPlayerController@@6B@ - VTable Index: 102 (0x66) - This can change when game updates.
- VTable Offset: 0x330 - This can change when game updates.
- Note that for
server.so, The first 16 bytes of "vftable" are for RTTI. the real vftable =_ZTV19CCSPlayerController (0x221e390)+0x10=0x221e3A0.
Output YAML Format
The output YAML filename depends on the platform:
server.dll→CCSPlayerController_ChangeTeam.windows.yamlserver.so→CCSPlayerController_ChangeTeam.linux.yaml