chausner/PriTools

UnknownProperty0x87CB

Closed this issue · 7 comments

I saw an unknown property. How can I solve it?

This is an issue of XBF decompilation which should be reported and fixed in the original repository: https://github.com/misenhower/XbfAnalyzer. That library was last updated for the Anniversary Update in 2016. It does not know about any new framework types or properties that have been introduced since then. I'll check if we can easily update the type information.

After some reverse engineering, it's looks like GenXBF.dll decode type at const struct MetaDataType *const *__stdcall DirectUI::MetadataAPI::GetBuiltinClassInfoByName() function..

But how to decode enumValues ?

I can post the code which I used to extract the data. It should be all contained in these static tables:

c_aKnownTypeToStableXbfType: WORD[], mapping from c_aTypeNameInfos index to stable xbf type
c_aKnownPropertyToStableXbfProperty: WORD[], mapping from c_aPropertyNames index to stable xbf property

c_aTypeNames: WORD[], entries are indices into c_aTypeNameInfos and c_aTypes

c_aTypeNameInfos: (20 bytes)[]
    wchar* name
    DWORD  nameLength
    wchar* fullName
    DWORD  fullNameLength
    DWORD  namespace index

c_aTypes: (8 bytes)[]

c_aProperties: (16 bytes)[]

c_aPropertyNames: (8 bytes)[]
    wchar* name
    DWORD  nameLength

I'm planning use DbgHelp DLL to query symbol address, then extract data to table.

EnumValue can call GetEnumValueTable() in GenXBF.dll to get.

int GetEnumValueTable(__int16 EnumValue, _DWORD *pCount, const struct XTABLE *const **ppTable)

Yes, I obtained the addresses manually from a debugger but you can probably automate it with dbghelp.dll.

I created a MR at the original repository which updates the type information for the latest Windows SDK. I'll post my code for extracting it tomorrow.

Here is the code I used to extract and generate the tables: https://github.com/chausner/XbfGenExtractor

Thanks for help!