跳到正文
cccskills
免费在 GitHub 公开

find-CCSGameRules_TerminateRound

Find and identify the CCSGameRules::TerminateRound function in the CS2 server binary using IDA Pro MCP. Use this skill when reverse engineering CS2 server.dll or libserver.so to locate the round-end-processing function by finding the code that references both the bare "TerminateRound" debug tag string and the "TerminateRound: unknown round end ID %i\n" warning-format string — both are referenced from the same function. Trigger: CCSGameRules_TerminateRound

中文简介正在准备中。当前显示原文说明。

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md4.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Find CCSGameRules_TerminateRound

Locate CCSGameRules::TerminateRound in CS2 server.dll / libserver.so using IDA Pro MCP tools.

Method

1. Find the TerminateRound Strings

mcp__ida-pro-mcp__find_regex pattern="TerminateRound"

There are exactly two hits:

  • A bare "TerminateRound" string (a debug/log tag, e.g. used in a Msg/net_showmsg-style trace of the function name).
  • "TerminateRound: unknown round end ID %i\n" — a warning format string printed when an invalid round-end reason id is passed in.

2. Get the Referencing Function for Both Strings

mcp__ida-pro-mcp__xrefs_to addr="<bare_TerminateRound_string_addr>"
mcp__ida-pro-mcp__xrefs_to addr="<unknown_round_end_ID_string_addr>"

Both strings are referenced from the exact same function — this agreement is the primary confirmation signal (two independent strings converging on one function is very unlikely to be a coincidence).

Linux 14168 reference: bare "TerminateRound" is at 0x8edd6c, referenced from 0x138538b; "TerminateRound: unknown round end ID %i\n" is at 0x989d78, referenced from 0x1386f93. Both xrefs land inside the same function starting at 0x1385380 (size 0x2063).

3. Sanity-Check the Candidate

mcp__ida-pro-mcp__decompile addr="0x1385380"

Confirm the decompilation is consistent with TerminateRound(int iReason, float flDelay = ...): takes this + an integer round-end-reason parameter (used in a large switch/if-chain that sets round-end state, awards money, updates score, fires round-end events, etc.), plus additional float/optional parameters. The function is large (hundreds of instructions) since it drives most of the end-of-round bookkeeping.

4. Generate Function Signature

ALWAYS Use SKILL /generate-signature-for-function with addr=0x1385380 to generate a robust and unique func_sig.

Linux 14168 reference: generated signature is 55 48 89 E5 41 57 41 89 F7 41 56 48 8D 35 — already unique across the binary at this length (no wildcards needed in the head).

5. Write IDA Analysis Output as YAML

ALWAYS Use SKILL /write-func-as-yaml to write the analysis results.

Required parameters:

  • func_name: CCSGameRules_TerminateRound
  • func_addr: 0x1385380
  • func_sig: The validated signature from step 4

Function Characteristics

  • Purpose: Ends the current round for a given reason id (e.g. bomb defused, T/CT wiped, time expired), driving score updates, money awards, round-end event broadcast, and round-restart scheduling.
  • Binary: server.dll / libserver.so
  • Parameters: (this, unsigned int reason, ...) — additional trailing parameters (observed as __int64, float) control timing/延迟 of the subsequent round restart.
  • Return value: not consumed by callers of interest (bookkeeping side-effects only).

Discovery Strategy

  1. TerminateRound has two distinct, independently-placed string literals in the binary: a bare debug tag and a full warning-format string for the invalid-reason-id error path.
  2. Both strings are referenced from exactly one function each, and — critically — from the same function. This double-string agreement is a strong, code-shape-independent fingerprint that survives compiler refactoring/inlining changes far better than a fixed byte pattern alone would.
  3. The candidate's parameter shape (integer round-end reason + optional delay) and its size (large, since it drives most round-end bookkeeping) are consistent with TerminateRound's known role.

This is robust because two unrelated strings (a log tag and an error message) both trace back to the same function, which is very unlikely to happen by chance for any other function in the binary.

Output YAML Format

The output YAML filename depends on the platform:

  • server.dll -> CCSGameRules_TerminateRound.windows.yaml
  • libserver.so -> CCSGameRules_TerminateRound.linux.yaml

Fields: func_name, func_va, func_rva, func_size, func_sig.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Clean up the local workspace after a dev branch has been merged into main. Verifies the current dev branch is fully merged into origin/main, then switches to main, pulls the latest, deletes the local dev branch, and deletes the remote dev branch if it still exists. STOPS and warns the user if the current branch is not yet merged. Triggers: cleanup workspace, cleanup branch, delete merged branch, finish dev branch, post-merge cleanup

中文简介正在准备中。当前显示原文说明。

mrc4tt/CS2_VibeSignatures32026年10月23日 更新

Convert an existing find-XXXX SKILL.md into a preprocessor Python script, updating configs/<GAMEVER>.yaml and removing the old SKILL.md. Covers xref-string-based and LLM_DECOMPILE-based discovery patterns.

中文简介正在准备中。当前显示原文说明。

mrc4tt/CS2_VibeSignatures32026年10月23日 更新

Create an Agent SKILL.md fallback for an existing find-XXXX finder that relies on a fragile discovery foundation — above all LLM_DECOMPILE (patterns C/D/E), which matches the decompiled shape of a predecessor function against a stored reference and breaks when a symbol is inlined or de-inlined in a way the reference does not cover. The generated fallback coexists with the preprocessor and runs only when it returns failure, recovering every target robustly by decompiling the predecessor and following the inline/de-inline boundary with semantic anchors. Use when a finder broke on a game update, or you want to durably backstop one before it does. The recipe generalizes to any finder foundation. Triggers: create agent skill fallback, add SKILL.md fallback, robust fallback for finder, backstop LLM_DECOMPILE finder, final guarantee skill

中文简介正在准备中。当前显示原文说明。

mrc4tt/CS2_VibeSignatures32026年10月23日 更新

Create a new cpp_tests entry for validating a C++ interface vtable layout against binary reference YAMLs. Creates the .cpp test file in cpp_tests/ and appends a configs/<GAMEVER>.yaml entry under cpp_tests:. Use when a user asks to add vtable layout validation for a new hl2sdk_cs2 interface class.

中文简介正在准备中。当前显示原文说明。

mrc4tt/CS2_VibeSignatures32026年10月23日 更新

create-pr

免费

Create a GitHub pull request from staged task changes or an already-committed current branch. Deliver source/config/ reference changes together with their computed source-owned `bin_artifacts` closure. PR validation routing is owned by the default-branch trusted workflow; snapshots, gamedata, and manifests are Release-derived only.

中文简介正在准备中。当前显示原文说明。

mrc4tt/CS2_VibeSignatures32026年10月23日 更新

Create a new find-XXXX preprocessor Python script from scratch (no existing SKILL.md), add configs/<GAMEVER>.yaml skill and symbol entries. Covers xref-string-based and LLM_DECOMPILE-based discovery patterns. Use when a GitHub issue or user instruction specifies a new function to find.

中文简介正在准备中。当前显示原文说明。

mrc4tt/CS2_VibeSignatures32026年10月23日 更新

查看 mrc4tt 的全部技能

报告此技能的问题