//
// GameObject::addColorSprite from 0x776804 to 0x777ed0 (5836 bytes)
//
// 8 xrefs:
// > PlayLayer::setupHasCompleted @ 0x708154
// > GameObject::objectFromVector @ 0x7813c4
// > LevelEditorLayer::copyObjectState @ 0x792c84
// > LevelEditorLayer::copyParticleState @ 0x7939bc
// > LevelEditorLayer::createObject @ 0x7a1464
// > GJBaseGameLayer::createPlayerCollisionBlock @ 0x9aeb80
// > EditorUI::getCreateBtn @ 0xbe22d8
// > ??> @ 0x700d8
//
// 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:53:15 +0000
//
__int64 __fastcall GameObject::addColorSprite(cocos2d::CCObject **a1, unsigned __int8 *a2)
{
int v4; // w0
cocos2d::CCObject *v5; // x0
cocos2d::CCObject *v6; // x21
void (__fastcall *v7)(cocos2d::CCObject *, __int64); // x22
__int64 v8; // x0
char v10; // w0
__int64 v11; // x5
void *v12; // x0
cocos2d::CCSprite *v13; // x0
__int64 v14; // x0
char v15; // w1
cocos2d::CCObject *v16; // x21
void (__fastcall *v17)(cocos2d::CCObject *, __int64); // x22
__int64 v18; // x0
char *v19; // x0
cocos2d::CCSprite *v20; // x0
cocos2d::CCObject *v21; // x0
char v22; // w1
cocos2d::CCObject *v23; // x21
void (__fastcall *v24)(cocos2d::CCObject *, __int64); // x22
__int64 v25; // x0
cocos2d::CCSprite *v26; // x0
cocos2d::CCObject *v27; // x0
char v28; // w1
char *v29; // x0
cocos2d::CCSprite *v30; // x0
char v31; // w1
cocos2d::CCObject *v32; // x0
cocos2d::CCObject *v33; // x21
void (__fastcall *v34)(cocos2d::CCObject *, __int64); // x22
__int64 v35; // x0
char v36; // w0
__int64 v37; // x5
void *v38; // x0
cocos2d::CCSprite *v39; // x0
__int64 v40; // x0
char v41; // w1
cocos2d::CCObject *v42; // x21
void (__fastcall *v43)(cocos2d::CCObject *, __int64); // x22
__int64 v44; // x0
char v45; // w0
__int64 v46; // x5
void *v47; // x0
cocos2d::CCSprite *v48; // x0
__int64 v49; // x0
char v50; // w1
cocos2d::CCObject *v51; // x21
void (__fastcall *v52)(cocos2d::CCObject *, __int64); // x22
__int64 v53; // x0
char *v54; // x0
cocos2d::CCSprite *v55; // x0
char v56; // w1
char *v57; // x0
cocos2d::CCSprite *v58; // x0
cocos2d::CCObject *v59; // x0
char v60; // w1
cocos2d::CCObject *v61; // x21
void (__fastcall *v62)(cocos2d::CCObject *, __int64); // x22
__int64 v63; // x0
char *v64; // x0
cocos2d::CCSprite *v65; // x0
char v66; // w1
cocos2d::CCObject *v67; // x21
void (__fastcall *v68)(cocos2d::CCObject *, __int64); // x22
__int64 v69; // x0
cocos2d::CCSprite *v70; // x0
const char *v71; // x1
cocos2d::CCObject *v72; // x0
cocos2d::CCObject *v73; // x21
void (__fastcall *v74)(cocos2d::CCObject *, __int64); // x22
__int64 v75; // x0
char v76; // w0
__int64 v77; // x5
void *v78; // x0
cocos2d::CCSprite *v79; // x0
__int64 v80; // x0
char v81; // w1
cocos2d::CCObject *v82; // x21
void (__fastcall *v83)(cocos2d::CCObject *, __int64); // x22
__int64 v84; // x0
__int64 v85; // [xsp+38h] [xbp+38h] BYREF
__int64 v86; // [xsp+40h] [xbp+40h]
void *v87; // [xsp+48h] [xbp+48h]
__int64 v88[2]; // [xsp+50h] [xbp+50h] BYREF
cocos2d::CCSprite *v89; // [xsp+60h] [xbp+60h]
v4 = *((_DWORD *)a1 + 257);
if ( v4 > 2392 )
{
if ( v4 == 3027 )
goto LABEL_114;
if ( v4 > 3027 )
{
if ( v4 > 3591 )
{
if ( v4 > 4076 )
{
if ( v4 > 4180 )
{
if ( v4 > 4360 )
{
if ( v4 > 4399 )
{
if ( (unsigned int)(v4 - 4401) > 0x8A )
return _stack_chk_guard;
}
else if ( v4 < 4384 && (unsigned int)(v4 - 4362) > 5 )
{
return _stack_chk_guard;
}
}
else if ( v4 < 4314 && (v4 < 4185 || v4 > 4200 && (unsigned int)(v4 - 4202) > 0x6E) )
{
return _stack_chk_guard;
}
}
else if ( v4 < 4174 )
{
if ( v4 > 4155 )
{
if ( v4 < 4158 || v4 > 4160 && (unsigned int)(v4 - 4163) > 9 )
return _stack_chk_guard;
}
else if ( v4 < 4154 && (v4 < 4085 || v4 > 4145 && (unsigned int)(v4 - 4148) > 3) )
{
return _stack_chk_guard;
}
}
}
else if ( v4 < 4070 )
{
if ( v4 > 4009 )
{
if ( v4 > 4039 )
{
if ( v4 > 4066 )
{
if ( v4 != 4068 )
return _stack_chk_guard;
}
else if ( v4 < 4064 && (unsigned int)(v4 - 4046) > 0x10 )
{
return _stack_chk_guard;
}
}
else if ( v4 < 4034 && (v4 < 4012 || v4 > 4022 && (unsigned int)(v4 - 4024) > 5) )
{
return _stack_chk_guard;
}
}
else if ( v4 < 4000 )
{
if ( v4 > 3790 )
{
if ( v4 != 3792 && (v4 < 3792 || (unsigned int)(v4 - 3794) > 5) )
return _stack_chk_guard;
}
else if ( v4 < 3780 && (v4 < 3593 || v4 > 3597 && (unsigned int)(v4 - 3702) > 0x4C) )
{
return _stack_chk_guard;
}
}
}
}
else if ( v4 < 3586 )
{
if ( v4 > 3166 )
{
if ( v4 > 3510 )
{
if ( v4 > 3555 )
{
if ( v4 != 3567 )
{
if ( v4 <= 3567 )
{
if ( (unsigned int)(v4 - 3559) > 3 )
return _stack_chk_guard;
}
else if ( (unsigned int)(v4 - 3571) > 0xC )
{
return _stack_chk_guard;
}
}
}
else if ( v4 < 3549 && (v4 < 3512 || v4 > 3541 && (unsigned int)(v4 - 3544) > 2) )
{
return _stack_chk_guard;
}
}
else if ( v4 < 3501 )
{
if ( v4 > 3351 )
{
if ( v4 > 3397 )
{
if ( (unsigned int)(v4 - 3402) > 0x5B )
return _stack_chk_guard;
}
else if ( v4 < 3360 && v4 != 3358 )
{
return _stack_chk_guard;
}
}
else if ( v4 < 3336 && (v4 < 3169 || v4 > 3178 && (unsigned int)(v4 - 3181) > 0x99) )
{
return _stack_chk_guard;
}
}
}
else if ( v4 < 3162 && v4 != 3103 )
{
if ( v4 > 3103 )
{
if ( v4 > 3129 )
{
if ( v4 < 3132 || v4 > 3141 && (unsigned int)(v4 - 3143) > 9 )
return _stack_chk_guard;
}
else if ( v4 < 3118 && v4 != 3109 )
{
if ( v4 > 3109 )
{
if ( v4 != 3112 && v4 != 3114 )
return _stack_chk_guard;
}
else if ( v4 != 3105 && v4 != 3107 )
{
return _stack_chk_guard;
}
}
}
else
{
if ( v4 <= 3066 )
{
if ( v4 < 3054 && v4 != 3050 )
{
if ( v4 > 3050 )
{
if ( v4 != 3052 )
return _stack_chk_guard;
}
else if ( (unsigned int)(v4 - 3034) > 3 )
{
return _stack_chk_guard;
}
}
goto LABEL_114;
}
if ( v4 == 3088 )
goto LABEL_114;
if ( v4 <= 3088 )
{
if ( (unsigned int)(v4 - 3080) > 6 )
return _stack_chk_guard;
goto LABEL_114;
}
if ( v4 == 3090 )
goto LABEL_114;
if ( v4 != 3101 )
return _stack_chk_guard;
}
}
}
}
else if ( v4 != 2644 )
{
if ( v4 <= 2644 )
{
if ( v4 <= 2554 )
{
if ( v4 < 2550 )
{
if ( v4 <= 2495 )
{
if ( v4 < 2488 )
{
if ( v4 > 2454 )
{
if ( v4 < 2456 || v4 > 2465 && (unsigned int)(v4 - 2467) > 0x10 )
return _stack_chk_guard;
}
else if ( v4 < 2452 && (v4 < 2396 || v4 > 2405 && (unsigned int)(v4 - 2407) > 0x1A) )
{
return _stack_chk_guard;
}
}
}
else if ( v4 <= 2538 )
{
if ( v4 < 2526 && (v4 < 2498 || v4 > 2518 && v4 != 2524) )
return _stack_chk_guard;
}
else if ( v4 != 2544 )
{
if ( v4 > 2544 )
{
if ( v4 != 2546 && v4 != 2548 )
return _stack_chk_guard;
}
else if ( v4 != 2540 && v4 != 2542 )
{
return _stack_chk_guard;
}
}
}
}
else if ( v4 != 2578 )
{
if ( v4 <= 2578 )
{
if ( v4 != 2566 )
{
if ( v4 <= 2566 )
{
if ( v4 > 2559 )
{
if ( v4 != 2562 && v4 != 2564 )
return _stack_chk_guard;
}
else if ( v4 < 2558 && v4 != 2556 )
{
return _stack_chk_guard;
}
}
else if ( v4 != 2572 )
{
if ( v4 <= 2572 )
{
if ( v4 != 2568 && v4 != 2570 )
return _stack_chk_guard;
}
else if ( v4 != 2574 && v4 != 2576 )
{
return _stack_chk_guard;
}
}
}
}
else if ( v4 <= 2630 )
{
if ( v4 < 2626 && (v4 < 2580 || v4 > 2592 && (unsigned int)(v4 - 2598) > 8) )
return _stack_chk_guard;
}
else if ( v4 > 2634 )
{
if ( v4 != 2640 && v4 != 2642 && v4 != 2637 )
return _stack_chk_guard;
}
else if ( v4 < 2632 )
{
sub_775DC0("pixelart_454_001.png", "_001.png", "_color_001.png", v88);
v26 = (cocos2d::CCSprite *)((char *)v88 + 1);
if ( (v88[0] & 1) != 0 )
v26 = v89;
v27 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v26, (const char *)LOBYTE(v88[0]));
v28 = v88[0];
a1[111] = v27;
if ( (v28 & 1) != 0 )
{
operator delete(v89);
v27 = a1[111];
}
goto LABEL_163;
}
}
goto LABEL_132;
}
if ( v4 != 2732 )
{
if ( v4 <= 2732 )
{
if ( v4 != 2673 )
{
if ( v4 > 2673 )
{
if ( v4 > 2689 )
{
if ( v4 > 2700 )
{
if ( (unsigned int)(v4 - 2703) > 1 )
return _stack_chk_guard;
}
else if ( v4 < 2696 && (unsigned int)(v4 - 2691) > 3 )
{
return _stack_chk_guard;
}
}
else if ( v4 < 2687 && v4 != 2679 )
{
if ( v4 <= 2679 )
{
if ( v4 != 2676 )
return _stack_chk_guard;
}
else if ( v4 != 2681 && v4 != 2684 )
{
return _stack_chk_guard;
}
}
}
else if ( v4 != 2660 )
{
if ( v4 > 2660 )
{
if ( v4 != 2666 )
{
if ( v4 <= 2666 )
{
if ( v4 != 2662 && v4 != 2664 )
return _stack_chk_guard;
}
else if ( v4 != 2668 && v4 != 2670 )
{
return _stack_chk_guard;
}
}
}
else if ( v4 != 2651 )
{
if ( v4 <= 2651 )
{
if ( v4 != 2647 && v4 != 2649 )
return _stack_chk_guard;
}
else if ( v4 != 2654 && v4 != 2657 )
{
return _stack_chk_guard;
}
}
}
}
goto LABEL_132;
}
if ( v4 != 2776 )
{
if ( v4 <= 2776 )
{
if ( v4 != 2755 )
{
if ( v4 > 2755 )
{
if ( v4 > 2770 )
{
if ( v4 != 2773 )
return _stack_chk_guard;
}
else if ( v4 < 2764 && v4 != 2758 && v4 != 2761 )
{
return _stack_chk_guard;
}
}
else if ( v4 != 2741 )
{
if ( v4 > 2741 )
{
if ( (unsigned int)(v4 - 2744) > 8 )
return _stack_chk_guard;
}
else if ( v4 != 2735 && v4 != 2738 )
{
return _stack_chk_guard;
}
}
}
}
else if ( v4 != 2802 )
{
if ( v4 <= 2802 )
{
if ( v4 != 2785 )
{
if ( v4 > 2785 )
{
if ( v4 != 2796 && v4 != 2799 )
return _stack_chk_guard;
}
else if ( v4 != 2779 && v4 != 2782 )
{
return _stack_chk_guard;
}
}
}
else if ( v4 <= 2837 )
{
if ( v4 >= 2808 )
goto LABEL_132;
if ( v4 != 2805 )
return _stack_chk_guard;
}
else if ( v4 > 2849 )
{
if ( v4 != 2903 )
return _stack_chk_guard;
goto LABEL_49;
}
}
}
}
v64 = (char *)(a2 + 1);
if ( (*a2 & 1) != 0 )
v64 = *((char **)a2 + 2);
sub_775DC0(v64, "_001.png", "_2_001.png", v88);
v65 = (cocos2d::CCSprite *)((char *)v88 + 1);
if ( (v88[0] & 1) != 0 )
v65 = v89;
v27 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v65, (const char *)LOBYTE(v88[0]));
v66 = v88[0];
a1[111] = v27;
if ( (v66 & 1) != 0 )
{
operator delete(v89);
v27 = a1[111];
}
goto LABEL_163;
}
LABEL_132:
v54 = (char *)(a2 + 1);
if ( (*a2 & 1) != 0 )
v54 = *((char **)a2 + 2);
sub_775DC0(v54, "_001.png", "_color_001.png", v88);
v55 = (cocos2d::CCSprite *)((char *)v88 + 1);
if ( (v88[0] & 1) != 0 )
v55 = v89;
v27 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v55, (const char *)LOBYTE(v88[0]));
v56 = v88[0];
a1[111] = v27;
if ( (v56 & 1) != 0 )
{
operator delete(v89);
v27 = a1[111];
}
goto LABEL_163;
}
if ( v4 >= 2359 )
goto LABEL_132;
if ( v4 > 1472 )
{
if ( v4 == 1803 )
goto LABEL_114;
if ( v4 <= 1803 )
{
if ( v4 > 1624 )
{
if ( v4 > 1703 )
{
if ( v4 <= 1784 )
{
if ( v4 < 1781 && (v4 < 1708 || v4 > 1710 && (unsigned int)(v4 - 1734) > 2) )
return _stack_chk_guard;
}
else if ( v4 != 1797 )
{
if ( v4 <= 1797 )
{
if ( v4 != 1793 )
return _stack_chk_guard;
}
else if ( v4 != 1799 && v4 != 1801 )
{
return _stack_chk_guard;
}
}
}
else if ( v4 < 1685 )
{
if ( v4 > 1642 )
{
if ( v4 < 1645 || v4 > 1646 && (unsigned int)(v4 - 1649) > 1 )
return _stack_chk_guard;
}
else if ( v4 < 1641 )
{
if ( v4 > 1632 )
{
if ( (unsigned int)(v4 - 1637) > 1 )
return _stack_chk_guard;
}
else if ( v4 < 1629 && v4 != 1627 )
{
return _stack_chk_guard;
}
}
}
goto LABEL_114;
}
if ( v4 < 1623 && v4 != 1586 )
{
if ( v4 <= 1586 )
{
if ( v4 != 1516 )
{
if ( v4 > 1516 )
{
if ( v4 <= 1560 )
{
if ( v4 < 1552 )
{
if ( v4 == 1517 )
{
v5 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"waterfallAnim_color_007.png",
_stack_chk_guard);
a1[111] = v5;
cocos2d::CCObject::retain(v5);
v6 = a1[111];
v7 = *(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v6 + 184LL);
v8 = (*((__int64 (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v7(v6, v8);
GameObject::createSpriteColor((GameObject *)a1, 2);
GameObject::setDefaultSecondaryColorMode((GameObject *)a1, 1012);
}
return _stack_chk_guard;
}
goto LABEL_164;
}
if ( (unsigned int)(v4 - 1582) > 1 )
return _stack_chk_guard;
goto LABEL_144;
}
if ( v4 != 1507 )
{
if ( v4 > 1507 )
{
if ( v4 < 1510 )
return _stack_chk_guard;
}
else if ( v4 != 1473 && v4 != 1496 )
{
return _stack_chk_guard;
}
goto LABEL_114;
}
}
LABEL_144:
v57 = (char *)(a2 + 1);
if ( (*a2 & 1) != 0 )
v57 = *((char **)a2 + 2);
sub_775DC0(v57, "_00", "_color_00", v88);
v58 = (cocos2d::CCSprite *)((char *)v88 + 1);
if ( (v88[0] & 1) != 0 )
v58 = v89;
v59 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v58, (const char *)LOBYTE(v88[0]));
v60 = v88[0];
a1[111] = v59;
if ( (v60 & 1) != 0 )
{
operator delete(v89);
v59 = a1[111];
}
cocos2d::CCObject::retain(v59);
v61 = a1[111];
v62 = *(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v61 + 184LL);
v63 = (*((__int64 (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v62(v61, v63);
GameObject::createSpriteColor((GameObject *)a1, 2);
GameObject::setDefaultSecondaryColorMode((GameObject *)a1, 1012);
return _stack_chk_guard;
}
if ( v4 == 1599 )
goto LABEL_181;
if ( v4 > 1599 )
{
if ( v4 == 1617 )
goto LABEL_144;
if ( v4 > 1617 )
{
if ( (unsigned int)(v4 - 1619) > 2 )
return _stack_chk_guard;
}
else if ( v4 > 1601 )
{
return _stack_chk_guard;
}
}
else if ( v4 != 1591 )
{
if ( v4 <= 1591 )
{
if ( v4 != 1588 && v4 != 1590 )
return _stack_chk_guard;
goto LABEL_181;
}
if ( (unsigned int)(v4 - 1593) > 1 )
return _stack_chk_guard;
}
}
goto LABEL_114;
}
if ( v4 == 2093 )
goto LABEL_75;
if ( v4 <= 2093 )
{
if ( v4 > 1921 )
{
if ( v4 > 2054 )
{
if ( v4 > 2076 )
{
if ( (unsigned int)(v4 - 2078) > 0xA )
return _stack_chk_guard;
}
else if ( v4 < 2070 )
{
if ( v4 != 2065 )
return _stack_chk_guard;
goto LABEL_114;
}
goto LABEL_75;
}
if ( v4 >= 2051 )
{
LABEL_75:
v29 = (char *)(a2 + 1);
if ( (*a2 & 1) != 0 )
v29 = *((char **)a2 + 2);
sub_775DC0(v29, "_00", "_color_00", v88);
v30 = (cocos2d::CCSprite *)((char *)v88 + 1);
if ( (v88[0] & 1) != 0 )
v30 = v89;
v27 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v30, (const char *)LOBYTE(v88[0]));
v31 = v88[0];
a1[111] = v27;
if ( (v31 & 1) != 0 )
{
operator delete(v89);
v27 = a1[111];
}
LABEL_163:
cocos2d::CCObject::retain(v27);
v67 = a1[111];
v68 = *(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v67 + 184LL);
v69 = (*((__int64 (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v68(v67, v69);
GameObject::createSpriteColor((GameObject *)a1, 2);
GameObject::setDefaultSecondaryColorMode((GameObject *)a1, 2);
return _stack_chk_guard;
}
if ( v4 != 1928 )
{
if ( v4 > 1928 )
{
if ( v4 != 2046 )
return _stack_chk_guard;
goto LABEL_75;
}
if ( v4 > 1926 )
return _stack_chk_guard;
}
LABEL_181:
v76 = *a2;
v85 = 0;
v86 = 0;
v87 = nullptr;
if ( (v76 & 1) != 0 )
{
std::string::__init(&v85, *((void **)a2 + 2), *((_QWORD *)a2 + 1));
}
else
{
v77 = *((_QWORD *)a2 + 1);
v78 = *((void **)a2 + 2);
v85 = *(_QWORD *)a2;
v86 = v77;
v87 = v78;
}
GameObject::getColorFrame((__int64)&v85, (unsigned __int64 *)v88);
v79 = (cocos2d::CCSprite *)((char *)v88 + 1);
if ( (v88[0] & 1) != 0 )
v79 = v89;
v80 = cocos2d::CCSprite::createWithSpriteFrameName(v79, (const char *)LOBYTE(v88[0]));
v81 = v88[0];
a1[111] = (cocos2d::CCObject *)v80;
if ( (v81 & 1) != 0 )
operator delete(v89);
if ( (v85 & 1) != 0 )
operator delete(v87);
cocos2d::CCObject::retain(a1[111]);
v82 = a1[111];
v83 = *(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v82 + 184LL);
v84 = (*((__int64 (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v83(v82, v84);
GameObject::createSpriteColor((GameObject *)a1, 2);
GameObject::setDefaultSecondaryColorMode((GameObject *)a1, 1012);
return _stack_chk_guard;
}
if ( v4 >= 1919 )
goto LABEL_114;
if ( v4 <= 1857 )
{
if ( v4 < 1849 )
{
if ( v4 != 1807 )
{
if ( v4 <= 1807 )
{
if ( v4 != 1805 )
return _stack_chk_guard;
}
else if ( v4 != 1809 && v4 != 1843 )
{
return _stack_chk_guard;
}
}
goto LABEL_114;
}
goto LABEL_49;
}
if ( v4 > 1885 )
{
if ( (unsigned int)(v4 - 1910) > 1 )
return _stack_chk_guard;
goto LABEL_114;
}
if ( v4 < 1861 )
{
if ( v4 != 1860 )
return _stack_chk_guard;
LABEL_49:
v19 = (char *)(a2 + 1);
if ( (*a2 & 1) != 0 )
v19 = *((char **)a2 + 2);
sub_775DC0(v19, "_00", "_color_00", v88);
v20 = (cocos2d::CCSprite *)((char *)v88 + 1);
if ( (v88[0] & 1) != 0 )
v20 = v89;
v21 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v20, (const char *)LOBYTE(v88[0]));
v22 = v88[0];
a1[111] = v21;
if ( (v22 & 1) != 0 )
{
operator delete(v89);
v21 = a1[111];
}
cocos2d::CCObject::retain(v21);
v23 = a1[111];
v24 = *(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v23 + 184LL);
v25 = (*((__int64 (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v24(v23, v25);
GameObject::createSpriteColor((GameObject *)a1, 2);
return _stack_chk_guard;
}
LABEL_114:
v45 = *a2;
v85 = 0;
v86 = 0;
v87 = nullptr;
if ( (v45 & 1) != 0 )
{
std::string::__init(&v85, *((void **)a2 + 2), *((_QWORD *)a2 + 1));
}
else
{
v46 = *((_QWORD *)a2 + 1);
v47 = *((void **)a2 + 2);
v85 = *(_QWORD *)a2;
v86 = v46;
v87 = v47;
}
GameObject::getColorFrame((__int64)&v85, (unsigned __int64 *)v88);
v48 = (cocos2d::CCSprite *)((char *)v88 + 1);
if ( (v88[0] & 1) != 0 )
v48 = v89;
v49 = cocos2d::CCSprite::createWithSpriteFrameName(v48, (const char *)LOBYTE(v88[0]));
v50 = v88[0];
a1[111] = (cocos2d::CCObject *)v49;
if ( (v50 & 1) != 0 )
operator delete(v89);
if ( (v85 & 1) != 0 )
operator delete(v87);
cocos2d::CCObject::retain(a1[111]);
v51 = a1[111];
v52 = *(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v51 + 184LL);
v53 = (*((__int64 (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v52(v51, v53);
GameObject::createSpriteColor((GameObject *)a1, 2);
return _stack_chk_guard;
}
if ( v4 > 2154 )
{
if ( v4 > 2313 )
{
if ( v4 > 2347 )
{
if ( (unsigned int)(v4 - 2353) > 2 )
return _stack_chk_guard;
}
else if ( v4 < 2340 && (unsigned int)(v4 - 2315) > 0x14 )
{
return _stack_chk_guard;
}
}
else if ( v4 < 2207 && (v4 < 2156 || v4 > 2176 && (unsigned int)(v4 - 2179) > 0x1A) )
{
return _stack_chk_guard;
}
}
else if ( v4 < 2143 )
{
if ( v4 > 2131 )
{
if ( v4 < 2133 || v4 > 2136 && (unsigned int)(v4 - 2138) > 3 )
return _stack_chk_guard;
}
else if ( v4 < 2125 && (v4 < 2098 || v4 > 2119 && (unsigned int)(v4 - 2122) > 1) )
{
return _stack_chk_guard;
}
}
goto LABEL_132;
}
if ( v4 >= 1471 )
goto LABEL_144;
if ( v4 <= 874 )
{
if ( v4 >= 867 )
goto LABEL_114;
if ( v4 > 482 )
{
if ( v4 <= 765 )
{
if ( v4 < 762 )
{
if ( v4 > 708 )
{
if ( v4 > 757 )
{
if ( v4 != 759 )
return _stack_chk_guard;
}
else if ( v4 < 756 && (unsigned int)(v4 - 752) > 2 )
{
return _stack_chk_guard;
}
}
else if ( v4 < 703 && (v4 < 485 || v4 > 491 && (unsigned int)(v4 - 678) > 2) )
{
return _stack_chk_guard;
}
}
goto LABEL_114;
}
if ( v4 > 848 )
{
if ( v4 > 857 )
{
if ( v4 != 859 )
return _stack_chk_guard;
}
else if ( v4 < 853 && v4 != 850 )
{
return _stack_chk_guard;
}
goto LABEL_144;
}
if ( v4 < 845 && v4 != 841 )
{
if ( v4 > 841 )
{
if ( v4 != 843 )
return _stack_chk_guard;
}
else if ( (unsigned int)(v4 - 769) > 5 )
{
return _stack_chk_guard;
}
}
goto LABEL_114;
}
if ( v4 >= 477 )
goto LABEL_114;
if ( v4 <= 261 )
{
if ( v4 < 260 )
{
if ( v4 > 220 )
{
if ( v4 < 247 || v4 > 250 && (unsigned int)(v4 - 252) > 6 )
return _stack_chk_guard;
}
else if ( v4 < 215 && (v4 < 207 || v4 > 210 && (unsigned int)(v4 - 212) > 1) )
{
return _stack_chk_guard;
}
}
goto LABEL_114;
}
if ( v4 > 272 )
{
if ( v4 > 399 )
{
if ( (unsigned int)(v4 - 453) > 5 )
return _stack_chk_guard;
}
else if ( v4 < 397 && (unsigned int)(v4 - 274) > 1 )
{
return _stack_chk_guard;
}
goto LABEL_114;
}
if ( v4 >= 269 )
goto LABEL_114;
if ( v4 >= 263 && v4 != 266 )
{
v32 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"lightsquare_04_05_color_001.png",
_stack_chk_guard);
a1[111] = v32;
cocos2d::CCObject::retain(v32);
v33 = a1[111];
v34 = *(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v33 + 184LL);
v35 = (*((__int64 (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v34(v33, v35);
GameObject::createSpriteColor((GameObject *)a1, 2);
}
}
else
{
if ( v4 <= 975 )
{
if ( v4 < 974 )
{
if ( v4 > 904 )
{
if ( v4 > 961 )
{
if ( v4 < 964 || v4 > 965 && (unsigned int)(v4 - 967) > 5 )
return _stack_chk_guard;
}
else if ( v4 < 959 )
{
if ( v4 > 954 )
{
if ( (unsigned int)(v4 - 956) > 1 )
return _stack_chk_guard;
}
else if ( v4 < 952 && v4 != 939 )
{
return _stack_chk_guard;
}
}
}
else if ( v4 < 903 )
{
if ( v4 > 889 )
{
if ( v4 != 891 && (v4 < 891 || (unsigned int)(v4 - 893) > 1) )
return _stack_chk_guard;
}
else if ( v4 < 888 && (v4 < 877 || v4 > 878 && (unsigned int)(v4 - 880) > 5) )
{
return _stack_chk_guard;
}
}
}
goto LABEL_114;
}
if ( v4 > 1267 )
{
if ( v4 > 1440 )
{
if ( v4 < 1442 || v4 > 1448 && (unsigned int)(v4 - 1461) > 3 )
return _stack_chk_guard;
goto LABEL_114;
}
if ( v4 < 1431 )
{
if ( v4 > 1365 )
{
if ( (unsigned int)(v4 - 1387) > 8 )
return _stack_chk_guard;
goto LABEL_114;
}
if ( v4 < 1348 )
{
if ( v4 != 1276 )
return _stack_chk_guard;
goto LABEL_181;
}
}
goto LABEL_114;
}
if ( v4 >= 1266 )
goto LABEL_114;
if ( v4 > 1040 )
{
if ( v4 == 1062 )
goto LABEL_114;
if ( v4 > 1062 )
{
if ( (unsigned int)(v4 - 1159) > 2 )
return _stack_chk_guard;
goto LABEL_114;
}
if ( (unsigned int)(v4 - 1053) <= 1 )
{
v36 = *a2;
v85 = 0;
v86 = 0;
v87 = nullptr;
if ( (v36 & 1) != 0 )
{
std::string::__init(&v85, *((void **)a2 + 2), *((_QWORD *)a2 + 1));
}
else
{
v37 = *((_QWORD *)a2 + 1);
v38 = *((void **)a2 + 2);
v85 = *(_QWORD *)a2;
v86 = v37;
v87 = v38;
}
GameObject::getColorFrame((__int64)&v85, (unsigned __int64 *)v88);
v39 = (cocos2d::CCSprite *)((char *)v88 + 1);
if ( (v88[0] & 1) != 0 )
v39 = v89;
v40 = cocos2d::CCSprite::createWithSpriteFrameName(v39, (const char *)LOBYTE(v88[0]));
v41 = v88[0];
a1[111] = (cocos2d::CCObject *)v40;
if ( (v41 & 1) != 0 )
operator delete(v89);
if ( (v85 & 1) != 0 )
operator delete(v87);
cocos2d::CCObject::retain(a1[111]);
v42 = a1[111];
v43 = *(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v42 + 184LL);
v44 = (*((__int64 (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v43(v42, v44);
GameObject::createSpriteColor((GameObject *)a1, 2);
GameObject::setDefaultSecondaryColorMode((GameObject *)a1, 1010);
}
}
else
{
if ( v4 >= 1033 )
goto LABEL_114;
if ( v4 < 980 )
return _stack_chk_guard;
if ( v4 <= 988 )
{
LABEL_164:
v70 = (cocos2d::CCSprite *)(a2 + 1);
v71 = (const char *)*a2;
if ( ((unsigned __int8)v71 & 1) != 0 )
v70 = *((cocos2d::CCSprite **)a2 + 2);
v72 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v70, v71);
a1[111] = v72;
cocos2d::CCObject::retain(v72);
v73 = a1[111];
v74 = *(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v73 + 184LL);
v75 = (*((__int64 (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v74(v73, v75);
GameObject::createSpriteColor((GameObject *)a1, 2);
*((_BYTE *)a1[111] + 559) = 1;
return _stack_chk_guard;
}
if ( (unsigned int)(v4 - 1001) <= 4 )
{
v10 = *a2;
v85 = 0;
v86 = 0;
v87 = nullptr;
if ( (v10 & 1) != 0 )
{
std::string::__init(&v85, *((void **)a2 + 2), *((_QWORD *)a2 + 1));
}
else
{
v11 = *((_QWORD *)a2 + 1);
v12 = *((void **)a2 + 2);
v85 = *(_QWORD *)a2;
v86 = v11;
v87 = v12;
}
GameObject::getColorFrame((__int64)&v85, (unsigned __int64 *)v88);
v13 = (cocos2d::CCSprite *)((char *)v88 + 1);
if ( (v88[0] & 1) != 0 )
v13 = v89;
v14 = cocos2d::CCSprite::createWithSpriteFrameName(v13, (const char *)LOBYTE(v88[0]));
v15 = v88[0];
a1[111] = (cocos2d::CCObject *)v14;
if ( (v15 & 1) != 0 )
operator delete(v89);
if ( (v85 & 1) != 0 )
operator delete(v87);
cocos2d::CCObject::retain(a1[111]);
v16 = a1[111];
v17 = *(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v16 + 184LL);
v18 = (*((__int64 (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v17(v16, v18);
GameObject::createSpriteColor((GameObject *)a1, 2);
GameObject::setDefaultSecondaryColorMode((GameObject *)a1, 1006);
}
}
}
return _stack_chk_guard;
}