1. enum kTypes
    2. {
    3. kType_Pointer = 53,
    4. kType_Array = 65
    5. };
    6. class ClassInfo
    7. {
    8. public:
    9. static ClassInfo* GetInstance()
    10. {
    11. static ClassInfo** instance = NULL;
    12. if (!instance)
    13. {
    14. DWORD_PTR dwMatch = FindPattern((DWORD_PTR)GetModuleHandle(NULL), -1, 0, false, (BYTE*)"\x48\x8B\x05\x00\x00\x00\x00\x48\x89\x41\x08\x48\x89\x0D\x00\x00\x00\x00\xC3", "xxx????xxxxxxx????x");
    15. if (!dwMatch)
    16. return NULL;
    17. DWORD_PTR dwOffset = *(DWORD*)(dwMatch + 3);
    18. BYTE* first = (BYTE*)&dwOffset;
    19. if (first[3] == 0xFF)
    20. dwOffset = dwOffset + 0xFFFFFFFF00000000;
    21. DWORD_PTR dwOffset2 = (dwMatch + 7);
    22. instance = (ClassInfo**)(dwOffset + dwOffset2);
    23. Log("Instance found at 0x%016llX", instance );
    24. }
    25. return *instance;
    26. }
    27. TypeInfo* typeInfo; // 0x0000
    28. ClassInfo* next; // 0x0008
    29. unsigned short id; // 0x0010
    30. unsigned short isDataContainer; // 0x0012
    31. char pad_0x0014[0x4]; // 0x0014
    32. ClassInfo* parent; // 0x0018
    33. char pad_0x0020[0x8]; // 0x0020
    34. unsigned short id3; // 0x0028
    35. char pad_0x002C[0x94]; // 0x002C
    36. };//Size=0x00C0
    37. class TypeInfo
    38. {
    39. public:
    40. char* name; // 0x0000
    41. unsigned short flags; // 0x0008
    42. unsigned short totalSize; // 0x000A
    43. char pad_0x000C[0x4]; // 0x000C
    44. unsigned short flags2; // 0x0010
    45. char pad_0x0012[0x6]; // 0x0012
    46. unsigned short alignment; // 0x0018
    47. unsigned short fieldCount; // 0x001A
    48. char pad_0x001C[0x4]; // 0x001C
    49. FieldInfo* enumFields; // 0x0020
    50. FieldInfo* structFields; // 0x0028
    51. FieldInfo* fields; // 0x0030
    52. };//Size=0x0038
    53. class MemberInfoFlags
    54. {
    55. public:
    56. unsigned short flagBits; // this+0x0
    57. enum
    58. {
    59. kMemberTypeMask = 0x3, // constant 0x3
    60. kTypeCategoryShift = 0x2, // constant 0x2
    61. kTypeCategoryMask = 0x3, // constant 0x3
    62. kTypeCodeShift = 0x4, // constant 0x4
    63. kTypeCodeMask = 0x1F, // constant 0x1F
    64. kMetadata = 0x800, // constant 0x800
    65. kHomogeneous = 0x1000, // constant 0x1000
    66. kAlwaysPersist = 0x2000, // constant 0x2000
    67. kExposed = 0x2000, // constant 0x2000
    68. kLayoutImmutable = 0x4000, // constant 0x4000
    69. kBlittable = 0xFFFF8000 // constant 0xFFFF8000
    70. };
    71. };
    72. enum TypeFlags
    73. {
    74. kTypeFlag_Enum = 0xC000
    75. };
    76. class MemberTypeInfo
    77. {
    78. public:
    79. TypeInfo* typeInfo; // 0x0000
    80. unsigned short flags; // 0x0008
    81. char pad[0x8]; // 0x000A
    82. };
    83. class FieldInfo
    84. {
    85. public:
    86. int GetFieldSize()
    87. {
    88. if (!typeInfo)
    89. return 0;
    90. TypeInfo* ti = typeInfo->typeInfo;
    91. switch (ti->flags)
    92. {
    93. case kType_Pointer:
    94. return 8;
    95. case kType_Array:
    96. return 8;
    97. default:
    98. return ti->totalSize;
    99. }
    100. }
    101. char* name;
    102. MemberInfoFlags flags;
    103. unsigned short offset;
    104. char pad[0x4];
    105. MemberTypeInfo* typeInfo;
    106. };
    107. class FieldInfoEnum
    108. {
    109. public:
    110. char* name;
    111. MemberInfoFlags flags;
    112. unsigned short offset;
    113. char pad[0x4];
    114. __int32 value;
    115. char pad2[0x4];
    116. };