Récupérer les vcalls réseau d'InitGameServer

VérifiéSûr

Repli avancé sous IDA Pro pour retrouver les appels virtuels GetUDPPort et IsActiveInGame dans engine2.dll / libengine2.so de CS2 en décompilant CSteam3ServerS1_InitGameServer.

Spar Skills Guide Bot
SecuriteAvancé
09/11/2026
Claude Code
#reverse-engineering#ida-pro#binary-analysis#virtual-calls#cs2-engine

Recommandé pour

Synthèse automatique

Skill de secours qui récupère, via IDA Pro MCP, les emplacements d'appels virtuels indirects INetworkSystem::GetUDPPort et INetworkServerService::IsActiveInGame dans les binaires CS2 engine2.dll / libengine2.so en décompilant CSteam3ServerS1_InitGameServer.

Points forts

  • Reprise idempotente : chaque sortie déjà présente et valide est ignorée, ce qui permet de compléter un run de préprocesseur partiel sans écraser son travail
  • Refuse explicitement les adresses codées en dur et demande de dériver la valeur du slot depuis l'instruction courante, avec vérification sur le binaire réel
  • Prévoit la dérive de code (dé-inlining ou ré-inlining) en imposant l'exploration des appelés directs sur un ou deux niveaux
  • Chaîne d'outils explicite : prérequis via /get-func-from-yaml et écriture via /write-vfunc-as-yaml, avec un tableau d'inventaire des sorties attendues par plateforme

Limites

  • Le fichier est tronqué au milieu de l'étape 2 : la procédure de résolution de INetworkSystem_GetUDPPort s'arrête net, la marche à suivre complète n'est pas lisible
  • Dépend entièrement de la disponibilité d'IDA Pro MCP et du répertoire d'artefacts signalé par l'analyseur
  • Les valeurs de slot citées ne valent que pour les builds 14181 et 14186 et doivent être re-dérivées à chaque nouveau binaire
  • disable-model-invocation est activé : le skill ne se déclenche pas automatiquement et doit être lancé manuellement
Quand l'utiliser

À utiliser lorsque le préprocesseur déterministe ou LLM n'a pas pu résoudre tous les appels de CSteam3ServerS1_InitGameServer et que les YAML de ces deux vcalls manquent encore.

Quand l'éviter

À éviter si le préprocesseur a déjà produit les deux sorties, ou si IDA Pro MCP et le binaire cible ne sont pas disponibles pour vérifier les slots.

Analyse de sécurité

Sûr
Score qualité78/100

The instructions are narrow reverse-engineering workflow steps: decompile a known function, follow indirect virtual calls, compute vtable offsets, and emit YAML. There is no shell execution, no network access, no credential handling, and no attempt to alter agent behavior or bypass safety controls, so listing it carries no meaningful execution risk beyond the privilege of the IDA MCP server it drives.

Points d'attention
  • •No destructive, obfuscated, or exfiltration behavior: the skill only reads a local binary through IDA Pro MCP and writes YAML metadata files into the artifact module directory.
  • •It relies on privileged MCP tooling (decompile, signature generation) and on sibling skills (/get-func-from-yaml, /write-vfunc-as-yaml, /generate-signature-for-vfuncoffset) that are not part of this file, so its actual capabilities depend on tooling granted elsewhere; no allowed-tools were declared, so a host should explicitly scope MCP access before running it.
  • •Target is a proprietary game engine binary (CS2 engine2.dll / libengine2.so); reverse engineering it may conflict with the product's EULA/ToS, which is a legal/policy consideration rather than an execution risk.
Comment cette analyse est faite

Exemples

Run the fallback for both vcalls
The preprocessor failed on CSteam3ServerS1_InitGameServer in the current CS2 engine2.dll. Run the final-guarantee fallback with IDA Pro MCP, skip any output YAML that already exists, and write the missing INetworkSystem_GetUDPPort and INetworkServerService_IsActiveInGame entries.
Follow a de-inlined helper
The decompilation of CSteam3ServerS1_InitGameServer no longer shows the g_pNetworkSystem port-query vcall. Enumerate its direct callees, search one or two levels down, and record the correct vtable slot and index before writing the YAML.
Resume a partial run
An earlier run already wrote INetworkServerService_IsActiveInGame.linux.yaml. Re-run the InitGameServer fallback for the Linux libengine2.so and produce only the remaining INetworkSystem_GetUDPPort output.

