{"type": "func", "start": 11824840, "end": 11825188, "name": "DS_Dictionary::getArrayForKey", "pseudocode": "// \n// DS_Dictionary::getArrayForKey from 0xb46ec8 to 0xb47024 (348 bytes)\n// \n// 8 xrefs:\n// > GameLevelManager::dataLoaded @ 0x739f38\n// > GameLevelManager::dataLoaded @ 0x73a51c\n// > GJRewardItem::dataLoaded @ 0x7ad6f4\n// > LocalLevelManager::dataLoaded @ 0x7e9730\n// > LocalLevelManager::dataLoaded @ 0x7e9c40\n// > DS_Dictionary::getDictForKey @ 0xb4698c\n// > DS_Dictionary::getObjectForKey @ 0xb46d5c\n// > <???> @ 0x7cec0\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\ncocos2d::CCArray *DS_Dictionary::getArrayForKey(DS_Dictionary *a1, const char *a2, bool a3)\n{\n  DS_Dictionary *v3; // x21\n  cocos2d::CCArray *v4; // x22\n  signed int NumKeys; // w23\n  int i; // w19\n  cocos2d::CCObject *ObjectForKey; // x1\n  cocos2d::CCObject *v8; // x2\n  char *v9; // x0\n  unsigned int *v10; // x1\n  int v11; // w2\n  const char *v13; // [xsp+70h] [xbp+70h] BYREF\n\n  v3 = a1;\n  if ( !a3 )\n  {\n    a1 = (DS_Dictionary *)DS_Dictionary::stepIntoSubDictWithKey(a1, a2);\n    if ( !(_BYTE)a1 )\n      return cocos2d::CCArray::create((cocos2d::CCArray *)a1);\n  }\n  v4 = cocos2d::CCArray::create((cocos2d::CCArray *)a1);\n  DS_Dictionary::removeKey(v3, \"_isArr\");\n  NumKeys = DS_Dictionary::getNumKeys(v3);\n  if ( NumKeys > 0 )\n  {\n    for ( i = 0; i != NumKeys; ++i )\n    {\n      DS_Dictionary::getKey((__int64 *)&v13, v3, i);\n      ObjectForKey = DS_Dictionary::getObjectForKey(v3, v13);\n      if ( ObjectForKey )\n        cocos2d::CCArray::addObject(v4, (cocos2d::_ccArray *)ObjectForKey, v8);\n      v9 = (char *)(v13 - 24);\n      if ( v13 - 24 != (const char *)&qword_124B6B0 )\n      {\n        if ( &pthread_create )\n        {\n          v10 = (unsigned int *)(v13 - 8);\n          do\n            v11 = __ldaxr(v10);\n          while ( __stlxr(v11 - 1, v10) );\n        }\n        else\n        {\n          v11 = *((_DWORD *)v13 - 2);\n          *((_DWORD *)v13 - 2) = v11 - 1;\n        }\n        if ( v11 <= 0 )\n          operator delete(v9);\n      }\n    }\n  }\n  DS_Dictionary::stepOutOfSubDict(v3);\n  return v4;\n}", "assembly": "; \n; DS_Dictionary::getArrayForKey from 0xb46ec8 to 0xb47024 (348 bytes)\n; \n; 8 xrefs:\n; > GameLevelManager::dataLoaded @ 0x739f38\n; > GameLevelManager::dataLoaded @ 0x73a51c\n; > GJRewardItem::dataLoaded @ 0x7ad6f4\n; > LocalLevelManager::dataLoaded @ 0x7e9730\n; > LocalLevelManager::dataLoaded @ 0x7e9c40\n; > DS_Dictionary::getDictForKey @ 0xb4698c\n; > DS_Dictionary::getObjectForKey @ 0xb46d5c\n; > <???> @ 0x7cec0\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSTP             X29, X30, [SP,#var_80]!                                ; +0x0, 0xb46ec8\nUXTB            W2, W2                                                 ; +0x4, 0xb46ecc\nMOV             X29, SP                                                ; +0x8, 0xb46ed0\nSTP             X25, X26, [SP,#0x80+var_40]                            ; +0xc, 0xb46ed4\nADRP            X25, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0xb46ed8\nSTR             X27, [SP,#0x80+var_30]                                 ; +0x14, 0xb46edc\nSTP             X21, X22, [SP,#0x80+var_60]                            ; +0x18, 0xb46ee0\nSTP             X19, X20, [SP,#0x80+var_70]                            ; +0x1c, 0xb46ee4\nLDR             X3, [X25,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x20, 0xb46ee8\nMOV             X21, X0                                                ; +0x24, 0xb46eec\nSTP             X23, X24, [SP,#0x80+var_50]                            ; +0x28, 0xb46ef0\nLDR             X3, [X3]                                               ; +0x2c, 0xb46ef4\nSTR             X3, [X29,#0x80+var_8]                                  ; +0x30, 0xb46ef8\nCBZ             W2, loc_B46FFC                                         ; +0x34, 0xb46efc\nBL              _ZN7cocos2d7CCArray6createEv; cocos2d::CCArray::create(void) ; +0x38, 0xb46f00\nMOV             X22, X0                                                ; +0x3c, 0xb46f04\nADRP            X1, #aIsarr@PAGE; \"_isArr\"                             ; +0x40, 0xb46f08\nMOV             X0, X21; this                                          ; +0x44, 0xb46f0c\nADD             X1, X1, #aIsarr@PAGEOFF; \"_isArr\"                      ; +0x48, 0xb46f10\nBL              _ZN13DS_Dictionary9removeKeyEPKc; DS_Dictionary::removeKey(char const*) ; +0x4c, 0xb46f14\nMOV             X0, X21; this                                          ; +0x50, 0xb46f18\nBL              _ZN13DS_Dictionary10getNumKeysEv; DS_Dictionary::getNumKeys(void) ; +0x54, 0xb46f1c\nCMP             W0, WZR                                                ; +0x58, 0xb46f20\nMOV             W23, W0                                                ; +0x5c, 0xb46f24\nB.LE            loc_B46FC0                                             ; +0x60, 0xb46f28\nMOV             W19, #0                                                ; +0x64, 0xb46f2c\nADD             X20, X29, #0x80+var_10                                 ; +0x68, 0xb46f30\nADRP            X24, #off_122EFE8@PAGE                                 ; +0x6c, 0xb46f34\nADRP            X26, #pthread_create_ptr_0@PAGE                        ; +0x70, 0xb46f38\nADD             X27, X29, #0x80+var_18                                 ; +0x74, 0xb46f3c\nB               loc_B46F50                                             ; +0x78, 0xb46f40\nADD             W19, W19, #1                                           ; +0x7c, 0xb46f44\nCMP             W23, W19                                               ; +0x80, 0xb46f48\nB.EQ            loc_B46FC0                                             ; +0x84, 0xb46f4c\nMOV             X8, X20                                                ; +0x88, 0xb46f50\nMOV             W1, W19; unsigned int                                  ; +0x8c, 0xb46f54\nMOV             X0, X21; this                                          ; +0x90, 0xb46f58\nBL              _ZN13DS_Dictionary6getKeyEj; DS_Dictionary::getKey(uint) ; +0x94, 0xb46f5c\nLDR             X1, [X20]; char *                                      ; +0x98, 0xb46f60\nMOV             X0, X21; this                                          ; +0x9c, 0xb46f64\nBL              _ZN13DS_Dictionary15getObjectForKeyEPKc; DS_Dictionary::getObjectForKey(char const*) ; +0xa0, 0xb46f68\nMOV             X1, X0; cocos2d::CCObject *                            ; +0xa4, 0xb46f6c\nCBZ             X0, loc_B46F7C                                         ; +0xa8, 0xb46f70\nMOV             X0, X22; this                                          ; +0xac, 0xb46f74\nBL              _ZN7cocos2d7CCArray9addObjectEPNS_8CCObjectE; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0xb0, 0xb46f78\nLDR             X1, [X20]                                              ; +0xb4, 0xb46f7c\nLDR             X2, [X24,#off_122EFE8@PAGEOFF]; qword_124B6B0          ; +0xb8, 0xb46f80\nSUB             X0, X1, #0x18; p                                       ; +0xbc, 0xb46f84\nCMP             X0, X2                                                 ; +0xc0, 0xb46f88\nB.EQ            loc_B46F44                                             ; +0xc4, 0xb46f8c\nLDR             X2, [X26,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xc8, 0xb46f90\nCBZ             X2, loc_B47010                                         ; +0xcc, 0xb46f94\nSUB             X1, X1, #8                                             ; +0xd0, 0xb46f98\nLDAXR           W2, [X1]                                               ; +0xd4, 0xb46f9c\nSUB             W3, W2, #1                                             ; +0xd8, 0xb46fa0\nSTLXR           W4, W3, [X1]                                           ; +0xdc, 0xb46fa4\nCBNZ            W4, loc_B46F9C                                         ; +0xe0, 0xb46fa8\nCMP             W2, WZR                                                ; +0xe4, 0xb46fac\nB.GT            loc_B46F44                                             ; +0xe8, 0xb46fb0\nMOV             X1, X27                                                ; +0xec, 0xb46fb4\nBL              j__ZdlPv; operator delete(void *)                      ; +0xf0, 0xb46fb8\nB               loc_B46F44                                             ; +0xf4, 0xb46fbc\nMOV             X0, X21; this                                          ; +0xf8, 0xb46fc0\nBL              _ZN13DS_Dictionary16stepOutOfSubDictEv; DS_Dictionary::stepOutOfSubDict(void) ; +0xfc, 0xb46fc4\nMOV             X0, X22; this                                          ; +0x100, 0xb46fc8\nLDR             X25, [X25,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x104, 0xb46fcc\nLDR             X19, [X29,#0x80+var_8]                                 ; +0x108, 0xb46fd0\nLDR             X1, [X25]; char *                                      ; +0x10c, 0xb46fd4\nCMP             X19, X1                                                ; +0x110, 0xb46fd8\nB.NE            loc_B47020                                             ; +0x114, 0xb46fdc\nLDP             X19, X20, [SP,#0x80+var_70]                            ; +0x118, 0xb46fe0\nLDP             X21, X22, [SP,#0x80+var_60]                            ; +0x11c, 0xb46fe4\nLDP             X23, X24, [SP,#0x80+var_50]                            ; +0x120, 0xb46fe8\nLDP             X25, X26, [SP,#0x80+var_40]                            ; +0x124, 0xb46fec\nLDR             X27, [SP,#0x80+var_30]                                 ; +0x128, 0xb46ff0\nLDP             X29, X30, [SP+0x80+var_80],#0x80                       ; +0x12c, 0xb46ff4\nRET                                                                    ; +0x130, 0xb46ff8\nBL              _ZN13DS_Dictionary22stepIntoSubDictWithKeyEPKc; DS_Dictionary::stepIntoSubDictWithKey(char const*) ; +0x134, 0xb46ffc\nUXTB            W0, W0; this                                           ; +0x138, 0xb47000\nCBNZ            W0, loc_B46F00                                         ; +0x13c, 0xb47004\nBL              _ZN7cocos2d7CCArray6createEv; cocos2d::CCArray::create(void) ; +0x140, 0xb47008\nB               loc_B46FCC                                             ; +0x144, 0xb4700c\nLDUR            W2, [X1,#-8]                                           ; +0x148, 0xb47010\nSUB             W3, W2, #1                                             ; +0x14c, 0xb47014\nSTUR            W3, [X1,#-8]                                           ; +0x150, 0xb47018\nB               loc_B46FAC                                             ; +0x154, 0xb4701c\nBL              .__stack_chk_fail                                      ; +0x158, 0xb47020", "xrefs": ["GameLevelManager::dataLoaded @ 0x739f38", "GameLevelManager::dataLoaded @ 0x73a51c", "GJRewardItem::dataLoaded @ 0x7ad6f4", "LocalLevelManager::dataLoaded @ 0x7e9730", "LocalLevelManager::dataLoaded @ 0x7e9c40", "DS_Dictionary::getDictForKey @ 0xb4698c", "DS_Dictionary::getObjectForKey @ 0xb46d5c", "<???> @ 0x7cec0"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}