# Data Type Investigation Quick Prompt

Investigate how each function parameter is used across ALL functions using that parameter to identify its true data type. Start by searching for functions with generic pointer types (int *, void *, uint *) and analyzing their offset access patterns—document every offset accessed, the data type inferred from usage, and which functions access each field. Build a master offset map merging all function analyses, then search for existing structures matching the field offset layout using list_data_types() and search_data_types(). If an existing structure matches, verify field offsets align with your offset map and total size matches expected stride or allocation size. If no match exists, create a new structure using create_struct() with proper field types determined from your offset analysis, starting from offset 0x0 and continuing through the highest offset accessed, adding padding fields for unknown regions. Apply the identified structure type to ALL functions using that parameter via set_parameter_type(), verify each application with get_function_variables(), and refresh decompilation with get_decompiled_code(refresh_cache=True). Verify completeness by confirming: (1) all functions using the structure type are identified and updated, (2) structure field offsets match actual assembly access patterns in each function, (3) field types are consistent across all accessor functions, (4) total structure size matches expected stride values or allocation sizes, (5) alignment and padding are correct, and (6) cross-function type consistency shows all functions access fields in compatible ways. Create helper structures for complex related types serving different purposes (e.g., SkillTableEntry for static data, SkillObject for runtime state), using identity-based names that describe what the object IS rather than temporary states (UnitAny not InitializedUnit, Skill not ProcessedSkill). Document results with offset tables showing Offset, Size, Field Name, Type, Description, and which functions access each field, confirming all structure accesses are properly typed and consistent throughout the codebase.
