Find UTIL_ClientPrintAll
Locate UTIL_ClientPrintAll in CS2 server.dll or server.so using IDA Pro MCP tools.
Method
Search for the idle kick string:
mcp__ida-pro-mcp__find_regex pattern="#Game_idle_kick"Get cross-references to the string:
mcp__ida-pro-mcp__xrefs_to addrs="<string_addr>"The xref will point to the idle kick handler function. Decompile it:
mcp__ida-pro-mcp__decompile addr="<function_addr>"In the decompiled code, locate the call that uses
"#Game_idle_kick"as a parameter:sub_XXXXXX(2, (int)"#Game_idle_kick", (int)v16, 0, 0, 0);This
sub_XXXXXXisUTIL_ClientPrintAll.Rename the function:
mcp__ida-pro-mcp__rename batch={"func": [{"addr": "<UTIL_ClientPrintAll_addr>", "name": "UTIL_ClientPrintAll"}]}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-func-as-yamlto write the analysis results.Required parameters:
func_name:UTIL_ClientPrintAllfunc_addr: The function address from step 5func_sig: The validated signature from step 6
String Reference
The function is called with the localization string #Game_idle_kick when a player is kicked for being idle:
UTIL_ClientPrintAll(2, "#Game_idle_kick", player_name, 0, 0, 0);
Function Characteristics
- Purpose: Broadcasts a message to all connected clients
- Parameters:
arg0(int): Message destination type (2 = HUD_PRINTCENTER or similar)arg1(const char*): Localization string or messagearg2(const char*): Parameter 1 (e.g., player name)arg3-arg5: Additional parameters (usually 0)
Function Signature Pattern
The function has a distinctive prologue that saves multiple callee-saved registers:
push rbp
mov rbp, rsp
push r15
mov r15, r9
push r14
mov r14, r8
push r13
mov r13, rcx
push r12
mov r12, rdx
push rbx
lea rbx, [rbp-50h]
sub rsp, 38h
Output YAML Format
The output YAML filename depends on the platform:
server.dll→UTIL_ClientPrintAll.windows.yamlserver.so→UTIL_ClientPrintAll.linux.yaml
func_va: 0x18BD940 # Virtual address of the function - changes with game updates
func_rva: 0x18BD940 # Relative virtual address (VA - image base) - changes with game updates
func_size: 0x85 # Function size in bytes - changes with game updates
func_sig: XX XX XX XX XX # Unique byte signature for pattern scanning - changes with game updates