UNPKG

il2cpp-dump-analyzer-mcp

Version:

Agentic RAG system for analyzing IL2CPP dump.cs files from Unity games

66 lines (65 loc) 2.23 kB
import { IL2CPPClass, IL2CPPEnum, IL2CPPField, IL2CPPMethod, IL2CPPParameter } from './parser'; /** * Specialized parser for IL2CPP dump.cs files that handles the specific format * and patterns found in IL2CPP decompiled code. */ export declare class IL2CPPDumpParser { private content; protected lines: string[]; private imageMap; /** * Load and parse an IL2CPP dump.cs file * @param filePath Path to the dump.cs file */ loadFile(filePath: string): Promise<void>; /** * Parse the image map at the beginning of the file * These are the DLL references in the format: * // Image 0: holo-game.dll - 0 */ private parseImageMap; /** * Extract all classes from the IL2CPP dump */ extractClasses(): IL2CPPClass[]; /** * Extract all enums from the IL2CPP dump */ extractEnums(): IL2CPPEnum[]; protected parseBaseClass(inheritance: string): string | undefined; protected parseInterfaces(inheritance: string): string[]; protected isInterface(typeName: string): boolean; /** * Parse fields from the class body * @param classBody The full class body text * @returns Array of parsed IL2CPP fields */ protected parseFields(classBody: string): IL2CPPField[]; /** * Parse methods from the class body * @param classBody The full class body text * @returns Array of parsed IL2CPP methods */ protected parseMethods(classBody: string): IL2CPPMethod[]; /** * Parse enum values from the enum body * @param enumBody The full enum body text * @returns Array of enum value pairs */ protected parseEnumValues(enumBody: string): { name: string; value: string; }[]; /** * Parse attributes from attribute string * @param attributesStr String containing attributes in square brackets * @returns Array of attribute names */ protected parseAttributes(attributesStr: string): string[]; /** * Parse method parameters * @param parametersStr String containing method parameters * @returns Array of parsed parameters */ protected parseParameters(parametersStr: string): IL2CPPParameter[]; }