A minor addition to ded32's magnificent answer: I needed to add the following declarations to make it compile:
struct _PMD
{
__int32 mdisp;
__int32 pdisp;
__int32 vdisp;
};
struct CatchableTypeArray
{
__int32 count;
__int32 types[];
};