Imported from mrc4tt/CS2_VibeSignatures (
.claude/skills/find-CEntitySaveRestoreBlockHandler_PreSave/SKILL.md). Install upstream withnpx skills add mrc4tt/CS2_VibeSignatures --skill find-CEntitySaveRestoreBlockHandler_PreSave. Copyright stays with the author.
Find CEntitySaveRestoreBlockHandler_PreSave
Target: CEntitySaveRestoreBlockHandler::PreSave (vfunc) in the module loaded in THIS session.
The old artifact/preprocessor anchors no longer match this build. Use anchors only to locate candidates; derive the artifact from the ACTUAL bytes you read. Produce ONLY this session's platform output. NEVER open another binary.
Method
Resolve the owning class vtable via RTTI (typeinfo-name string -> _ZTI object -> vtable). Identify the slot by xrefs from expected call sites. Slots commonly differ between platforms - never assume identical indices.
Mandatory self-check before emitting
The pipeline re-reads the bytes at your func_va and regenerates func_sig from
them - a mismatch aborts the run. Therefore: read the real bytes via IDA MCP,
derive the artifact FROM those bytes (wildcard relocated operands as ??), start
at the TRUE function head, and only then write the YAML. A mismatch is always a
bug in YOUR output.
Output schema (STRICT)
Write CEntitySaveRestoreBlockHandler_PreSave.{platform}.yaml with EXACTLY these fields:
func_name: <TASK>
func_va: "<hex virtual address>"
func_rva: "<hex rva>"
func_size: "<hex size>"
vtable_name: <owning class RTTI name>
vfunc_offset: "<hex vtable byte offset>"
vfunc_index: <decimal slot index>
NEVER include func_sig.
Verification
- Decompile and confirm the behavior matches the symbol's semantics.
- Uniqueness: the pattern must match exactly ONE location in the loaded binary.
- If no candidate can be confirmed, report the shortlist - a skipped symbol is safer than a wrong signature.