name: find-CSteam3ServerS1_InitGameServer-decompiles description: | Final-guarantee fallback for the find-CSteam3ServerS1_InitGameServer-decompiles preprocessor. Recovers the INetworkSystem::GetUDPPort and INetworkServerService::IsActiveInGame indirect virtual-call slots in CS2 engine2.dll / libengine2.so by decompiling CSteam3ServerS1_InitGameServer and following any de-inlined helper. Use when the deterministic/LLM preprocessor could not resolve every call because the containing code moved across an inline boundary. Trigger: INetworkSystem_GetUDPPort, INetworkServerService_IsActiveInGame disable-model-invocation: true

Find InitGameServer network interface calls (final-guarantee fallback)

Recover every output of find-CSteam3ServerS1_InitGameServer-decompiles in CS2 engine2.dll / libengine2.so using IDA Pro MCP. This Agent fallback runs only after the preprocessor fails, so it must produce any missing output itself while preserving outputs that a partial preprocessor run already wrote.

Realworld Function References

Read the platform-relevant reference YAML before searching in IDA. Its addresses, offsets, and signatures are reference-build values only; verify every result against the current binary.

  • ida_preprocessor_scripts/references/engine/CSteam3ServerS1_InitGameServer.windows.yaml
  • ida_preprocessor_scripts/references/engine/CSteam3ServerS1_InitGameServer.linux.yaml

Background and robustness principle

CSteam3ServerS1_InitGameServer initializes the game-server networking state. It queries two 16-bit UDP ports from the network system, then uses INetworkServerService::IsActiveInGame to select which port to retain. Both targets are indirect virtual calls: their YAML identifies the call instruction and vtable slot, not a concrete function body.

First inspect the predecessor itself. If either call is absent, enumerate its direct callees, decompile plausible helpers, and search one or two levels down: an update may de-inline the networking setup into a helper (or inline it back into the predecessor). Identify calls by their receiver globals and neighboring behavior, never by a fixed function address or call-site address.

Output inventory

Both outputs are required on both platforms. The slot values below were observed in builds 14181 and 14186; derive and verify the current value from the instruction before writing YAML.

| Output symbol | Kind | Windows reference | Linux reference | Writer skill | |---|---|---|---|---| | INetworkSystem_GetUDPPort | indirect vcall | INetworkSystem, 0x118, index 35 | INetworkSystem, 0x118, index 35 | /write-vfunc-as-yaml | | INetworkServerService_IsActiveInGame | indirect vcall | CNetworkServerService_vtable, 0xC0, index 24 | CNetworkServerService_vtable, 0xC8, index 25 | /write-vfunc-as-yaml |

Step 0. Skip outputs already produced

For each output, check whether <symbol>.<platform>.yaml already exists in the active artifact module directory and parses as a non-empty mapping. Skip an existing output: the preprocessor or an earlier fallback may have written it. Use the analyzer-reported artifact module directory, not a path derived from the binary directory.

Step 1. Load and decompile the predecessor

ALWAYS use SKILL /get-func-from-yaml with func_name=CSteam3ServerS1_InitGameServer to obtain func_va. If it fails, stop and report the missing prerequisite. Then decompile that address:

mcp__ida-pro-mcp__decompile addr="<CSteam3ServerS1_InitGameServer.func_va>"

Record calls made by the predecessor so that a missing direct pattern can be followed into de-inlined helpers.

Step 2. Resolve INetworkSystem_GetUDPPort

