// // AnimatedGameObject::setupChildSprites from 0x140644cc0 to 0x1406455b7 (2295 bytes) // // 4 xrefs: // > AnimatedGameObject::init @ 0x140644c82 // > @ 0x1408e8810 // > @ 0x1408e8848 // > @ 0x140931340 // // 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:35:36 +0000 // int __fastcall AnimatedGameObject::setupChildSprites(__int64 a1) { _DWORD *v1; // rax __int64 v3; // rax __int64 v4; // rcx unsigned int v5; // r15d cocos2d::CCArray *v6; // r13 struct cocos2d::CCObject *v7; // rax const char *v8; // rcx struct cocos2d::CCObject *v9; // rdi struct cocos2d::CCObject *v10; // r12 __int64 v11; // rcx cocos2d::CCObject *v12; // rax __int64 v13; // rbx __int64 v14; // rbx __int64 v15; // rbx __int64 v16; // rbx __int64 v17; // rax _DWORD *v18; // rax const struct cocos2d::CCSize *v19; // rax __int64 *v20; // rbx __int64 v21; // rdi __int64 v22; // rax __int64 v23; // rax __int64 v24; // rcx cocos2d::CCArray *v25; // r15 struct cocos2d::CCObject *v26; // rax const char *v27; // rcx __int64 v28; // rax __int64 v29; // rcx struct cocos2d::CCObject *v30; // rdi struct cocos2d::CCObject *v31; // r14 __int64 v32; // rcx bool v33; // zf cocos2d::CCObject *v34; // rax __int64 v35; // rbx __int64 v36; // rbx __int64 v37; // rbx __int64 v38; // rbx __int64 v39; // rax cocos2d::CCObject *v40; // rax _DWORD *v41; // rax __int64 v42; // rax __int64 v43; // rcx cocos2d::CCArray *v44; // r15 cocos2d::CCObject *v45; // rax unsigned int v46; // ebp _DWORD *v47; // rax __int128 v48; // xmm0 _DWORD *v49; // rax struct cocos2d::CCObject *v50; // r14 const char *v51; // rcx struct cocos2d::CCSprite *v52; // rax struct cocos2d::CCObject *v53; // rdi __int64 v54; // rcx cocos2d::CCObject *v55; // rax __int64 v56; // rax __int64 v57; // rbx __int64 v58; // rbx __int64 v59; // rbx __int64 v60; // rbx __int64 v61; // rax __int64 v62; // rax __int64 v63; // rcx cocos2d::CCArray *v64; // r14 struct cocos2d::CCObject *v65; // rdi struct cocos2d::CCObject *v66; // r15 __int64 v67; // rcx cocos2d::CCObject *v68; // rax __int64 v69; // rax __int64 v70; // rbx __int64 v71; // rbx __int64 v72; // rbx __int64 v73; // rbx __int64 v74; // rax cocos2d::CCObject *v75; // rax __int128 v77; // [rsp+20h] [rbp-68h] BYREF __int64 v78; // [rsp+30h] [rbp-58h] __int64 v79; // [rsp+38h] [rbp-50h] _DWORD *v80; // [rsp+90h] [rbp+8h] BYREF char v81; // [rsp+A0h] [rbp+18h] BYREF LODWORD(v1) = *(_DWORD *)(a1 + 1036); switch ( (_DWORD)v1 ) { case 0x396: v3 = cocos2d::CCSprite::create(); v4 = *(_QWORD *)(a1 + 1480); *(_QWORD *)(a1 + 1488) = v3; (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v4 + 456LL))(v4, v3, 0xFFFFFFFFLL); v5 = 0; v6 = *(cocos2d::CCArray **)(*(_QWORD *)(*(_QWORD *)(a1 + 1480) + 688LL) + 632LL); for ( LODWORD(v1) = cocos2d::CCArray::count(v6); v5 < (unsigned int)v1; LODWORD(v1) = cocos2d::CCArray::count(v6) ) { v7 = cocos2d::CCArray::objectAtIndex(v6, v5); v8 = "GJBeast01_01_glow_001.png"; v9 = v7; if ( v5 != 1 ) v8 = "GJBeast01_02_glow_001.png"; v10 = cocos2d::CCSprite::createWithSpriteFrameName(v8); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *, __int64))(**(_QWORD **)(a1 + 1488) + 456LL))( *(_QWORD *)(a1 + 1488), v10, 0xFFFFFFFFLL); *((_BYTE *)v9 + 616) = 1; if ( !*((_QWORD *)v9 + 75) ) { v12 = (cocos2d::CCObject *)cocos2d::CCArray::create(v11); *((_QWORD *)v9 + 75) = v12; cocos2d::CCObject::retain(v12); } cocos2d::CCArray::addObject(*((cocos2d::CCArray **)v9 + 75), v10); v13 = *(_QWORD *)v10; (*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v9 + 360LL))(v9); (*(void (__fastcall **)(struct cocos2d::CCObject *))(v13 + 352))(v10); v14 = *(_QWORD *)v10; (*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v9 + 128LL))(v9); (*(void (__fastcall **)(struct cocos2d::CCObject *))(v14 + 120))(v10); v15 = *(_QWORD *)v10; (*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v9 + 144LL))(v9); (*(void (__fastcall **)(struct cocos2d::CCObject *))(v15 + 136))(v10); v16 = *(_QWORD *)v10; v17 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v9 + 200LL))(v9); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v16 + 184))(v10, v17); if ( v5 == 1 ) { *(_BYTE *)(a1 + 656) = 1; *(_BYTE *)(a1 + 874) = 1; v77 = 0; v78 = 0; v79 = 0; *(_QWORD *)&v77 = sub_14003D460(0x20u); v78 = 20; v79 = 31; strcpy((char *)v77, "GJBeast01_03_001.png"); GameObject::addCustomColorChild((_QWORD *)a1, (const char *)&v77); v18 = *(_DWORD **)(a1 + 1112); if ( v18 ) { v18[1] = 1011; *v18 = 0; } (*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD, __int64))(*(_QWORD *)v9 + 456LL))( v9, *(_QWORD *)(a1 + 896), 1); v19 = (const struct cocos2d::CCSize *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v9 + 320LL))(v9); cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v80, v19); v20 = *(__int64 **)(a1 + 896); v21 = *v20; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v81, *(float *)&v80 * 0.5, *((float *)&v80 + 1) * 0.5); (*(void (__fastcall **)(__int64 *, __int64))(v21 + 184))(v20, v22); } ++v5; } return (int)v1; case 0x52F: v23 = cocos2d::CCSprite::create(); v24 = *(_QWORD *)(a1 + 1480); *(_QWORD *)(a1 + 1488) = v23; (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v24 + 456LL))(v24, v23, 0xFFFFFFFFLL); v25 = *(cocos2d::CCArray **)(*(_QWORD *)(*(_QWORD *)(a1 + 1480) + 688LL) + 632LL); LODWORD(v1) = cocos2d::CCArray::count(v25); if ( (unsigned int)v1 <= 1 ) return (int)v1; v26 = cocos2d::CCArray::objectAtIndex(v25, 1u); v27 = "GJBeast02_01_glow_001.png"; goto LABEL_19; case 0x530: v28 = cocos2d::CCSprite::create(); v29 = *(_QWORD *)(a1 + 1480); *(_QWORD *)(a1 + 1488) = v28; (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v29 + 456LL))(v29, v28, 0xFFFFFFFFLL); v25 = *(cocos2d::CCArray **)(*(_QWORD *)(*(_QWORD *)(a1 + 1480) + 688LL) + 632LL); LODWORD(v1) = cocos2d::CCArray::count(v25); if ( (unsigned int)v1 <= 1 ) return (int)v1; v26 = cocos2d::CCArray::objectAtIndex(v25, 1u); v27 = "GJBeast03_01_glow_001.png"; LABEL_19: v30 = v26; v31 = cocos2d::CCSprite::createWithSpriteFrameName(v27); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *, __int64))(**(_QWORD **)(a1 + 1488) + 456LL))( *(_QWORD *)(a1 + 1488), v31, 0xFFFFFFFFLL); v33 = *((_QWORD *)v30 + 75) == 0; *((_BYTE *)v30 + 616) = 1; if ( v33 ) { v34 = (cocos2d::CCObject *)cocos2d::CCArray::create(v32); *((_QWORD *)v30 + 75) = v34; cocos2d::CCObject::retain(v34); } cocos2d::CCArray::addObject(*((cocos2d::CCArray **)v30 + 75), v31); *((_BYTE *)v30 + 617) = 1; v35 = *(_QWORD *)v31; (*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v30 + 360LL))(v30); (*(void (__fastcall **)(struct cocos2d::CCObject *))(v35 + 352))(v31); v36 = *(_QWORD *)v31; (*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v30 + 128LL))(v30); (*(void (__fastcall **)(struct cocos2d::CCObject *))(v36 + 120))(v31); v37 = *(_QWORD *)v31; (*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v30 + 144LL))(v30); (*(void (__fastcall **)(struct cocos2d::CCObject *))(v37 + 136))(v31); v38 = *(_QWORD *)v31; v39 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v30 + 200LL))(v30); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v38 + 184))(v31, v39); *(_BYTE *)(a1 + 656) = 1; *(_BYTE *)(a1 + 874) = 1; v40 = cocos2d::CCArray::objectAtIndex(v25, 0); *(_QWORD *)(a1 + 896) = v40; LABEL_22: cocos2d::CCObject::retain(v40); if ( !*(_QWORD *)(a1 + 1112) ) { v41 = operator new(0x28u); v80 = v41; *(_QWORD *)v41 = 0; v41[2] = 1065353216; v41[3] = 1065353216; *((_OWORD *)v41 + 1) = xmmword_1408FE460; *((_WORD *)v41 + 16) = 0; *((_WORD *)v41 + 17) = -1; *((_BYTE *)v41 + 36) = -1; *(_QWORD *)(a1 + 1112) = v41; v41[1] = 1; *v41 = 0; } v1 = *(_DWORD **)(a1 + 1112); if ( v1 ) { v1[1] = 1011; *v1 = 0; } return (int)v1; } if ( (_DWORD)v1 != 1584 ) { if ( (_DWORD)v1 != 2012 ) return (int)v1; v62 = cocos2d::CCSprite::create(); v63 = *(_QWORD *)(a1 + 1480); *(_QWORD *)(a1 + 1488) = v62; (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v63 + 456LL))(v63, v62, 0xFFFFFFFFLL); v64 = *(cocos2d::CCArray **)(*(_QWORD *)(*(_QWORD *)(a1 + 1480) + 688LL) + 632LL); LODWORD(v1) = cocos2d::CCArray::count(v64); if ( (unsigned int)v1 <= 1 ) return (int)v1; v65 = cocos2d::CCArray::objectAtIndex(v64, 0); v66 = cocos2d::CCSprite::createWithSpriteFrameName("GJBeast05_02_glow_001.png"); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *, __int64))(**(_QWORD **)(a1 + 1488) + 456LL))( *(_QWORD *)(a1 + 1488), v66, 0xFFFFFFFFLL); v33 = *((_QWORD *)v65 + 75) == 0; *((_BYTE *)v65 + 616) = 1; if ( v33 ) { v68 = (cocos2d::CCObject *)cocos2d::CCArray::create(v67); *((_QWORD *)v65 + 75) = v68; cocos2d::CCObject::retain(v68); } cocos2d::CCArray::addObject(*((cocos2d::CCArray **)v65 + 75), v66); v69 = *(_QWORD *)v65; *((_BYTE *)v65 + 617) = 1; v70 = *(_QWORD *)v66; (*(void (__fastcall **)(struct cocos2d::CCObject *))(v69 + 360))(v65); (*(void (__fastcall **)(struct cocos2d::CCObject *))(v70 + 352))(v66); v71 = *(_QWORD *)v66; (*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v65 + 128LL))(v65); (*(void (__fastcall **)(struct cocos2d::CCObject *))(v71 + 120))(v66); v72 = *(_QWORD *)v66; (*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v65 + 144LL))(v65); (*(void (__fastcall **)(struct cocos2d::CCObject *))(v72 + 136))(v66); v73 = *(_QWORD *)v66; v74 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v65 + 200LL))(v65); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v73 + 184))(v66, v74); *((_QWORD *)v65 + 83) = a1 + 1472; *(_BYTE *)(a1 + 656) = 1; *(_BYTE *)(a1 + 874) = 1; v75 = cocos2d::CCArray::objectAtIndex(v64, 1u); *(_QWORD *)(a1 + 896) = v75; cocos2d::CCObject::retain(v75); v40 = cocos2d::CCArray::objectAtIndex(v64, 2u); *(_QWORD *)(a1 + 1496) = v40; goto LABEL_22; } v42 = cocos2d::CCSprite::create(); v43 = *(_QWORD *)(a1 + 1480); *(_QWORD *)(a1 + 1488) = v42; (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v43 + 456LL))(v43, v42, 0xFFFFFFFFLL); v44 = *(cocos2d::CCArray **)(*(_QWORD *)(*(_QWORD *)(a1 + 1480) + 688LL) + 632LL); *(_BYTE *)(a1 + 656) = 1; *(_BYTE *)(a1 + 874) = 1; v45 = cocos2d::CCArray::objectAtIndex(v44, 0); *(_QWORD *)(a1 + 896) = v45; cocos2d::CCObject::retain(v45); v46 = 1; if ( !*(_QWORD *)(a1 + 1112) ) { v47 = operator new(0x28u); v80 = v47; *(_QWORD *)v47 = 0; v47[2] = 1065353216; v47[3] = 1065353216; v48 = xmmword_1408FE460; *((_WORD *)v47 + 16) = 0; *((_OWORD *)v47 + 1) = v48; *((_WORD *)v47 + 17) = -1; *((_BYTE *)v47 + 36) = -1; *(_QWORD *)(a1 + 1112) = v47; v47[1] = 1; *v47 = 0; } v49 = *(_DWORD **)(a1 + 1112); if ( v49 ) { v49[1] = 1011; *v49 = 0; } LODWORD(v1) = cocos2d::CCArray::count(v44); if ( (unsigned int)v1 > 1 ) { while ( 1 ) { v50 = cocos2d::CCArray::objectAtIndex(v44, v46); if ( v46 == 1 ) break; if ( v46 == 2 ) { v51 = "GJBeast04_02_glow_001.png"; goto LABEL_38; } if ( v46 == 3 ) { v51 = "GJBeast04_01_glow_001.png"; goto LABEL_38; } LABEL_43: ++v46; LODWORD(v1) = cocos2d::CCArray::count(v44); if ( v46 >= (unsigned int)v1 ) return (int)v1; } v51 = "GJBeast04_04_glow_001.png"; LABEL_38: v52 = cocos2d::CCSprite::createWithSpriteFrameName(v51); v53 = v52; if ( v52 ) { (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 1488) + 456LL))( *(_QWORD *)(a1 + 1488), v52, 0xFFFFFFFFLL); v33 = *((_QWORD *)v50 + 75) == 0; *((_BYTE *)v50 + 616) = 1; if ( v33 ) { v55 = (cocos2d::CCObject *)cocos2d::CCArray::create(v54); *((_QWORD *)v50 + 75) = v55; cocos2d::CCObject::retain(v55); } cocos2d::CCArray::addObject(*((cocos2d::CCArray **)v50 + 75), v53); v56 = *(_QWORD *)v50; *((_BYTE *)v50 + 617) = 1; v57 = *(_QWORD *)v53; (*(void (__fastcall **)(struct cocos2d::CCObject *))(v56 + 360))(v50); (*(void (__fastcall **)(struct cocos2d::CCObject *))(v57 + 352))(v53); v58 = *(_QWORD *)v53; (*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v50 + 128LL))(v50); (*(void (__fastcall **)(struct cocos2d::CCObject *))(v58 + 120))(v53); v59 = *(_QWORD *)v53; (*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v50 + 144LL))(v50); (*(void (__fastcall **)(struct cocos2d::CCObject *))(v59 + 136))(v53); v60 = *(_QWORD *)v53; v61 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v50 + 200LL))(v50); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v60 + 184))(v53, v61); if ( v46 == 1 ) *((_QWORD *)v50 + 83) = a1 + 1472; } goto LABEL_43; } return (int)v1; }