// // SpriteAnimationManager::createAnimations from 0x6b06b4 to 0x6b1330 (3196 bytes) // // 3 xrefs: // > ObjectManager::setup @ 0x6ada54 // > SpriteAnimationManager::initWithOwner @ 0x6b1ed8 // > @ 0x75520 // // 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:51 +0000 // __int64 __fastcall SpriteAnimationManager::createAnimations(__int64 a1) { ObjectManager *v2; // x0 const char *v3; // x1 _BOOL8 v4; // x0 ObjectManager *v6; // x0 const char *v7; // x1 cocos2d::CCAnimationCache *v8; // x0 ObjectManager *v9; // x0 const char *v10; // x1 __int64 Definition; // x19 cocos2d::CCString *v12; // x0 const char *CString; // x0 size_t v14; // x0 __int64 v15; // x19 cocos2d::CCString *v16; // x20 cocos2d::CCArray *v17; // x0 float v18; // s0 float v19; // s8 cocos2d::CCArray *v20; // x26 cocos2d::CCString *v21; // x21 int v22; // w24 __int64 v23; // x20 cocos2d::CCString *v24; // x0 char *v25; // x0 __int64 v26; // x28 cocos2d::CCString *v27; // x0 size_t v28; // x0 cocos2d::CCSpriteFrameCache *v29; // x0 const char *v30; // x1 size_t v31; // x0 cocos2d::CCAnimation *v32; // x20 const char *v33; // x1 char *v34; // x2 cocos2d::CCString *v35; // x0 const char *v36; // x0 cocos2d::CCString *v37; // x0 int v38; // w25 cocos2d::CCString *v39; // x0 cocos2d::CCArray *v40; // x1 int v41; // w25 unsigned __int64 v42; // x0 unsigned int v43; // w19 const char *v44; // x1 cocos2d::CCObject *v45; // x1 cocos2d::CCAnimation *v46; // x19 const char *v47; // x1 char *v48; // x2 cocos2d::CCString *v49; // x0 const char *v50; // x0 cocos2d::CCSpriteFrameCache *v51; // x0 const char *v52; // x1 const char *v53; // x1 char *v54; // x2 cocos2d::CCString *v55; // x0 size_t v56; // x0 const char *v57; // x1 size_t v58; // x0 cocos2d::CCArray *v59; // x0 __int64 v60; // x0 unsigned __int8 v61; // w2 cocos2d::CCArray *v62; // x25 _BYTE *v63; // x1 cocos2d::CCSpriteFrameCache *v64; // x0 __int64 v65; // x28 cocos2d::CCSpriteFrameCache *v66; // x19 size_t v67; // x3 unsigned __int64 v68; // x2 char *v69; // x1 size_t v70; // x2 char *v71; // x1 int v72; // w1 const char *v73; // x1 size_t v74; // x0 cocos2d::CCObject *v75; // x0 char *v76; // x2 unsigned __int64 v77; // x0 const char *v78; // x1 cocos2d::CCString *v79; // x0 const char *v80; // x0 char *v81; // x3 char *v82; // x0 unsigned int i; // w19 const char *v84; // x1 cocos2d::CCObject *v85; // x1 cocos2d::CCString *v86; // x0 cocos2d::CCSpriteFrameCache *v87; // x0 unsigned int v88; // w20 const char *v89; // x1 cocos2d::CCString *v90; // x0 const char *v91; // x0 __int64 *v92; // x19 _BYTE *v93; // x28 std::logic_error *exception; // x20 cocos2d::CCAnimationCache *v95; // [xsp+88h] [xbp+88h] cocos2d::CCDictionary *v96; // [xsp+90h] [xbp+90h] cocos2d::CCArray *v97; // [xsp+A0h] [xbp+A0h] char *v99; // [xsp+B0h] [xbp+B0h] cocos2d::CCSpriteFrameCache *v100; // [xsp+C0h] [xbp+C0h] cocos2d::CCSpriteFrameCache *v101; // [xsp+C0h] [xbp+C0h] cocos2d::CCSpriteFrameCache *v102; // [xsp+C0h] [xbp+C0h] cocos2d::CCSpriteFrameCache *v103; // [xsp+C0h] [xbp+C0h] cocos2d::CCSpriteFrameCache *v104; // [xsp+C0h] [xbp+C0h] cocos2d::CCSpriteFrameCache *v105; // [xsp+C0h] [xbp+C0h] cocos2d::CCSpriteFrameCache *v106; // [xsp+C0h] [xbp+C0h] cocos2d::CCSpriteFrameCache *v107; // [xsp+C0h] [xbp+C0h] unsigned int v108; // [xsp+CCh] [xbp+CCh] __int64 v109[2]; // [xsp+D0h] [xbp+D0h] BYREF char *v110; // [xsp+E0h] [xbp+E0h] __int64 v111[2]; // [xsp+E8h] [xbp+E8h] BYREF void *v112; // [xsp+F8h] [xbp+F8h] __int64 v113[2]; // [xsp+100h] [xbp+100h] BYREF void *v114; // [xsp+110h] [xbp+110h] __int64 v115; // [xsp+118h] [xbp+118h] BYREF __int64 v116; // [xsp+120h] [xbp+120h] void *v117; // [xsp+128h] [xbp+128h] __int64 v118[2]; // [xsp+130h] [xbp+130h] BYREF void *v119; // [xsp+140h] [xbp+140h] __int64 v120[2]; // [xsp+148h] [xbp+148h] BYREF void *v121; // [xsp+158h] [xbp+158h] __int64 v122[2]; // [xsp+160h] [xbp+160h] BYREF void *v123; // [xsp+170h] [xbp+170h] __int64 v124[2]; // [xsp+178h] [xbp+178h] BYREF void *v125; // [xsp+188h] [xbp+188h] __int64 v126; // [xsp+190h] [xbp+190h] BYREF __int64 v127; // [xsp+198h] [xbp+198h] void *v128; // [xsp+1A0h] [xbp+1A0h] __int64 v129[2]; // [xsp+1A8h] [xbp+1A8h] BYREF void *v130; // [xsp+1B8h] [xbp+1B8h] __int64 v131; // [xsp+1C0h] [xbp+1C0h] BYREF cocos2d::CCSpriteFrameCache *v132; // [xsp+1C8h] [xbp+1C8h] void *v133; // [xsp+1D0h] [xbp+1D0h] __int64 v134; // [xsp+1D8h] [xbp+1D8h] BYREF __int64 v135; // [xsp+1E0h] [xbp+1E0h] void *v136; // [xsp+1E8h] [xbp+1E8h] __int64 v137; // [xsp+1F0h] [xbp+1F0h] BYREF __int64 v138; // [xsp+1F8h] [xbp+1F8h] void *v139; // [xsp+200h] [xbp+200h] v2 = (ObjectManager *)ObjectManager::instance(_stack_chk_guard); v3 = (const char *)(a1 + 1); if ( (*(_BYTE *)a1 & 1) != 0 ) v3 = *(const char **)(a1 + 16); v4 = ObjectManager::animLoaded(v2, v3); if ( !v4 ) { v6 = (ObjectManager *)ObjectManager::instance((ObjectManager *)v4); v7 = (const char *)(a1 + 1); if ( (*(_BYTE *)a1 & 1) != 0 ) v7 = *(const char **)(a1 + 16); v8 = (cocos2d::CCAnimationCache *)ObjectManager::setLoaded(v6, v7); v95 = (cocos2d::CCAnimationCache *)cocos2d::CCAnimationCache::sharedAnimationCache(v8); v9 = (ObjectManager *)ObjectManager::instance(v95); v10 = (const char *)(a1 + 1); if ( (*(_BYTE *)a1 & 1) != 0 ) v10 = *(const char **)(a1 + 16); Definition = ObjectManager::getDefinition(v9, v10); v137 = 0; v138 = 0; v139 = nullptr; std::string::__init(&v137, "animations", 0xAu); v96 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::objectForKey(Definition, &v137); if ( (v137 & 1) != 0 ) operator delete(v139); v108 = 0; v97 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(v96); while ( 1 ) { if ( v108 >= (unsigned int)cocos2d::CCArray::count(v97) ) return _stack_chk_guard; v12 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v97, v108); CString = (const char *)cocos2d::CCString::getCString(v12); v109[0] = 0; v100 = (cocos2d::CCSpriteFrameCache *)CString; v109[1] = 0; v110 = nullptr; v14 = strlen(CString); std::string::__init(v109, v100, v14); v15 = cocos2d::CCDictionary::objectForKey(v96, v109); v111[0] = 0; v111[1] = 0; v112 = nullptr; std::string::__init(v111, "delay", 5u); v16 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v15, v111); v17 = (cocos2d::CCArray *)LOBYTE(v111[0]); if ( (v111[0] & 1) != 0 ) { operator delete(v112); if ( v16 ) { LABEL_15: v17 = (cocos2d::CCArray *)cocos2d::CCString::floatValue(v16); v19 = v18; goto LABEL_16; } } else if ( v16 ) { goto LABEL_15; } v19 = 0.0; LABEL_16: v20 = (cocos2d::CCArray *)cocos2d::CCArray::create(v17); v113[0] = 0; v113[1] = 0; v114 = nullptr; std::string::__init(v113, "usesParts", 9u); v21 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v15, v113); if ( (v113[0] & 1) != 0 ) { operator delete(v114); if ( v21 ) { LABEL_18: v22 = (unsigned __int8)cocos2d::CCString::boolValue(v21); goto LABEL_19; } } else if ( v21 ) { goto LABEL_18; } v22 = 0; LABEL_19: v115 = 0; v116 = 0; v117 = nullptr; std::string::__init(&v115, "animFrameName", 0xDu); v23 = cocos2d::CCDictionary::objectForKey(v15, &v115); if ( (v115 & 1) != 0 ) operator delete(v117); v115 = 0; v116 = 0; v117 = nullptr; if ( v23 ) { v24 = (cocos2d::CCString *)v23; } else { v53 = (const char *)(a1 + 1); if ( (*(_BYTE *)a1 & 1) != 0 ) v53 = *(const char **)(a1 + 16); v54 = (char *)v109 + 1; if ( (v109[0] & 1) != 0 ) v54 = v110; v24 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_%s", v53, v54); } v25 = (char *)cocos2d::CCString::getCString(v24); std::string::assign(&v115, v25); v118[0] = 0; v118[1] = 0; v119 = nullptr; std::string::__init(v118, "singleFrame", 0xBu); v26 = cocos2d::CCDictionary::objectForKey(v15, v118); if ( (v118[0] & 1) != 0 ) { operator delete(v119); if ( v26 ) { LABEL_25: v120[0] = 0; v120[1] = 0; v121 = nullptr; std::string::__init(v120, "singleFrame", 0xBu); v27 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v15, v120); v101 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCString::getCString(v27); v137 = 0; v138 = 0; v139 = nullptr; v28 = strlen((const char *)v101); std::string::__init(&v137, v101, v28); v29 = (cocos2d::CCSpriteFrameCache *)LOBYTE(v120[0]); if ( (v120[0] & 1) != 0 ) { operator delete(v121); if ( !v22 ) goto LABEL_64; LABEL_27: v30 = (char *)&v137 + 1; if ( (v137 & 1) != 0 ) v30 = (const char *)v139; v102 = (cocos2d::CCSpriteFrameCache *)v30; v122[0] = 0; v122[1] = 0; v123 = nullptr; v31 = strlen(v30); std::string::__init(v122, v102, v31); v32 = (cocos2d::CCAnimation *)cocos2d::CCString::create(v122); if ( (v122[0] & 1) != 0 ) operator delete(v123); *((_DWORD *)v32 + 7) = 1; } else { if ( v22 ) goto LABEL_27; LABEL_64: v51 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v29); v52 = (char *)&v137 + 1; if ( (v137 & 1) != 0 ) v52 = (const char *)v139; v32 = (cocos2d::CCAnimation *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v51, v52); *((_DWORD *)v32 + 7) = 2; } v33 = (const char *)(a1 + 1); if ( (*(_BYTE *)a1 & 1) != 0 ) v33 = *(const char **)(a1 + 16); v34 = (char *)v109 + 1; if ( (v109[0] & 1) != 0 ) v34 = v110; v35 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_%s", v33, v34); v36 = (const char *)cocos2d::CCString::getCString(v35); cocos2d::CCAnimationCache::addAnimation(v95, v32, v36); if ( (v137 & 1) != 0 ) operator delete(v139); if ( (v115 & 1) != 0 ) goto LABEL_57; LABEL_39: if ( (v109[0] & 1) != 0 ) goto LABEL_58; goto LABEL_40; } } else if ( v26 ) { goto LABEL_25; } v124[0] = 0; v124[1] = 0; v125 = nullptr; std::string::__init(v124, "other", 5u); v37 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v15, v124); v38 = (unsigned __int8)cocos2d::CCString::boolValue(v37); if ( (v124[0] & 1) != 0 ) { operator delete(v125); if ( !v38 ) { LABEL_44: v126 = 0; v127 = 0; v128 = nullptr; std::string::__init(&v126, "frames", 6u); v39 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v15, &v126); v41 = cocos2d::CCString::intValue(v39); v42 = (unsigned __int8)v126; if ( (v126 & 1) != 0 ) operator delete(v128); v43 = 1; if ( v41 > 0 ) { do { if ( v22 ) { v44 = (char *)&v115 + 1; if ( (v115 & 1) != 0 ) v44 = (const char *)v117; v45 = (cocos2d::CCObject *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%s_%03d.png", v44, v43); *((_DWORD *)v45 + 7) = 1; } else { v106 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache((cocos2d::CCSpriteFrameCache *)v42); v78 = (char *)&v115 + 1; if ( (v115 & 1) != 0 ) v78 = (const char *)v117; v79 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%s_%03d.png", v78, v43); v80 = (const char *)cocos2d::CCString::getCString(v79); v45 = (cocos2d::CCObject *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v106, v80); *((_DWORD *)v45 + 7) = 2; } v42 = cocos2d::CCArray::addObject(v20, v45); ++v43; } while ( v41 >= (int)v43 ); } goto LABEL_52; } } else if ( !v38 ) { goto LABEL_44; } v129[0] = 0; v129[1] = 0; v130 = nullptr; std::string::__init(v129, "frames", 6u); v55 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v15, v129); v103 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCString::getCString(v55); v126 = 0; v127 = 0; v128 = nullptr; v56 = strlen((const char *)v103); std::string::__init(&v126, v103, v56); if ( (v129[0] & 1) != 0 ) operator delete(v130); v57 = (char *)&v126 + 1; if ( (v126 & 1) != 0 ) v57 = (const char *)v128; v104 = (cocos2d::CCSpriteFrameCache *)v57; v131 = 0; v132 = nullptr; v133 = nullptr; v58 = strlen(v57); v59 = (cocos2d::CCArray *)std::string::__init(&v131, v104, v58); v60 = cocos2d::CCArray::create(v59); v61 = v131; v62 = (cocos2d::CCArray *)v60; if ( (v131 & 1) != 0 ) { v63 = v133; if ( !v132 ) { v64 = nullptr; v65 = -1; LABEL_80: v105 = v64; goto LABEL_81; } v92 = (__int64 *)((char *)v132 + (_QWORD)v133); v65 = -1; if ( v133 == (char *)v132 + (_QWORD)v133 ) { LABEL_146: v64 = v132; goto LABEL_80; } LABEL_138: v93 = v63; if ( *v63 == 32 ) { v65 = 0; } else { do { if ( v92 == (__int64 *)++v93 ) { v65 = -1; goto LABEL_143; } } while ( *v93 != 32 ); v65 = v93 - v63; } LABEL_143: LODWORD(v64) = (int)(unsigned __int8)v131 >> 1; if ( (v131 & 1) != 0 ) goto LABEL_146; LABEL_144: v64 = (cocos2d::CCSpriteFrameCache *)(int)v64; goto LABEL_80; } LODWORD(v64) = (int)(unsigned __int8)v131 >> 1; if ( (_DWORD)v64 ) { v65 = -1; v92 = (__int64 *)((char *)&v131 + (int)v64 + 1); v63 = (char *)&v131 + 1; if ( v92 != (__int64 *)((char *)&v131 + 1) ) goto LABEL_138; goto LABEL_144; } v105 = nullptr; v65 = -1; LABEL_81: v134 = 0; v135 = 0; v66 = nullptr; v136 = nullptr; v67 = v65; if ( (v131 & 1) != 0 ) { LABEL_82: v68 = (unsigned __int64)v132; if ( v66 <= v132 ) { v69 = (char *)v133; goto LABEL_84; } LABEL_147: exception = (std::logic_error *)_cxa_allocate_exception(0x10u); std::logic_error::logic_error(exception, "basic_string"); *(_QWORD *)exception = off_1536D68; _cxa_throw( exception, (struct type_info *)&`typeinfo for'std::out_of_range, (void (*)(void *))std::logic_error::~logic_error); } while ( 1 ) { v68 = v61 >> 1; if ( (unsigned __int64)v66 > v68 ) goto LABEL_147; v69 = (char *)&v131 + 1; LABEL_84: v70 = v68 - (_QWORD)v66; v71 = (char *)v66 + (_QWORD)v69; if ( v70 > v67 ) v70 = v67; std::string::__init(&v134, v71, v70); v72 = v134 & 1; if ( v72 ) { if ( v66 == v105 ) { v72 = 1; if ( !v135 ) goto LABEL_93; } v73 = (const char *)v136; } else { if ( v66 == v105 && !((int)(unsigned __int8)v134 >> 1) ) goto LABEL_93; v73 = (char *)&v134 + 1; } v99 = (char *)v73; v137 = 0; v138 = 0; v139 = nullptr; v74 = strlen(v73); std::string::__init(&v137, v99, v74); v75 = (cocos2d::CCObject *)cocos2d::CCString::create(&v137); cocos2d::CCArray::addObject(v62, v75); if ( (v137 & 1) != 0 ) operator delete(v139); v72 = v134 & 1; LABEL_93: if ( v65 == -1 ) break; v66 = (cocos2d::CCSpriteFrameCache *)(v65 + 1); if ( (v131 & 1) != 0 ) { v76 = (char *)v133; v77 = (unsigned __int64)v132; } else { v77 = (unsigned __int8)v131 >> 1; v76 = (char *)&v131 + 1; } v65 = -1; if ( (unsigned __int64)v66 >= v77 || (v81 = (char *)v66 + (_QWORD)v76, v82 = &v76[v77], (char *)v66 + (_QWORD)v76 == v82) ) { if ( v72 ) goto LABEL_105; } else if ( *((_BYTE *)v66 + (_QWORD)v76) == 32 ) { LABEL_117: v65 = v81 - v76; if ( v72 ) goto LABEL_105; } else { while ( v82 != ++v81 ) { if ( *v81 == 32 ) goto LABEL_117; } v65 = -1; if ( v72 ) { LABEL_105: operator delete(v136); v61 = v131; goto LABEL_99; } } v61 = v131; LABEL_99: v134 = 0; v67 = v65 - (_QWORD)v66; v135 = 0; v136 = nullptr; if ( (v61 & 1) != 0 ) goto LABEL_82; } if ( v72 ) operator delete(v136); if ( (v131 & 1) != 0 ) operator delete(v133); for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(v62); ++i ) { v86 = (cocos2d::CCString *)cocos2d::CCArray::objectAtIndex(v62, i); v87 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCString::intValue(v86); v88 = (unsigned int)v87; if ( v22 ) { v84 = (char *)&v115 + 1; if ( (v115 & 1) != 0 ) v84 = (const char *)v117; v85 = (cocos2d::CCObject *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%s_%03d.png", v84, (unsigned int)v87); *((_DWORD *)v85 + 7) = 1; } else { v107 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v87); v89 = (char *)&v115 + 1; if ( (v115 & 1) != 0 ) v89 = (const char *)v117; v90 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_%03d.png", v89, v88); v91 = (const char *)cocos2d::CCString::getCString(v90); v85 = (cocos2d::CCObject *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v107, v91); *((_DWORD *)v85 + 7) = 2; } cocos2d::CCArray::addObject(v20, v85); } if ( (v126 & 1) != 0 ) operator delete(v128); LABEL_52: v46 = (cocos2d::CCAnimation *)cocos2d::CCAnimation::createWithSpriteFrames(v20, v40, v19); v47 = (const char *)(a1 + 1); if ( (*(_BYTE *)a1 & 1) != 0 ) v47 = *(const char **)(a1 + 16); v48 = (char *)v109 + 1; if ( (v109[0] & 1) != 0 ) v48 = v110; v49 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s_%s", v47, v48); v50 = (const char *)cocos2d::CCString::getCString(v49); cocos2d::CCAnimationCache::addAnimation(v95, v46, v50); if ( (v115 & 1) == 0 ) goto LABEL_39; LABEL_57: operator delete(v117); if ( (v109[0] & 1) != 0 ) LABEL_58: operator delete(v110); LABEL_40: ++v108; } } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source