//
// DS_Dictionary::getArrayForKey from 0x100180a90 to 0x100180bf5 (357 bytes)
//
// 8 xrefs:
// > GJRewardItem::createWithCoder @ 0x10008f324
// > GJRewardItem::dataLoaded @ 0x10008f39d
// > DS_Dictionary::getObjectForKey @ 0x100180f7b
// > DS_Dictionary::getDictForKey @ 0x100181db4
// > GameLevelManager::dataLoaded @ 0x10053bd3a
// > GameLevelManager::dataLoaded @ 0x10053c898
// > LocalLevelManager::dataLoaded @ 0x1005f7e7d
// > LocalLevelManager::dataLoaded @ 0x1005f8478
//
// 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)
{
double v3; // xmm0_8
unsigned int v4; // r13d
int v5; // r13d
int v6; // r15d
const char *v7; // rsi
cocos2d::CCObject *ObjectForKey; // rax
__int64 v10; // [rsp+0h] [rbp-50h] BYREF
cocos2d::CCArray *v11; // [rsp+8h] [rbp-48h]
_QWORD v12[2]; // [rsp+10h] [rbp-40h] BYREF
void *__p; // [rsp+20h] [rbp-30h]
if ( !a3 && !DS_Dictionary::stepIntoSubDictWithKey(a1, a2) )
return (cocos2d::CCArray *)sub_10071F9E0(a1, a2);
v11 = (cocos2d::CCArray *)sub_10071F9E0(a1, a2);
DS_Dictionary::removeKey_1(a1, "_isArr");
v12[0] = sub_10063B9B0(&a1->dictTree.__end_[-1]);
if ( sub_10063B3F0(v12) )
{
v4 = 0;
do
{
v10 = sub_10063B780(v12);
v12[0] = sub_10063B780(&v10);
--v4;
}
while ( sub_10063B3F0(v12) );
if ( v4 >= 0x80000001 )
{
v5 = -v4;
v6 = 0;
do
{
DS_Dictionary::getKey(v12, (__int64)a1, v6, v3);
v7 = (char *)v12 + 1;
if ( (v12[0] & 1) != 0 )
v7 = (const char *)__p;
ObjectForKey = DS_Dictionary::getObjectForKey(a1, v7);
if ( ObjectForKey )
sub_10071FCD0(v11, ObjectForKey);
if ( (v12[0] & 1) != 0 )
operator delete(__p);
++v6;
}
while ( v5 != v6 );
}
}
if ( (std::__vector_base
::pointer)((char *)a1->dictTree.__end_ - (char *)a1->dictTree.__begin_) >= (std::__vector_base::pointer)9 )
--a1->dictTree.__end_;
return v11;
}