//
// DS_Dictionary::getArrayForKey from 0x5ff814 to 0x5ff894 (128 bytes)
//
// 7 xrefs:
// > GameLevelManager::dataLoaded @ 0x3d8aa6
// > GameLevelManager::dataLoaded @ 0x3d8f48
// > GJRewardItem::dataLoaded @ 0x412a72
// > LocalLevelManager::dataLoaded @ 0x433080
// > LocalLevelManager::dataLoaded @ 0x433294
// > DS_Dictionary::getDictForKey @ 0x5ff5d2
// > DS_Dictionary::getObjectForKey @ 0x5ff75e
//
// 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 *DS_Dictionary::getArrayForKey(DS_Dictionary *a1, const char *a2, bool a3)
{
DS_Dictionary *v3; // r4
int v5; // r6
cocos2d::CCArray *v6; // r5
signed int NumKeys; // r9
cocos2d::CCObject *ObjectForKey; // r1
cocos2d::CCObject *v9; // r2
char *v10[3]; // [sp+0h] [bp-Ch] BYREF
v10[0] = (char *)a1;
v10[1] = (char *)a2;
v10[2] = (char *)a3;
v3 = a1;
if ( !a3 )
{
a1 = (DS_Dictionary *)DS_Dictionary::stepIntoSubDictWithKey(a1, a2);
if ( !a1 )
return cocos2d::CCArray::create(nullptr);
}
v5 = 0;
v6 = cocos2d::CCArray::create((cocos2d::CCArray *)a1);
DS_Dictionary::removeKey(v3, "_isArr");
NumKeys = DS_Dictionary::getNumKeys(v3);
while ( v5 < NumKeys )
{
DS_Dictionary::getKey((DS_Dictionary *)v10, (unsigned int)v3, v5);
ObjectForKey = DS_Dictionary::getObjectForKey(v3, v10[0]);
if ( ObjectForKey )
cocos2d::CCArray::addObject(v6, (cocos2d::_ccArray *)ObjectForKey, v9);
++v5;
sub_774008(v10);
}
DS_Dictionary::stepOutOfSubDict(v3);
return v6;
}