查找CEntitySystemAddEntityIOEvent

tools-only2026-10-27查看 1183复制 1408

使用 IDA Pro MCP 在 CS2 二进制文件中查找并识别 CEntitySystem_AddEntityIOEvent 函数。在逆向工程 CS2 server.dll 或 server.so 时,通过搜索 "_DisableUpdateTarget" 字符串引用并分析交叉引用来查找以 "SetPosition" 参数调用的函数,从而定位 AddEntityIOEvent 函数,可使用此技能。

Download (.md)

📘如何使用这个技能

  1. 1
    复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
  2. 2
    打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
  3. 3
    粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
  4. 4
    直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景

💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。

SKILL.md3638 chars
---
name: find-CEntitySystem_AddEntityIOEvent
description: Find and identify the CEntitySystem_AddEntityIOEvent function in CS2 binary using IDA Pro MCP. Use this skill when reverse engineering CS2 server.dll or server.so to locate the AddEntityIOEvent function by searching for the "_DisableUpdateTarget" string reference and analyzing cross-references to find the function called with "SetPosition" parameter.
---

# Find CEntitySystem_AddEntityIOEvent

Locate `CEntitySystem_AddEntityIOEvent` in CS2 server.dll or server.so using IDA Pro MCP tools.

## Method

1. Search for the input event string:
   ```
   mcp__ida-pro-mcp__find_regex pattern="_DisableUpdateTarget"
   ```

2. Get cross-references to the string:
   ```
   mcp__ida-pro-mcp__xrefs_to addrs="<string_addr>"
   ```

3. Decompile the referencing functions to find the pattern:
   ```
   mcp__ida-pro-mcp__decompile addr="<function_addr>"
   ```

4. Identify the CEntitySystem_AddEntityIOEvent function:
   - Look for a function that contains calls to a function with "SetPosition" as a parameter
   - The pattern looks like:
     ```c
     sub_XXXXXX(qword_XXXXXX, a1, "_DisableUpdateTarget", a1, a1, 0, 0, 0LL, 0LL);
     // ... setup code ...
     sub_YYYYYYYY(qword_XXXXXX, a1, "SetPosition", a1, a1, &v27, v16, v20, 0LL, 0LL);
     ```
   - The function `sub_YYYYYYYY` called with "SetPosition" parameter is `CEntitySystem_AddEntityIOEvent`

5. Rename the function:
   ```
   mcp__ida-pro-mcp__rename batch={"func": [{"addr": "<function_addr>", "name": "CEntitySystem_AddEntityIOEvent"}]}
   ```

6. Generate and validate unique signature:

   **ALWAYS** Use SKILL `/generate-signature-for-function` to generate a robust and unique signature for the function.

7. 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`: `CEntitySystem_AddEntityIOEvent`
   - `func_addr`: The function address from step 4
   - `func_sig`: The validated signature from step 6

## String References

The function is identified by finding code that:
- Calls `CEntitySystem_FireEntityIOEvent` (or similar) with `"_DisableUpdateTarget"`
- Then calls `CEntitySystem_AddEntityIOEvent` multiple times with `"SetPosition"`
- Finally calls with `"_EnableUpdateTarget"`

## Function Characteristics

- **Parameters**:
  - `arg0`: Entity system pointer (global)
  - `arg1`: Target entity pointer
  - `arg2`: Input name (const char*, e.g., "SetPosition")
  - `arg3`: Activator entity
  - `arg4`: Caller entity
  - `arg5`: Value pointer
  - `arg6`: Delay (float as int)
  - `arg7`: Output ID
  - `arg8`: Reserved (0)
  - `arg9`: Reserved (0)

- **Purpose**: Adds an entity I/O event to be fired after a specified delay

## Related Functions

- `CEntitySystem_FireEntityIOEvent` - Fires entity I/O events immediately (called with "_DisableUpdateTarget", "_EnableUpdateTarget")
- `CEntitySystem_AddEntityIOEvent` - Queues entity I/O events with delay (called with "SetPosition")

## Output YAML Format

The output YAML filename depends on the platform:
- `server.dll` → `CEntitySystem_AddEntityIOEvent.windows.yaml`
- `server.so` → `CEntitySystem_AddEntityIOEvent.linux.yaml`

```yaml
func_va: 0x181170ed0   # Virtual address of the function - This can change when game updates.
func_rva: 0x1170ed0    # Relative virtual address (VA - image base) - This can change when game updates.
func_size: 0x1e3       # 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.
```
来源:skillsdirectory

评论0

登录后参与评论

还没有评论,来抢沙发吧