// // CCAnimateFrameCache::addDict from 0x140045240 to 0x14004585b (1563 bytes) // // 2 xrefs: // > CCAnimateFrameCache::addSpriteFramesWithFile @ 0x140045213 // > @ 0x14090f818 // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:25:31 +0000 // // Hidden C++ exception states: #wind=8 __int64 __fastcall CCAnimateFrameCache::addDict(__int64 a1, DS_Dictionary *a2, _BYTE *a3) { __int64 v5; // rdi __int64 v6; // r14 size_t v7; // r8 void *v8; // rcx unsigned int NumKeys; // r13d unsigned int v10; // ebx unsigned int v11; // r12d const char *v12; // rdx __int64 v13; // rcx cocos2d::CCArray *v14; // r15 unsigned int v15; // r14d unsigned int i; // edi cocos2d::CCString *v17; // rax const char *CString; // rax size_t v19; // r8 void **v20; // rdx char *v21; // rbx void *v22; // rcx __int64 v23; // r15 void *v24; // rcx unsigned int v25; // r14d __int64 v26; // rdi const char *v27; // rdx __int64 StringForKey; // rax __int64 v29; // rax __int64 v30; // rax __int64 v31; // rax void *v32; // rcx __int64 v33; // rax void *v34; // rcx __int64 v36; // [rsp+30h] [rbp-79h] void *Block[2]; // [rsp+48h] [rbp-61h] BYREF __int64 v39; // [rsp+58h] [rbp-51h] unsigned __int64 v40; // [rsp+60h] [rbp-49h] _QWORD v41[3]; // [rsp+68h] [rbp-41h] BYREF unsigned __int64 v42; // [rsp+80h] [rbp-29h] _BYTE v43[16]; // [rsp+88h] [rbp-21h] BYREF __int64 v44; // [rsp+98h] [rbp-11h] _BYTE v45[32]; // [rsp+A8h] [rbp-1h] BYREF v5 = a1; v6 = cocos2d::CCDictionary::create(); v36 = v6; *(_OWORD *)Block = 0; v39 = 0; v40 = 0; v7 = -1; do ++v7; while ( a3[v7] ); sub_14003D230(Block, a3, v7); cocos2d::CCDictionary::setObject(*(_QWORD *)(v5 + 72), v6, Block); if ( v40 > 0xF ) { v8 = Block[0]; if ( v40 + 1 >= 0x1000 ) { v8 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v8); } DS_Dictionary::stepIntoSubDictWithKey(a2, "animationContainer"); NumKeys = DS_Dictionary::getNumKeys(a2); v10 = 0; v11 = 0; if ( NumKeys ) { while ( 1 ) { DS_Dictionary::getKey(a2, v41, v11); v12 = (const char *)v41; if ( v42 > 0xF ) v12 = (const char *)v41[0]; DS_Dictionary::stepIntoSubDictWithKey(a2, v12); v14 = (cocos2d::CCArray *)cocos2d::CCArray::create(v13); cocos2d::CCDictionary::setObject(*(_QWORD *)(v5 + 56), v14, v41); v15 = DS_Dictionary::getNumKeys(a2); for ( i = 0; i < v15; v10 = 0 ) { v17 = cocos2d::CCString::createWithFormat("sprite_%i", i); CString = cocos2d::CCString::getCString(v17); *(_OWORD *)Block = 0; v39 = 0; v40 = 0; v19 = -1; do ++v19; while ( CString[v19] ); sub_14003D230(Block, CString, v19); v20 = Block; if ( v40 > 0xF ) v20 = (void **)Block[0]; DS_Dictionary::stepIntoSubDictWithKey(a2, (const char *)v20); v21 = (char *)operator new(0x68u); cocos2d::CCObject::CCObject((cocos2d::CCObject *)v21); *(_QWORD *)v21 = &SpriteDescription::`vftable'; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v21 + 56)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v21 + 64)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)(v21 + 72)); *((_QWORD *)v21 + 10) = 0; *((_DWORD *)v21 + 22) = 0; v21[92] = 0; *((_QWORD *)v21 + 12) = 0; if ( (unsigned __int8)SpriteDescription::initDescription(v21, a2) ) { cocos2d::CCObject::autorelease((cocos2d::CCObject *)v21); } else { (*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v21 + 8LL))(v21, 1); v21 = nullptr; } cocos2d::CCArray::addObject(v14, (struct cocos2d::CCObject *)v21); DS_Dictionary::stepOutOfSubDict(a2); if ( v40 > 0xF ) { v22 = Block[0]; if ( v40 + 1 >= 0x1000 ) { v22 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v22 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v22); } ++i; } DS_Dictionary::stepOutOfSubDict(a2); sub_14003D310((__int64)v41); if ( ++v11 >= NumKeys ) break; v5 = a1; } v6 = v36; } DS_Dictionary::stepBackToRootSubDict(a2); if ( DS_Dictionary::stepIntoSubDictWithKey(a2, "usedTextures") ) { v23 = cocos2d::CCDictionary::create(); v39 = 12; v40 = 15; Block[0] = *(void **)"usedTextures"; Block[1] = (void *)*(unsigned int *)"ures"; cocos2d::CCDictionary::setObject(v6, v23, Block); if ( v40 > 0xF ) { v24 = Block[0]; if ( v40 + 1 >= 0x1000 ) { v24 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v24 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v24); } v25 = DS_Dictionary::getNumKeys(a2); if ( v25 ) { do { DS_Dictionary::getKey(a2, v41, v10); v26 = cocos2d::CCDictionary::create(); cocos2d::CCDictionary::setObject(v23, v26, v41); v27 = (const char *)v41; if ( v42 > 0xF ) v27 = (const char *)v41[0]; DS_Dictionary::stepIntoSubDictWithKey(a2, v27); Block[1] = nullptr; v39 = 7; v40 = 15; Block[0] = (void *)0x65727574786574LL; StringForKey = DS_Dictionary::getStringForKey(a2, v45, &qword_140707588); v29 = cocos2d::CCString::create(StringForKey); cocos2d::CCDictionary::setObject(v26, v29, Block); sub_14003D310((__int64)v45); sub_14003D310((__int64)Block); *(_OWORD *)Block = 0; v39 = 3; v40 = 15; LODWORD(Block[0]) = 6775156; v30 = DS_Dictionary::getStringForKey(a2, v45, &dword_140707590); v31 = cocos2d::CCString::create(v30); cocos2d::CCDictionary::setObject(v26, v31, Block); sub_14003D310((__int64)v45); if ( v40 > 0xF ) { v32 = Block[0]; if ( v40 + 1 >= 0x1000 ) { v32 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v32 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v32); } DS_Dictionary::getStringForKey(a2, v43, "customID"); if ( v44 ) { Block[1] = nullptr; v39 = 8; v40 = 15; Block[0] = *(void **)"customID"; v33 = cocos2d::CCString::create(v43); cocos2d::CCDictionary::setObject(v26, v33, Block); if ( v40 > 0xF ) { v34 = Block[0]; if ( v40 + 1 >= 0x1000 ) { v34 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v34 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v34); } } DS_Dictionary::stepOutOfSubDict(a2); sub_14003D310((__int64)v43); sub_14003D310((__int64)v41); ++v10; } while ( v10 < v25 ); } } return v36; }
GD Web Decomp Icon

GD Web Decomp

Raw Source