Locate the indirect call qword ptr [vtable + offset] whose receiver is loaded from g_pNetworkSystem. Its distinguishing semantic pattern is the pair of adjacent g_pNetworkSystem port queries that precede the IsActiveInGame call: the target is the one whose 16-bit result is retained when IsActiveInGame returns true. The other port query (GetBoundUDPPort, normally slot 0x110) is retained when it returns false; do not confuse this target with it or with unrelated +0x118 calls on other receivers.

The current call displacement is the vfunc_offset; calculate vfunc_index = vfunc_offset / 8. The reference value is 0x118 on both platforms, but the receiver must be verified as g_pNetworkSystem in the current binary. Use vtable_name=INetworkSystem.

Step 3. Resolve INetworkServerService_IsActiveInGame

Locate the following indirect vcall whose receiver is loaded from g_pNetworkServerService. It returns a boolean used to choose between the two preceding network-system results, before the SteamGameServer_Init() logging path. This receiver-global/data-flow pairing distinguishes it from other virtual calls nearby.

Derive the current displacement and vfunc_index = vfunc_offset / 8. Reference values are Windows 0xC0 / index 24 and Linux 0xC8 / index 25; do not assume them if the current instruction differs. Use vtable_name=CNetworkServerService_vtable, matching the other INetworkServerService_* slot outputs.

Step 4. Generate signatures and write YAML

For each missing target, use /generate-signature-for-vfuncoffset on the resolved call instruction with its verified vfunc_offset. The vfunc_sig must start at that instruction, include the displacement bytes without wildcards, and be unique in the current binary.

Then use /write-vfunc-as-yaml with:

  • artifact_name: the output symbol's legacy file stem
  • func_name: INetworkSystem_GetUDPPortWithFallback for the INetworkSystem_GetUDPPort artifact; otherwise the output symbol unchanged. This call uses the fallback-port accessor, not the separate bound-port method.
  • func_addr=None and func_sig=None (these are call-slot outputs, not function bodies)
  • vfunc_sig: the generated call-instruction signature
  • vfunc_sig_disp=0 (or omit it)
  • vtable_name: INetworkSystem or CNetworkServerService_vtable as identified above
  • vfunc_offset: the verified instruction displacement
  • vfunc_index: vfunc_offset / 8

Do not rename or resolve a concrete implementation address. The expected YAML contains only func_name, vtable_name, vfunc_offset, vfunc_index, and vfunc_sig.

Failure handling

  • If the predecessor YAML is unavailable, stop and report it.
  • If a required call is missing from the predecessor, follow its plausible callees before declaring it unresolved.
  • If one target remains unresolved, write any other verified missing target, then report exactly which output failed.
  • Never write a Windows output while analyzing Linux, or vice versa.

Output YAML filenames

Write under the active artifact module directory:

  • INetworkSystem_GetUDPPort.windows.yaml / INetworkSystem_GetUDPPort.linux.yaml
  • INetworkServerService_IsActiveInGame.windows.yaml / INetworkServerService_IsActiveInGame.linux.yaml

Du fichier au premier essai

Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.

Consulter la source et ses fichiers annexes

Ce téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.

1. Télécharger le fichier

Télécharger SKILL.md

Depuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/recover-initgameserver-network-vcall-slots-mvj1ocie/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.

Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.

mkdir -p '.skill-downloads/recover-initgameserver-network-vcall-slots-mvj1ocie' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/recover-initgameserver-network-vcall-slots-mvj1ocie/download' --output '.skill-downloads/recover-initgameserver-network-vcall-slots-mvj1ocie/SKILL.md.part' && mv '.skill-downloads/recover-initgameserver-network-vcall-slots-mvj1ocie/SKILL.md.part' '.skill-downloads/recover-initgameserver-network-vcall-slots-mvj1ocie/SKILL.md'

2. Vérifier les prérequis

Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.

Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.

Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.

3. Charger la skill

Le fichier ne fournit pas un en-tête name/description exploitable pour cette procédure native. Le téléchargement reste disponible pour lecture ; utilisez le mode manuel ci-dessous.

Mode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.

4. Faire un premier essai

Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :

Lis .skill-downloads/recover-initgameserver-network-vcall-slots-mvj1ocie/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.

Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.

Skills similaires