mrc4tt/CS2_VibeSignatures / .claude/skills/find-CEntityInstance_AcceptInput
find-CEntityInstance_AcceptInput
UnverifiedFind and identify the CEntityInstance_AcceptInput function in CS2 binary using IDA Pro MCP. Use this skill when reverse engineering CS2 server.dll / libserver.so to locate the generic Source2 entity I/O input dispatcher by scanning for its distinctive short prologue directly and confirming via decompile that it forwards through the entity's identity pointer into an internal AcceptInputInternal-style dispatcher. Trigger: CEntityInstance_AcceptInput
Find CEntityInstance_AcceptInput
Locate CEntityInstance_AcceptInput in CS2 server.dll / libserver.so using IDA Pro MCP tools.
Method
1. Locate via Direct Byte-Pattern Scan
CEntityInstance::AcceptInput's prologue is short and distinctive (push rbp; mov rbp, rsp; push r14; mov r14, rdi; push r13; lea r13, [rbp+...]), scannable directly across the whole image:
mcp__ida-pro-mcp__find_bytes patterns=["55 48 89 E5 41 56 49 89 FE 41 55 48 8D 7D"]
This returns exactly one hit on the 14168 Linux binary.
2. Confirm via Decompile
mcp__ida-pro-mcp__decompile addr="<candidate_addr>"
Confirm the function:
- Takes 5 parameters:
(CEntityInstance *this, const char *inputName, int a3, int a4, int a5)— i.e.(this, pszInputName, activator, caller, outputId/value). - First builds a wrapped/hashed representation of
inputNamevia a small helper (aCUtlSymbol/string-hash construction). - Reads a pointer at
this + 0x10(this build'sCEntityInstance::m_pEntity, the owningCEntityIdentity*) and tail-calls into an internal dispatcher with(identity, &wrappedInputName, activator, caller, value, 0, 0). The internal dispatcher is the siblingCEntityIdentity_AcceptInputInternal-family function — do not confuse the two;CEntityInstance_AcceptInputis the thin, 1-basic-block, 5-parameter forwarding wrapper onCEntityInstance, not the identity-level or script-level dispatcher.
Linux 14168 reference: candidate at
0x2105860(size0x68, single basic block, 27 direct callers — consistent with a generic per-entity-class I/O forwarding wrapper called from many places across the module).
3. Reject Similarly-Named Symbols
Do not accept a candidate if decompile shows any of the following shapes instead:
CEntityIdentity_AcceptInput— takes aCEntityIdentity*directly asthisrather than forwarding through a+0x10field read.CEntityIdentity_AcceptInputInternal— the larger callee this function tail-calls into; it does the actual named-input hash-table lookup and handler invocation, and is a separate, larger function.CEntityInstance_ScriptAcceptInput— a VScript-facing variant with a different parameter shape (typically script-value-boxed arguments rather than rawints).
4. Generate Function Signature
ALWAYS Use SKILL /generate-signature-for-function with addr=<candidate_addr> to generate a robust and
unique func_sig.
5. Write IDA Analysis Output as YAML
ALWAYS Use SKILL /write-func-as-yaml.
Required parameters:
func_name:CEntityInstance_AcceptInputfunc_addr:<candidate_addr>func_sig: The validated signature from step 4
Function Characteristics
- Purpose: Generic Source2 entity I/O input dispatcher on
CEntityInstance— receives a named input (e.g."Kill","Use"), wraps it, and forwards to the owningCEntityIdentity's internal input-handler lookup/ invocation routine. - Binary:
server.dll/libserver.so - Parameters:
(CEntityInstance *this, const char *pszInputName, CEntityInstance *activator, CEntityInstance *caller, int value)(approximate; exact activator/caller/value typing not fully recovered from the stripped decompile). - Return value: forwarded from the internal dispatcher (not independently observed).
- VTable: none — concrete (non-virtual) forwarding wrapper; the real dispatch/handler-lookup logic lives in the internal callee it tail-calls into.
Discovery Strategy
- The prologue (
push rbp; mov rbp,rsp; push r14; mov r14,rdi; push r13; lea r13,[rbp+...]) is distinctive enough to scan directly withfind_bytesacross the whole image and returns a single hit without needing a resolved anchor. - The 5-parameter shape and the
this+0x10field read into a tail-call are a strong semantic fingerprint for a thinCEntityInstance-level forwarding wrapper, as opposed to the identity-level/script-level siblings with the same "AcceptInput" root name. - The high caller count (27 on this build) is consistent with a generic, widely-used I/O entry point invoked from many different entity classes' logic, further supporting the identification.
This is robust because the prologue byte pattern is unique in the whole 40MB image, and the forwarding shape
(read this+0x10, tail-call with the same arguments plus two trailing zero constants) cleanly distinguishes this
function from its three same-family siblings.
Output YAML Format
The output YAML filename depends on the platform:
server.dll->CEntityInstance_AcceptInput.windows.yamllibserver.so->CEntityInstance_AcceptInput.linux.yaml
Fields: func_name, func_va, func_rva, func_size, func_sig.
Linux 14168 reference: func_sig =
55 48 89 E5 41 56 49 89 FE 41 55 48 8D 7D,func_va = 0x2105860,func_size = 0x68.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 464k | Updated | Claude CodeCodex | Verified | Install |
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 464k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |