Refactor high-complexity React components in Dify frontend. Use when `pnpm analyze-component...
npx skills add hzqst/CS2_VibeSignatures --skill "find-CBaseModelEntity_SetModel"
Install specific skill from multi-skill repository
# Description
Find and identify the CBaseModelEntity_SetModel function in CS2 binary using IDA Pro MCP. Use this skill when reverse engineering CS2 server.dll or server.so to locate the SetModel function by searching for known model path string references like "weapons/models/defuser/defuser.vmdl" and analyzing cross-references.
# SKILL.md
name: find-CBaseModelEntity_SetModel
description: Find and identify the CBaseModelEntity_SetModel function in CS2 binary using IDA Pro MCP. Use this skill when reverse engineering CS2 server.dll or server.so to locate the SetModel function by searching for known model path string references like "weapons/models/defuser/defuser.vmdl" and analyzing cross-references.
Find CBaseModelEntity_SetModel
Locate CBaseModelEntity_SetModel in CS2 server.dll or server.so using IDA Pro MCP tools.
Method
-
Search for a known model path string:
mcp__ida-pro-mcp__find_regex pattern="weapons/models/defuser/defuser\.vmdl" -
You should ALWAYS use single back-slash here instead of double back-slash(which means you should go with escaped dot).
-
Get cross-references to the string:
mcp__ida-pro-mcp__xrefs_to addrs="<string_addr>" -
Decompile the referencing functions to identify which one calls SetModel:
mcp__ida-pro-mcp__decompile addr="<function_addr>"
Look for a function that takes(this, model_path)as parameters and is called early in entity initialization. -
Identify the SetModel function from the decompiled code. It will be called like:
c sub_XXXXXX(a1, "weapons/models/defuser/defuser.vmdl");
The first argument is the entity pointer, second is the model path. -
Get function info:
mcp__ida-pro-mcp__lookup_funcs queries="<setmodel_func_addr>" -
Rename the function:
mcp__ida-pro-mcp__rename batch={"func": {"addr": "<function_addr>", "name": "CBaseModelEntity_SetModel"}} -
Generate and validate unique signature:
DO NOT use find_bytes as it won't work for function.
ALWAYS Use SKILL /generate-signature-for-function to generate a robust and unique signature for the function.
- Write IDA analysis output as YAML beside the binary:
ALWAYS Use SKILL /write-func-as-yaml to write the analysis results.
Required parameters:
- func_name: CBaseModelEntity_SetModel
- func_addr: The function address from step 5
- func_sig: The validated signature from step 7
Signature Pattern
The function is called with a model path string as the second parameter:
CBaseModelEntity_SetModel(entity_ptr, "path/to/model.vmdl");
Common model paths that reference this function:
- weapons/models/defuser/defuser.vmdl
- Other .vmdl model paths in entity spawn/initialization code
Function Characteristics
- Parameters:
(this, model_path)wherethisis CBaseModelEntity pointer,model_pathis the VMDL model path string - Purpose: Sets the visual model for an entity
- Called by: Entity spawn functions, item drop functions, weapon equip functions
Output YAML Format
The output YAML filename depends on the platform:
- server.dll → CBaseModelEntity_SetModel.windows.yaml
- server.so → CBaseModelEntity_SetModel.linux.yaml
func_va: 0x142de40 # Virtual address of the function - This can change when game updates.
func_rva: 0x142de40 # Relative virtual address (VA - image base) - This can change when game updates.
func_size: 0x3d # 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.
# Supported AI Coding Agents
This skill is compatible with the SKILL.md standard and works with all major AI coding agents:
Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.