Skip to content

Wrong metadata usage list offset? #16

@TheRealJunior

Description

@TheRealJunior

Dealing with this global-metadata.dat file:
https://www.sendspace.com/file/ji1e05

Getting weird values in this code section (inside InitializeMethodMetadata):

const Il2CppMetadataUsageList* metadataUsageLists = MetadataOffset<const Il2CppMetadataUsageList*>(s_GlobalMetadata, s_GlobalMetadataHeader->metadataUsageListsOffset, index);

uint32_t start = metadataUsageLists->start;
uint32_t count = metadataUsageLists->count;


std::cout << "InitializeMethodMetadata(start=" <<  start << ", count=" << count << ')' <<  std::endl;

Program output:

InitializeMethodMetadata(start=158, count=1073751607)
il2cpp_dumper: main.cpp:249: void InitializeMethodMetadata(uint32_t): Assertion `s_GlobalMetadataHeader->metadataUsagePairsCount >= 0 && offset <= static_cast<uint32_t>(s_GlobalMetadataHeader->metadataUsagePairsCount)' failed.

Analysis of the il2cpp binary:
After applying the Il2cppGlobalMetadataHeader struct, the divisions don't make sense.
For example: typeDefintionCount / 92 when sizeof(Il2cppTypeDefintion) != 92

(The il2cpp binary is 32 bit)

Global metadata file version is 24.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions