// // CCAnimatedSprite::loadType from 0x68ca60 to 0x68cfec (1420 bytes) // // 2 xrefs: // > CCAnimatedSprite::initWithType @ 0x68d498 // > @ 0xbf530 // // 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 12:50:33 +0000 // __int64 __fastcall CCAnimatedSprite::loadType( CCAnimatedSprite *this, char *a2, cocos2d::CCTexture2D *a3, unsigned __int8 a4) { unsigned int v6; // w25 size_t v8; // x0 _BOOL4 v9; // w23 ObjectManager *v11; // x0 ObjectManager *v12; // x0 __int64 Definition; // x23 cocos2d::CCString *v14; // x27 cocos2d::CCString *v15; // x26 int v16; // w27 int v17; // w28 char *v18; // x26 cocos2d::CCString *v19; // x0 size_t v20; // x0 size_t v21; // x0 cocos2d::CCObject *v22; // x0 char v23; // w1 __int64 v24; // x0 __int64 v25; // x0 char *v26; // x22 char v27; // w0 __int64 v28; // x19 size_t v29; // x0 cocos2d::CCString *v30; // x0 bool v31; // w3 CCPartAnimSprite *v32; // x23 __int64 v33; // x24 __int64 v34; // x1 void (__fastcall *v35)(__int64, _BYTE *); // x25 float v36; // s1 const cocos2d::CCRect *v37; // x2 __int64 v38; // x0 __int64 v39; // x0 cocos2d::CCString *v40; // x24 const char *CString; // x0 size_t v42; // x0 cocos2d::CCTextureCache *v43; // x0 cocos2d::CCTextureCache *v44; // x0 const char *v45; // x1 __int64 v46; // [xsp+78h] [xbp+78h] float v47; // [xsp+80h] [xbp+80h] void (__fastcall *v48)(__int64, _BYTE *); // [xsp+80h] [xbp+80h] const char *v49; // [xsp+90h] [xbp+90h] float v50; // [xsp+90h] [xbp+90h] char *v51; // [xsp+90h] [xbp+90h] _BYTE v52[16]; // [xsp+A0h] [xbp+A0h] BYREF __int64 v53; // [xsp+B0h] [xbp+B0h] BYREF __int64 v54; // [xsp+B8h] [xbp+B8h] void *v55; // [xsp+C0h] [xbp+C0h] v6 = a4; v53 = 0; v54 = 0; v55 = nullptr; v8 = strlen(a2); std::string::__init(&v53, a2, v8); v9 = sub_68C5B0((__int64)this + 600, (__int64)&v53); if ( (v53 & 1) != 0 ) { operator delete(v55); if ( v9 ) return _stack_chk_guard; } else if ( v9 ) { return _stack_chk_guard; } v11 = (ObjectManager *)CCAnimatedSprite::cleanupSprite(this); v12 = (ObjectManager *)ObjectManager::instance(v11); Definition = ObjectManager::getDefinition(v12, a2); if ( !a3 ) { v53 = 0; v54 = 0; v55 = nullptr; std::string::__init(&v53, "spriteSheet", 0xBu); v40 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(Definition, &v53); if ( (v53 & 1) != 0 ) operator delete(v55); CString = (const char *)cocos2d::CCString::getCString(v40); v53 = 0; v51 = (char *)CString; v54 = 0; v55 = nullptr; v42 = strlen(CString); std::string::__init(&v53, v51, v42); v43 = (cocos2d::CCTextureCache *)std::string::append((__int64)&v53, ".png", 4u); v44 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(v43); v45 = (char *)&v53 + 1; if ( (v53 & 1) != 0 ) v45 = (const char *)v55; a3 = (cocos2d::CCTexture2D *)cocos2d::CCTextureCache::addImage(v44, v45, 0); if ( (v53 & 1) != 0 ) operator delete(v55); } v53 = 0; v54 = 0; v55 = nullptr; std::string::__init(&v53, "useFBF", 6u); v14 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(Definition, &v53); if ( (v53 & 1) != 0 ) operator delete(v55); v53 = 0; v54 = 0; v55 = nullptr; std::string::__init(&v53, "usePA", 5u); v15 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(Definition, &v53); if ( (v53 & 1) == 0 ) { if ( v14 ) goto LABEL_10; LABEL_33: v16 = 0; if ( v15 ) goto LABEL_11; goto LABEL_34; } operator delete(v55); if ( !v14 ) goto LABEL_33; LABEL_10: v16 = (unsigned __int8)cocos2d::CCString::boolValue(v14); if ( v15 ) { LABEL_11: v17 = (unsigned __int8)cocos2d::CCString::boolValue(v15); goto LABEL_12; } LABEL_34: v17 = 0; LABEL_12: v53 = 0; v18 = (char *)this + 688; v54 = 0; v55 = nullptr; std::string::__init(&v53, "defaultAnimation", 0x10u); v19 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(Definition, &v53); v49 = (const char *)cocos2d::CCString::getCString(v19); v20 = strlen(v49); std::string::assign((__int64 *)this + 86, v49, v20); if ( (v53 & 1) == 0 ) { if ( !v16 ) goto LABEL_14; LABEL_28: cocos2d::CCRect::CCRect((cocos2d::CCRect *)v52, 0.0, 0.0, 0.0, 0.0); v38 = cocos2d::CCSprite::createWithTexture(a3, (cocos2d::CCTexture2D *)v52, v37); *((_QWORD *)this + 83) = v38; v46 = v38; v48 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v38 + 184LL); v50 = *(float *)(*(__int64 (__fastcall **)(CCAnimatedSprite *))(*(_QWORD *)this + 328LL))(this) * 0.5; v39 = (*(__int64 (__fastcall **)(CCAnimatedSprite *))(*(_QWORD *)this + 328LL))(this); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v52, v50, *(float *)(v39 + 4) * 0.5); v48(v46, v52); (*(void (__fastcall **)(CCAnimatedSprite *, _QWORD))(*(_QWORD *)this + 456LL))(this, *((_QWORD *)this + 83)); *((_QWORD *)this + 82) = *((_QWORD *)this + 83); if ( !v17 ) goto LABEL_15; LABEL_25: v53 = 0; v54 = 0; v55 = nullptr; std::string::__init(&v53, "animDesc", 8u); v30 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(Definition, &v53); v32 = (CCPartAnimSprite *)cocos2d::CCString::getCString(v30); if ( (v53 & 1) != 0 ) operator delete(v55); v33 = CCPartAnimSprite::createWithAnimDesc(v32, (const char *)a3, (cocos2d::CCTexture2D *)v6, v31); v34 = *(_QWORD *)this; *((_QWORD *)this + 84) = v33; v35 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v33 + 184LL); v47 = *(float *)(*(__int64 (__fastcall **)(CCAnimatedSprite *))(v34 + 328))(this) * 0.5; v36 = *(float *)((*(__int64 (__fastcall **)(CCAnimatedSprite *))(*(_QWORD *)this + 328LL))(this) + 4); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v52, v47, v36 * 0.5); v35(v33, v52); (*(void (__fastcall **)(CCAnimatedSprite *, _QWORD))(*(_QWORD *)this + 456LL))(this, *((_QWORD *)this + 84)); *((_QWORD *)this + 82) = *((_QWORD *)this + 84); goto LABEL_15; } operator delete(v55); if ( v16 ) goto LABEL_28; LABEL_14: if ( v17 ) goto LABEL_25; LABEL_15: *((_DWORD *)this + 170) = 0; v53 = 0; v54 = 0; v55 = nullptr; v21 = strlen(a2); std::string::__init(&v53, a2, v21); v22 = (cocos2d::CCObject *)SpriteAnimationManager::createWithOwner(this, &v53); v23 = v53; *((_QWORD *)this + 81) = v22; if ( (v23 & 1) != 0 ) { operator delete(v55); v22 = *((cocos2d::CCObject **)this + 81); } cocos2d::CCObject::retain(v22); v24 = *((_QWORD *)this + 84); if ( v24 ) (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v24 + 344LL))(v24, 0); v25 = *((_QWORD *)this + 83); if ( v25 ) (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v25 + 344LL))(v25, 0); v26 = (char *)this + 689; (*(void (__fastcall **)(CCAnimatedSprite *, __int64))(*(_QWORD *)this + 344LL))(this, 1); v27 = *((_BYTE *)this + 688); v28 = *((_QWORD *)this + 81); if ( (v27 & 1) != 0 ) v26 = *((char **)v18 + 2); v53 = 0; v54 = 0; v55 = nullptr; v29 = strlen(v26); std::string::__init(&v53, v26, v29); SpriteAnimationManager::runAnimation(v28, &v53); if ( (v53 & 1) != 0 ) operator delete(v55); return _stack_chk_guard; }