// // SpriteAnimationManager::createAnimations from 0x140085e90 to 0x140086ab3 (3107 bytes) // // 3 xrefs: // > ObjectManager::setup @ 0x14007c1e6 // > SpriteAnimationManager::initWithOwner @ 0x14008538c // > @ 0x140912530 // // 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:57 +0000 // // Hidden C++ exception states: #wind=14 void __fastcall SpriteAnimationManager::createAnimations(_QWORD *a1) { _BYTE *v2; // rbx __int64 v3; // rdi size_t v4; // r8 __int64 v5; // rbx void *v6; // r8 _BYTE *v7; // rbx __int64 v8; // rdi size_t v9; // r8 __int64 v10; // rbx __int64 v11; // rax void *v12; // rcx cocos2d::CCAnimationCache *v13; // rsi _BYTE *v14; // rbx __int64 v15; // rax __int64 Definition; // rax cocos2d::CCDictionary *v17; // r14 cocos2d::CCArray *v18; // rdi unsigned int v19; // ebx __m128i v20; // xmm7 __m128i v21; // xmm8 __m128i v22; // xmm9 __m128i v23; // xmm10 __m128i v24; // xmm12 __m128i v25; // xmm11 cocos2d::CCString *v26; // rax const char *CString; // rax size_t v28; // r8 __int64 v29; // rdi float v30; // xmm6_4 cocos2d::CCString *v31; // rbx __int64 v32; // rcx cocos2d::CCArray *v33; // r14 cocos2d::CCString *v34; // rbx void *v35; // r8 bool v36; // r15 __int64 v37; // rbx void *v38; // r8 cocos2d::CCString *v39; // rcx const char *v40; // r8 const char *v41; // rdx char *v42; // rax size_t v43; // r8 __int64 v44; // rbx void *v45; // r8 cocos2d::CCString *v46; // rax const char *v47; // rax size_t v48; // r8 const char *v49; // rbx cocos2d::CCSpriteFrameCache *v50; // rax struct cocos2d::CCSpriteFrame *v51; // rbx void **v52; // rdx size_t v53; // r8 const char *v54; // rdx const char *v55; // r8 cocos2d::CCString *v56; // rax const char *v57; // rax void *v58; // rcx cocos2d::CCString *v59; // rax bool v60; // bl cocos2d::CCString *v61; // rax int v62; // esi void *v63; // r8 int v64; // edi const char *v65; // rdx cocos2d::CCString *v66; // rax const char *v67; // rbx cocos2d::CCSpriteFrameCache *v68; // rax struct cocos2d::CCSpriteFrame *v69; // rax int j; // ebx const char *v71; // rdx struct cocos2d::CCString *v72; // rax cocos2d::CCString *v73; // rax const char *v74; // rax size_t v75; // r8 void *v76; // rcx void **v77; // rdx size_t v78; // r8 cocos2d::CCArray *v79; // rsi void *v80; // rax unsigned int i; // edi cocos2d::CCString *v82; // rax unsigned int v83; // eax __int128 *v84; // rdx cocos2d::CCString *v85; // rax const char *v86; // rbx cocos2d::CCSpriteFrameCache *v87; // rax struct cocos2d::CCString *v88; // rax struct cocos2d::CCAnimation *v89; // rbx const char *v90; // rdx const char *v91; // r8 cocos2d::CCString *v92; // rax const char *v93; // rax unsigned int v94; // [rsp+38h] [rbp-D0h] cocos2d::CCAnimationCache *v95; // [rsp+40h] [rbp-C8h] cocos2d::CCArray *v96; // [rsp+48h] [rbp-C0h] cocos2d::CCDictionary *v97; // [rsp+50h] [rbp-B8h] void *v98[2]; // [rsp+60h] [rbp-A8h] BYREF __m128i v99; // [rsp+70h] [rbp-98h] void *v100[2]; // [rsp+80h] [rbp-88h] BYREF __m128i v101; // [rsp+90h] [rbp-78h] void *Block[2]; // [rsp+A0h] [rbp-68h] BYREF __int128 v103; // [rsp+B0h] [rbp-58h] __int128 v104; // [rsp+C0h] [rbp-48h] BYREF __m128i v105; // [rsp+D0h] [rbp-38h] __int128 v106; // [rsp+E0h] [rbp-28h] BYREF __int128 v107; // [rsp+F0h] [rbp-18h] _QWORD v108[2]; // [rsp+100h] [rbp-8h] BYREF __m128i si128; // [rsp+110h] [rbp+8h] _OWORD v110[2]; // [rsp+120h] [rbp+18h] BYREF v2 = a1; if ( a1[3] > 0xFu ) v2 = (_BYTE *)*a1; v3 = ObjectManager::instance(); *(_OWORD *)Block = 0; v103 = 0; v4 = -1; do ++v4; while ( v2[v4] ); sub_14003D230(Block, v2, v4); v5 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(v3 + 328), Block); if ( *((_QWORD *)&v103 + 1) > 0xFu ) { v6 = Block[0]; if ( (unsigned __int64)(*((_QWORD *)&v103 + 1) + 1LL) >= 0x1000 ) { v6 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v6); } if ( !v5 ) { v7 = a1; if ( a1[3] > 0xFu ) v7 = (_BYTE *)*a1; v8 = ObjectManager::instance(); *(_OWORD *)Block = 0; v103 = 0; v9 = -1; do ++v9; while ( v7[v9] ); sub_14003D230(Block, v7, v9); v10 = *(_QWORD *)(v8 + 328); v11 = cocos2d::CCNode::create(); cocos2d::CCDictionary::setObject(v10, v11, Block); if ( *((_QWORD *)&v103 + 1) > 0xFu ) { v12 = Block[0]; if ( (unsigned __int64)(*((_QWORD *)&v103 + 1) + 1LL) >= 0x1000 ) { v12 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v12 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v12); } v13 = (cocos2d::CCAnimationCache *)cocos2d::CCAnimationCache::sharedAnimationCache(); v95 = v13; v14 = a1; if ( a1[3] > 0xFu ) v14 = (_BYTE *)*a1; v15 = ObjectManager::instance(); Definition = ObjectManager::getDefinition(v15, v14); v108[1] = 29550; si128 = _mm_load_si128((const __m128i *)&xmmword_1408365B0); v108[0] = 0x6F6974616D696E61LL; v17 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::objectForKey(Definition, v108); v97 = v17; sub_14003D310((__int64)v108); v18 = cocos2d::CCDictionary::allKeys(v17); v96 = v18; v19 = 0; v94 = 0; if ( cocos2d::CCArray::count(v18) ) { v20 = _mm_load_si128((const __m128i *)&Size); v21 = _mm_load_si128((const __m128i *)&xmmword_140836570); v22 = _mm_load_si128((const __m128i *)&xmmword_140836560); v23 = _mm_load_si128((const __m128i *)&xmmword_1408365C0); v24 = _mm_load_si128((const __m128i *)&xmmword_1408365E0); v25 = _mm_load_si128((const __m128i *)&xmmword_1408365A0); while ( 1 ) { v26 = cocos2d::CCArray::objectAtIndex(v18, v19); CString = cocos2d::CCString::getCString(v26); v106 = 0; v107 = 0; v28 = -1; do ++v28; while ( CString[v28] ); sub_14003D230(&v106, CString, v28); v29 = cocos2d::CCDictionary::objectForKey(v17, &v106); v30 = 0.0; *(_OWORD *)v100 = 0; v101 = v22; strcpy((char *)v100, "delay"); v31 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v29, v100); sub_14003D310((__int64)v100); if ( v31 ) v30 = cocos2d::CCString::floatValue(v31); v33 = (cocos2d::CCArray *)cocos2d::CCArray::create(v32); v98[1] = (void *)115; v99 = v25; v98[0] = (void *)0x7472615073657375LL; v34 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v29, v98); if ( v99.m128i_i64[1] > 0xFuLL ) { v35 = v98[0]; if ( (unsigned __int64)(v99.m128i_i64[1] + 1) >= 0x1000 ) { v35 = *((void **)v98[0] - 1); if ( (unsigned __int64)((char *)v98[0] - (char *)v35 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v35); } v99 = v20; LOBYTE(v98[0]) = 0; v36 = 0; if ( v34 ) v36 = cocos2d::CCString::boolValue(v34); v99 = v24; strcpy((char *)v98, "animFrameName"); HIWORD(v98[1]) = 0; v37 = cocos2d::CCDictionary::objectForKey(v29, v98); if ( v99.m128i_i64[1] > 0xFuLL ) { v38 = v98[0]; if ( (unsigned __int64)(v99.m128i_i64[1] + 1) >= 0x1000 ) { v38 = *((void **)v98[0] - 1); if ( (unsigned __int64)((char *)v98[0] - (char *)v38 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v38); } v99 = v20; LOBYTE(v98[0]) = 0; v104 = 0; v105 = v20; LOBYTE(v104) = 0; if ( v37 ) { v39 = (cocos2d::CCString *)v37; } else { v40 = (const char *)&v106; if ( *((_QWORD *)&v107 + 1) > 0xFu ) v40 = (const char *)v106; v41 = (const char *)a1; if ( a1[3] > 0xFu ) v41 = (const char *)*a1; v39 = cocos2d::CCString::createWithFormat("%s_%s", v41, v40); } v42 = (char *)cocos2d::CCString::getCString(v39); v43 = -1; do ++v43; while ( v42[v43] ); sub_1400405A0((void **)&v104, v42, v43); v99 = v23; v98[0] = (void *)0x7246656C676E6973LL; v98[1] = (void *)6647137; v44 = cocos2d::CCDictionary::objectForKey(v29, v98); if ( v99.m128i_i64[1] > 0xFuLL ) { v45 = v98[0]; if ( (unsigned __int64)(v99.m128i_i64[1] + 1) >= 0x1000 ) { v45 = *((void **)v98[0] - 1); if ( (unsigned __int64)((char *)v98[0] - (char *)v45 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v45); } *(_OWORD *)v100 = 0; if ( v44 ) { v101 = v23; strcpy((char *)v100, "singleFrame"); v46 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v29, v100); v47 = cocos2d::CCString::getCString(v46); *(_OWORD *)v98 = 0; v99 = 0; v48 = -1; do ++v48; while ( v47[v48] ); sub_14003D230(v98, v47, v48); sub_14003D310((__int64)v100); if ( v36 ) { v52 = v98; if ( v99.m128i_i64[1] > 0xFuLL ) v52 = (void **)v98[0]; memset(v110, 0, sizeof(v110)); v53 = -1; do ++v53; while ( *((_BYTE *)v52 + v53) ); sub_14003D230(v110, v52, v53); v51 = (struct cocos2d::CCSpriteFrame *)cocos2d::CCString::create(v110); sub_14003D310((__int64)v110); *((_DWORD *)v51 + 7) = 1; } else { v49 = (const char *)v98; if ( v99.m128i_i64[1] > 0xFuLL ) v49 = (const char *)v98[0]; v50 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v51 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v50, v49); *((_DWORD *)v51 + 7) = 2; } v54 = (const char *)a1; if ( a1[3] > 0xFu ) v54 = (const char *)*a1; v55 = (const char *)&v106; if ( *((_QWORD *)&v107 + 1) > 0xFu ) v55 = (const char *)v106; v56 = cocos2d::CCString::createWithFormat("%s_%s", v54, v55); v57 = cocos2d::CCString::getCString(v56); cocos2d::CCAnimationCache::addAnimation(v13, v51, v57); if ( v99.m128i_i64[1] > 0xFuLL ) { v58 = v98[0]; if ( (unsigned __int64)(v99.m128i_i64[1] + 1) >= 0x1000 ) { v58 = *((void **)v98[0] - 1); if ( (unsigned __int64)((char *)v98[0] - (char *)v58 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v58); } } else { v101 = v22; strcpy((char *)v100, "other"); v59 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v29, v100); v60 = cocos2d::CCString::boolValue(v59); sub_14003D310((__int64)v100); if ( v60 ) { *(_OWORD *)v98 = 0; v99 = v21; strcpy((char *)v98, "frames"); v73 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v29, v98); v74 = cocos2d::CCString::getCString(v73); *(_OWORD *)Block = 0; v103 = 0; v75 = -1; do ++v75; while ( v74[v75] ); sub_14003D230(Block, v74, v75); if ( v99.m128i_i64[1] > 0xFuLL ) { v76 = v98[0]; if ( (unsigned __int64)(v99.m128i_i64[1] + 1) >= 0x1000 ) { v76 = *((void **)v98[0] - 1); if ( (unsigned __int64)((char *)v98[0] - (char *)v76 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v76); } v99 = v20; LOBYTE(v98[0]) = 0; v77 = Block; if ( *((_QWORD *)&v103 + 1) > 0xFu ) v77 = (void **)Block[0]; *(_OWORD *)v100 = 0; v101 = 0; v78 = -1; do ++v78; while ( *((_BYTE *)v77 + v78) ); sub_14003D230(v100, v77, v78); v79 = sub_140084E00((__int64 *)v100); if ( v101.m128i_i64[1] > 0xFuLL ) { v80 = v100[0]; if ( (unsigned __int64)(v101.m128i_i64[1] + 1) >= 0x1000 ) { v80 = *((void **)v100[0] - 1); if ( (unsigned __int64)((char *)v100[0] - (char *)v80 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v80); } v101 = v20; LOBYTE(v100[0]) = 0; for ( i = 0; i < cocos2d::CCArray::count(v79); ++i ) { v82 = cocos2d::CCArray::objectAtIndex(v79, i); v83 = cocos2d::CCString::intValue(v82); v84 = &v104; if ( v36 ) { if ( v105.m128i_i64[1] > 0xFuLL ) v84 = (__int128 *)v104; v88 = cocos2d::CCString::createWithFormat("%s_%03d.png", v84, v83); *((_DWORD *)v88 + 7) = 1; } else { if ( v105.m128i_i64[1] > 0xFuLL ) v84 = (__int128 *)v104; v85 = cocos2d::CCString::createWithFormat("%s_%03d.png", v84, v83); v86 = cocos2d::CCString::getCString(v85); v87 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v88 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v87, v86); *((_DWORD *)v88 + 7) = 2; } cocos2d::CCArray::addObject(v33, v88); } sub_14003D310((__int64)Block); } else { *(_OWORD *)v100 = 0; v101 = v21; strcpy((char *)v100, "frames"); v61 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v29, v100); v62 = cocos2d::CCString::intValue(v61); if ( v101.m128i_i64[1] > 0xFuLL ) { v63 = v100[0]; if ( (unsigned __int64)(v101.m128i_i64[1] + 1) >= 0x1000 ) { v63 = *((void **)v100[0] - 1); if ( (unsigned __int64)((char *)v100[0] - (char *)v63 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v63); } v64 = 1; if ( v62 >= 1 ) { if ( v36 ) { for ( j = 1; j <= v62; ++j ) { v71 = (const char *)&v104; if ( v105.m128i_i64[1] > 0xFuLL ) v71 = (const char *)v104; v72 = cocos2d::CCString::createWithFormat("%s_%03d.png", v71, j); *((_DWORD *)v72 + 7) = 1; cocos2d::CCArray::addObject(v33, v72); } } else { do { v65 = (const char *)&v104; if ( v105.m128i_i64[1] > 0xFuLL ) v65 = (const char *)v104; v66 = cocos2d::CCString::createWithFormat("%s_%03d.png", v65, v64); v67 = cocos2d::CCString::getCString(v66); v68 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v69 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v68, v67); *((_DWORD *)v69 + 7) = 2; cocos2d::CCArray::addObject(v33, v69); ++v64; } while ( v64 <= v62 ); } } } v89 = cocos2d::CCAnimation::createWithSpriteFrames(v33, v30); v90 = (const char *)a1; if ( a1[3] > 0xFu ) v90 = (const char *)*a1; v91 = (const char *)&v106; if ( *((_QWORD *)&v107 + 1) > 0xFu ) v91 = (const char *)v106; v92 = cocos2d::CCString::createWithFormat("%s_%s", v90, v91); v93 = cocos2d::CCString::getCString(v92); v13 = v95; cocos2d::CCAnimationCache::addAnimation(v95, v89, v93); } sub_14003D310((__int64)&v104); sub_14003D310((__int64)&v106); v19 = ++v94; v18 = v96; if ( v94 >= cocos2d::CCArray::count(v96) ) break; v17 = v97; } } } sub_14003D310((__int64)a1); }
GD Web Decomp Icon

GD Web Decomp

Raw Source