deep-decompilation

Decompile WMP visualization DLLs and reconstruct COM vtables and state structures with Ghidra.

5|Updated Jul 12, 2026
One-click install
npx skills add https://github.com/kugg/wmp-viz-ports --skill deep-decompilation-kugg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: deep-decompilation
Source: https://github.com/kugg/wmp-viz-ports/tree/main/skills/deep-decompilation
Command: npx skills add https://github.com/kugg/wmp-viz-ports --skill deep-decompilation-kugg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Reverse-engineering legacy Windows Media Player visualization DLLs produces thousands of unnamed functions and raw struct offsets that are unreadable. This Skill provides an end-to-end pipeline to extract, decompile, rename, and reconstruct the internal state structures of these binaries. ## Core Features & Use Cases - Automated Renaming Pipeline: Three sequential scripts rename functions, variables, and struct fields in Ghidra decompiled output, applying over 1,600 field substitutions per file. - COM Vtable Reconstruction: Maps virtual method dispatch offsets to IWMPEffects and IWMPEffects2 interface methods starting from known IUnknown entries. - Systematic Field Identification: Eleven documented techniques (API call-site type inference, allocation size analysis, per-pixel loop decomposition, ARGB pipeline analysis) resolve unknown struct offsets iteratively. - Use Case: Given a TrilogyII.dll extracted from a WMP visualization installer, run the pipeline to produce a fully renamed C decompilation plus a trilogy_state.h struct definition documenting the 53KB visualizer state. ## Quick Start Deep decompile the TrilogyIII.dll visualization binary and reconstruct its state structure with named fields.

Frequently Asked Questions about deep-decompilation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decompile a Windows DLL with Ghidra headless?

Use Ghidra's analyzeHeadless command to import the DLL with the x86:LE:32 processor, then run a postScript like DumpDecompiled.java to decompile all functions to a text file. A 300-second analysis timeout handles DLLs under 200KB.

How to extract DLLs from WMP visualization installer exe files?

WMP visualization installers are MS CAB self-extracting archives, so run cabextract directly on the .exe file. Some installers embed the CAB at a non-standard offset; search for the MSCF magic bytes in a hex editor and extract that slice first.

How do I identify unknown struct fields in decompiled code?

Apply API call-site type inference: every Windows API call constrains its argument types, so a field passed to HeapFree must be a pointer and one passed as BITMAPINFO* reveals its struct type. Combine with allocation size analysis, init patterns, and per-pixel loop decomposition.

Can Ghidra reconstruct COM vtables from a binary?

Yes, by collecting all virtual dispatch patterns like (**(code **)(*param_1 + 0xNN)) and sorting offsets numerically. Map them from known IUnknown entries (QueryInterface at 0x00, AddRef at 0x04, Release at 0x08) to identify interface methods like IWMPEffects Render.

What are the limitations of decompiling WMP visualization DLLs?

DirectDraw rendering is deeply tied to Windows APIs and cannot be directly ported to HLSL or GLSL. COM interface boundaries remain opaque without original SDK headers, and color conversion functions are often inlined so they never appear as distinct functions.