// // cocos2d::CCAnimationCache::parseVersion2 from 0xd855d8 to 0xd859b4 (988 bytes) // // 2 xrefs: // > cocos2d::CCAnimationCache::addAnimationsWithDictionary @ 0xd85b1c // > @ 0x4f4c8 // // This function is hookable on this platform (idp: arm, 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 13:08:12 +0000 // __int64 __fastcall cocos2d::CCAnimationCache::parseVersion2(cocos2d::CCAnimationCache *this, cocos2d::CCDictionary *a2) { cocos2d::CCSpriteFrameCache *v2; // x25 __int64 v3; // x0 __int64 i; // x24 __int64 v5; // x22 cocos2d::CCString *v6; // x0 cocos2d::CCArray *v7; // x19 cocos2d::CCArray *v8; // x0 cocos2d::CCArray *v9; // x23 unsigned int *v10; // x1 __int64 *v11; // x19 __int64 v12; // x0 char *v13; // x26 __int64 j; // x20 cocos2d::CCString *v15; // x0 char *CString; // x1 cocos2d::CCObject *v17; // x21 cocos2d::CCString *v18; // x0 float v19; // s8 __int64 v20; // x2 cocos2d::CCAnimationFrame *v21; // x20 cocos2d::CCString *v22; // x0 float v23; // s0 cocos2d::CCAnimation *v24; // x19 int v25; // w0 int v26; // w2 float v27; // s0 cocos2d::CCAnimationCache *v28; // x0 bool v30; // [xsp+77h] [xbp+77h] cocos2d::CCString *v31; // [xsp+78h] [xbp+78h] char *v32; // [xsp+98h] [xbp+98h] cocos2d::CCObject *v34; // [xsp+A0h] [xbp+A0h] float v35; // [xsp+A0h] [xbp+A0h] char *v36; // [xsp+A0h] [xbp+A0h] __int64 v37; // [xsp+A0h] [xbp+A0h] float v38; // [xsp+A0h] [xbp+A0h] __int64 v39; // [xsp+B0h] [xbp+B0h] BYREF __int64 v40; // [xsp+B8h] [xbp+B8h] void *v41; // [xsp+C0h] [xbp+C0h] v2 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(_stack_chk_guard); if ( a2 ) { v3 = *((_QWORD *)a2 + 7); v32 = (char *)v3; if ( v3 ) { for ( i = *(_QWORD *)(v3 + 288); ; i = *(_QWORD *)(i + 288) ) { v5 = *((_QWORD *)v32 + 33); v39 = 0; v40 = 0; v41 = nullptr; std::string::__init(&v39, "loops", 5u); v31 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v5, (__int64)&v39); if ( (v39 & 1) != 0 ) operator delete(v41); v39 = 0; v40 = 0; v41 = nullptr; std::string::__init(&v39, "restoreOriginalFrame", 0x14u); v6 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v5, (__int64)&v39); v30 = cocos2d::CCString::boolValue(v6); if ( (v39 & 1) != 0 ) operator delete(v41); v39 = 0; v40 = 0; v41 = nullptr; std::string::__init(&v39, "frames", 6u); v7 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v5, (__int64)&v39); if ( (v39 & 1) != 0 ) operator delete(v41); if ( v7 ) { v8 = (cocos2d::CCArray *)cocos2d::CCArray::count(v7); v9 = cocos2d::CCArray::createWithCapacity(v8); cocos2d::CCObject::retain((__int64)v9); v10 = *((unsigned int **)v7 + 7); if ( *v10 ) { v11 = *((__int64 **)v10 + 2); v12 = 8LL * *v10 - 8; v13 = (char *)v11 + v12; if ( v11 <= (__int64 *)((char *)v11 + v12) ) { for ( j = *v11; *v11; j = *v11 ) { v39 = 0; v40 = 0; v41 = nullptr; std::string::__init(&v39, "spriteframe", 0xBu); v15 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(j, (__int64)&v39); CString = cocos2d::CCString::getCString(v15); if ( (v39 & 1) != 0 ) { v36 = CString; operator delete(v41); CString = v36; } v17 = (cocos2d::CCObject *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v2, CString); if ( v17 ) { v39 = 0; v40 = 0; v41 = nullptr; std::string::__init(&v39, "delayUnits", 0xAu); v18 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(j, (__int64)&v39); v19 = cocos2d::CCString::floatValue(v18); if ( (v39 & 1) != 0 ) operator delete(v41); v39 = 0; v40 = 0; v41 = nullptr; std::string::__init(&v39, "notification", 0xCu); v20 = cocos2d::CCDictionary::objectForKey(j, (__int64)&v39); if ( (v39 & 1) != 0 ) { v37 = v20; operator delete(v41); v20 = v37; } v34 = (cocos2d::CCObject *)v20; v21 = (cocos2d::CCAnimationFrame *)operator new(0x50u); cocos2d::CCAnimationFrame::CCAnimationFrame(v21); cocos2d::CCAnimationFrame::initWithSpriteFrame((__int64)v21, v17, v34, v19); cocos2d::CCArray::addObject(v9, v21); cocos2d::CCObject::release(v21); } if ( v13 < (char *)++v11 ) break; } } } v39 = 0; v40 = 0; v41 = nullptr; std::string::__init(&v39, "delayPerUnit", 0xCu); v22 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v5, (__int64)&v39); v23 = cocos2d::CCString::floatValue(v22); if ( (v39 & 1) != 0 ) { v38 = v23; operator delete(v41); v23 = v38; } v35 = v23; v24 = (cocos2d::CCAnimation *)operator new(0x58u); cocos2d::CCAnimation::CCAnimation(v24); v25 = cocos2d::CCString::length(v31); v26 = 1; v27 = v35; if ( v25 ) { v26 = cocos2d::CCString::intValue(v31); v27 = v35; } cocos2d::CCAnimation::initWithAnimationFrames(v24, v9, v27, v26); cocos2d::CCObject::release(v9); *((_BYTE *)v24 + 80) = v30; v28 = (cocos2d::CCAnimationCache *)cocos2d::CCAnimationCache::sharedAnimationCache((cocos2d::CCAnimationCache *)v30); cocos2d::CCAnimationCache::addAnimation(v28, v24, v32); cocos2d::CCObject::release(v24); } if ( !i ) break; v32 = (char *)i; } } } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source