// // CCAnimateFrameCache::addDict_1 from 0x10056c330 to 0x10056c8c3 (1427 bytes) // // 0 xrefs: // // 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::CCDictionary *__fastcall CCAnimateFrameCache::addDict_1( CCAnimateFrameCache *a1, DS_Dictionary *a2, const char *a3) { double v3; // xmm0_8 cocos2d::CCDictionary *m_animateDescriptions; // r14 size_t v6; // rax size_t v7; // r15 char *v8; // r12 size_t v9; // r13 DS_Dictionary *v10; // rbx int v11; // edx const char *v12; // rsi DS_Dictionary *v13; // rdi cocos2d::CCObject *v14; // rbx int v15; // r15d cocos2d::CCString *v16; // rax const char *CString; // r14 size_t v18; // rax size_t v19; // rbx char *v20; // r13 const char *v21; // rsi char *v22; // r14 __int64 v23; // rax size_t v24; // r12 DS_Dictionary *v25; // rbx cocos2d::CCDictionary *v26; // rax int i; // r12d cocos2d::CCDictionary *v28; // r15 const char *v29; // rsi cocos2d::CCObject *v30; // rax cocos2d::CCObject *v31; // rax cocos2d::CCObject *v32; // rax CCAnimateFrameCache *v34; // [rsp+0h] [rbp-A0h] int v35; // [rsp+8h] [rbp-98h] unsigned int NumKeys; // [rsp+Ch] [rbp-94h] cocos2d::CCObject *v37; // [rsp+10h] [rbp-90h] __int64 v38; // [rsp+10h] [rbp-90h] cocos2d::CCDictionary *v39; // [rsp+18h] [rbp-88h] char v40; // [rsp+20h] [rbp-80h] BYREF char v41[15]; // [rsp+21h] [rbp-7Fh] BYREF void *v42; // [rsp+30h] [rbp-70h] unsigned int v43; // [rsp+3Ch] [rbp-64h] __int64 v44; // [rsp+40h] [rbp-60h] BYREF size_t v45; // [rsp+48h] [rbp-58h] void *v46; // [rsp+50h] [rbp-50h] __int128 __dst; // [rsp+58h] [rbp-48h] BYREF void *__p; // [rsp+68h] [rbp-38h] DS_Dictionary *v49; // [rsp+70h] [rbp-30h] v49 = a2; v39 = cocos2d::CCDictionary::create(); v34 = a1; m_animateDescriptions = a1->m_animateDescriptions; v6 = strlen(a3); if ( v6 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(v3); v7 = v6; if ( v6 >= 0x17 ) { v9 = 26; if ( (v6 | 7) != 0x17 ) v9 = (v6 | 7) + 1; v8 = (char *)operator new(v9); __p = v8; *(_QWORD *)&__dst = v9 + 1; *((_QWORD *)&__dst + 1) = v7; goto LABEL_8; } LOBYTE(__dst) = 2 * v6; v8 = (char *)&__dst + 1; if ( v6 ) LABEL_8: memcpy(v8, a3, v7); v8[v7] = 0; cocos2d::CCDictionary::setObject_1((__int64)m_animateDescriptions, v39, (char *)&__dst); if ( (__dst & 1) != 0 ) operator delete(__p); v10 = v49; DS_Dictionary::stepIntoSubDictWithKey(v49, "animationContainer"); NumKeys = DS_Dictionary::getNumKeys(v10); if ( NumKeys ) { v11 = 0; while ( 1 ) { v35 = v11; DS_Dictionary::getKey(&__dst, (__int64)v49, v11, v3); v12 = (char *)&__dst + 1; if ( (__dst & 1) != 0 ) v12 = (const char *)__p; v13 = v49; DS_Dictionary::stepIntoSubDictWithKey(v49, v12); v14 = (cocos2d::CCObject *)sub_10071F9E0(v13, v12); cocos2d::CCDictionary::setObject_1((__int64)v34->m_animateFrames, v14, (char *)&__dst); v37 = v14; v43 = DS_Dictionary::getNumKeys(v49); if ( v43 ) break; LABEL_31: DS_Dictionary::stepOutOfSubDict(v49); if ( (__dst & 1) != 0 ) operator delete(__p); v11 = v35 + 1; if ( v35 + 1 == NumKeys ) goto LABEL_33; } v15 = 0; while ( 1 ) { v16 = (cocos2d::CCString *)sub_1007AB580("sprite_%i", (char)v34); CString = cocos2d::CCString::getCString(v16); v18 = strlen(CString); if ( v18 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100006BF0(v3); v19 = v18; if ( v18 >= 0x17 ) break; LOBYTE(v44) = 2 * v18; v20 = (char *)&v44 + 1; if ( v18 ) goto LABEL_29; BYTE1(v44) = 0; v21 = (char *)&v44 + 1; if ( (v44 & 1) != 0 ) goto LABEL_23; LABEL_24: DS_Dictionary::stepIntoSubDictWithKey(v49, v21); v22 = (char *)operator new(0x68u); cocos2d::CCObject::CCObject((__int64)v22); *(_QWORD *)v22 = off_100964100; sub_10028CC30((_QWORD *)v22 + 7); sub_10028CC30((_QWORD *)v22 + 8); sub_10028CC30((_QWORD *)v22 + 9); *((_QWORD *)v22 + 12) = 0; *((_QWORD *)v22 + 10) = 0; *(_QWORD *)(v22 + 85) = 0; SpriteDescription::initDescription_1((SpriteDescription *)v22, v49); cocos2d::CCObject::autorelease((cocos2d::CCObject *)v22); sub_10071FCD0(v37, v22); DS_Dictionary::stepOutOfSubDict(v49); if ( (v44 & 1) != 0 ) operator delete(v46); if ( v43 == ++v15 ) goto LABEL_31; } v23 = v18 | 7; v24 = 26; if ( (v19 | 7) != 0x17 ) v24 = v23 + 1; v20 = (char *)operator new(v24); v46 = v20; v44 = v24 | 1; v45 = v19; LABEL_29: memmove(v20, CString, v19); v20[v19] = 0; v21 = (char *)&v44 + 1; if ( (v44 & 1) == 0 ) goto LABEL_24; LABEL_23: v21 = (const char *)v46; goto LABEL_24; } LABEL_33: v25 = v49; DS_Dictionary::stepBackToRootSubDict(v49); if ( DS_Dictionary::stepIntoSubDictWithKey(v25, "usedTextures") ) { v26 = cocos2d::CCDictionary::create(); LOBYTE(__dst) = 24; strcpy((char *)&__dst + 1, "usedTextures"); v38 = (__int64)v26; cocos2d::CCDictionary::setObject_1((__int64)v39, v26, (char *)&__dst); if ( (__dst & 1) != 0 ) operator delete(__p); v43 = DS_Dictionary::getNumKeys(v49); if ( v43 ) { for ( i = 0; v43 != i; ++i ) { DS_Dictionary::getKey(&__dst, (__int64)v49, i, v3); v28 = cocos2d::CCDictionary::create(); cocos2d::CCDictionary::setObject_1(v38, v28, (char *)&__dst); v29 = (char *)&__dst + 1; if ( (__dst & 1) != 0 ) v29 = (const char *)__p; DS_Dictionary::stepIntoSubDictWithKey(v49, v29); DS_Dictionary::getStringForKey(&v44, (__int64)v49, "texture", v3); v30 = (cocos2d::CCObject *)sub_1007AB360(&v44); v40 = 14; strcpy(v41, "texture"); cocos2d::CCDictionary::setObject_1((__int64)v28, v30, &v40); if ( (v40 & 1) != 0 ) operator delete(v42); if ( (v44 & 1) != 0 ) operator delete(v46); DS_Dictionary::getStringForKey(&v44, (__int64)v49, "tag", v3); v31 = (cocos2d::CCObject *)sub_1007AB360(&v44); v40 = 6; *(_DWORD *)v41 = 6775156; cocos2d::CCDictionary::setObject_1((__int64)v28, v31, &v40); if ( (v40 & 1) != 0 ) operator delete(v42); if ( (v44 & 1) != 0 ) operator delete(v46); DS_Dictionary::getStringForKey(&v44, (__int64)v49, "customID", v3); if ( (v44 & 1) != 0 ) { if ( !v45 ) goto LABEL_55; } else if ( !((unsigned __int8)v44 >> 1) ) { goto LABEL_55; } v32 = (cocos2d::CCObject *)sub_1007AB360(&v44); v40 = 16; strcpy(v41, "customID"); cocos2d::CCDictionary::setObject_1((__int64)v28, v32, &v40); if ( (v40 & 1) != 0 ) operator delete(v42); LABEL_55: DS_Dictionary::stepOutOfSubDict(v49); if ( (v44 & 1) != 0 ) { operator delete(v46); if ( (__dst & 1) != 0 ) LABEL_59: operator delete(__p); } else if ( (__dst & 1) != 0 ) { goto LABEL_59; } } } } return v39; }