//
// sub_1000D47B4 from 0x1000d47b4 to 0x1000d4860 (172 bytes)
//
// 2 xrefs:
// > LocalLevelManager::tryRecoverAutoSaves @ 0x10025fdcc
// > LocalLevelManager::importLevelsFromPaths @ 0x1002616bc
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:58:55 +0000
//
void *__fastcall sub_1000D47B4(__int64 a1)
{
__int64 v1; // x8
_QWORD *v3; // x19
int v4; // w0
void *v5; // x20
void *v6; // x0
void *v7; // x0
v1 = *(unsigned __int8 *)(a1 + 23);
if ( (v1 & 0x80u) != 0LL )
v1 = *(_QWORD *)(a1 + 8);
if ( !v1 )
return nullptr;
v3 = operator new(0xF0u);
j_DS_Dictionary::DS_Dictionary();
if ( (unsigned int)DS_Dictionary::loadRootSubDictFromString(v3, a1)
&& (DS_Dictionary::getIntegerForKey(v3, "kCEK"), v4 == 4) )
{
v5 = GJGameLevel::create_1();
GJGameLevel::dataLoaded((__int64)v5, (__int64)v3);
}
else
{
v5 = nullptr;
}
v6 = (void *)v3[26];
if ( v6 )
{
v3[27] = v6;
operator delete(v6);
}
v7 = (void *)pugi::xml_document::dxml_document(v3);
operator delete(v7);
return v5;
}