//
// DS_Dictionary::getArrayForKey from 0x10016270c to 0x10016280c (256 bytes)
//
// 7 xrefs:
// > GameLevelManager::dataLoaded @ 0x10009b620
// > GameLevelManager::dataLoaded @ 0x10009bbac
// > DS_Dictionary::getObjectForKey @ 0x1001629e8
// > DS_Dictionary::getDictForKey @ 0x1001631ac
// > LocalLevelManager::dataLoaded @ 0x1001c9334
// > LocalLevelManager::dataLoaded @ 0x1001c9678
// > GJRewardItem::dataLoaded @ 0x1003401e4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
cocos2d::CCArray *__fastcall DS_Dictionary::getArrayForKey(DS_Dictionary *a1, const char *a2, bool a3)
{
DS_Dictionary *v3; // x19
cocos2d::CCArray *v4; // x20
signed int NumKeys; // w0
signed int v6; // w21
int i; // w22
void **v8; // x1
cocos2d::CCObject *ObjectForKey; // x1
std::__vector_base
::pointer end; // x8
void *__p[2]; // [xsp+8h] [xbp-48h] BYREF
char v13; // [xsp+1Fh] [xbp-31h]
v3 = a1;
if ( !a3 )
{
a1 = (DS_Dictionary *)DS_Dictionary::stepIntoSubDictWithKey(a1, a2);
if ( !(_DWORD)a1 )
return (cocos2d::CCArray *)sub_10024A15C(a1);
}
v4 = (cocos2d::CCArray *)sub_10024A15C(a1);
DS_Dictionary::removeKey(v3, "_isArr");
NumKeys = DS_Dictionary::getNumKeys(v3);
if ( NumKeys >= 1 )
{
v6 = NumKeys;
for ( i = 0; i != v6; ++i )
{
DS_Dictionary::getKey((__int64)v3, i, __p);
if ( v13 >= 0 )
v8 = __p;
else
v8 = (void **)__p[0];
ObjectForKey = DS_Dictionary::getObjectForKey(v3, (const char *)v8);
if ( ObjectForKey )
sub_10024A2D0(v4, ObjectForKey);
if ( v13 < 0 )
operator delete(__p[0]);
}
}
end = v3->dictTree.__end_;
if ( (unsigned __int64)((char *)end - (char *)v3->dictTree.__begin_) >= 9 )
v3->dictTree.__end_ = end - 1;
return v4;
}