//
// GJBaseGameLayer::updateLayerCapacity from 0x86d06c to 0x86dfe8 (3964 bytes)
//
// 2 xrefs:
// > PlayLayer::setupHasCompleted @ 0x5dc314
// > ??> @ 0x8bed8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall GJBaseGameLayer::updateLayerCapacity(GJBaseGameLayer *a1, _QWORD *a2)
{
__int64 v5; // x22
__int64 v6; // x3
unsigned __int64 v7; // x21
__int64 v8; // x25
_QWORD *v9; // x0
char *v10; // x0
unsigned int *v11; // x1
int v12; // w2
char *v13; // x0
signed int v14; // w0
__int64 *v15; // x26
signed int v16; // w24
__int64 *v17; // x22
__int64 *v18; // x25
__int64 v19; // x19
unsigned __int64 i; // x21
unsigned __int64 v21; // x1
unsigned int v22; // w25
signed int v23; // w28
float v24; // s0
cocos2d::CCSpriteBatchNode *v25; // x0
__int64 v26; // x1
__int64 *v27; // x0
unsigned int *v28; // x1
int v29; // w2
unsigned __int64 v30; // x21
__int64 v31; // x22
__int64 v32; // x3
__int64 v33; // x26
const std::string *v34; // x1
cocos2d::CCObject *v35; // x0
char *v36; // x0
char *v37; // x0
unsigned int *v38; // x1
int v39; // w2
unsigned int *v40; // x1
int v41; // w2
char *v42; // x0
cocos2d::CCArray *v43; // x20
cocos2d::CCString *v44; // x0
int v45; // w19
cocos2d::CCString *v46; // x0
cocos2d::CCString *v47; // x0
cocos2d::CCString *v48; // x0
int v49; // w0
unsigned int *v50; // x1
int v51; // w2
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerT2; // x20
cocos2d::CCString *v53; // x0
int v54; // w0
cocos2d::CCSpriteBatchNode *m_gameLayerT1; // x20
cocos2d::CCString *v56; // x0
int v57; // w0
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerT1; // x20
cocos2d::CCString *v59; // x0
int v60; // w0
cocos2d::CCSpriteBatchNode *m_game2LayerT1; // x20
cocos2d::CCString *v62; // x0
int v63; // w0
cocos2d::CCSpriteBatchNode *m_game2BlendingLayerT1; // x20
cocos2d::CCString *v65; // x0
int v66; // w0
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerB0; // x20
cocos2d::CCString *v68; // x0
int v69; // w0
cocos2d::CCSpriteBatchNode *m_gameLayerB1; // x20
cocos2d::CCString *v71; // x0
int v72; // w0
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerB1; // x20
cocos2d::CCString *v74; // x0
int v75; // w0
cocos2d::CCSpriteBatchNode *m_fireLayerB1; // x20
cocos2d::CCString *v77; // x0
int v78; // w0
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerB1; // x20
cocos2d::CCString *v80; // x0
int v81; // w0
cocos2d::CCSpriteBatchNode *m_gameLayerB2; // x20
cocos2d::CCString *v83; // x0
int v84; // w0
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerB2; // x20
cocos2d::CCString *v86; // x0
int v87; // w0
cocos2d::CCSpriteBatchNode *m_glowLayerT1; // x20
cocos2d::CCString *v89; // x0
int v90; // w0
cocos2d::CCSpriteBatchNode *m_glowLayerB1; // x20
cocos2d::CCString *v92; // x0
int v93; // w0
cocos2d::CCSpriteBatchNode *m_glowLayerB2; // x20
cocos2d::CCString *v95; // x0
int v96; // w0
cocos2d::CCSpriteBatchNode *m_gameLayerB4; // x19
cocos2d::CCString *v98; // x0
int v99; // w0
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerB4; // x19
cocos2d::CCString *v101; // x0
int v102; // w0
cocos2d::CCSpriteBatchNode *m_glowLayerB4; // x19
cocos2d::CCString *v104; // x0
int v105; // w0
cocos2d::CCSpriteBatchNode *m_gameLayerB3; // x19
cocos2d::CCString *v107; // x0
int v108; // w0
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerB3; // x19
cocos2d::CCString *v110; // x0
int v111; // w0
cocos2d::CCSpriteBatchNode *m_glowLayerB3; // x19
cocos2d::CCString *v113; // x0
int v114; // w0
cocos2d::CCSpriteBatchNode *m_gameLayerT2; // x19
cocos2d::CCString *v116; // x0
int v117; // w0
cocos2d::CCSpriteBatchNode *m_glowLayerT2; // x19
cocos2d::CCString *v119; // x0
int v120; // w0
cocos2d::CCSpriteBatchNode *m_gameLayerT3; // x19
cocos2d::CCString *v122; // x0
int v123; // w0
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerT3; // x19
cocos2d::CCString *v125; // x0
int v126; // w0
cocos2d::CCSpriteBatchNode *m_glowLayerT3; // x19
cocos2d::CCString *v128; // x0
int v129; // w0
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerT4; // x19
cocos2d::CCString *v131; // x0
int v132; // w0
cocos2d::CCSpriteBatchNode *m_fireLayerT3; // x19
cocos2d::CCString *v134; // x0
int v135; // w0
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerT3; // x19
cocos2d::CCString *v137; // x0
int v138; // w0
cocos2d::CCSpriteBatchNode *m_fireLayerT2; // x19
cocos2d::CCString *v140; // x0
int v141; // w0
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerT2; // x19
cocos2d::CCString *v143; // x0
int v144; // w0
cocos2d::CCSpriteBatchNode *m_fireLayerT1; // x19
cocos2d::CCString *v146; // x0
int v147; // w0
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerT1; // x19
cocos2d::CCString *v149; // x0
int v150; // w0
cocos2d::CCSpriteBatchNode *m_fireLayerB2; // x19
cocos2d::CCString *v152; // x0
int v153; // w0
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerB2; // x19
cocos2d::CCString *v155; // x0
int v156; // w0
cocos2d::CCSpriteBatchNode *m_fireLayerB3; // x19
cocos2d::CCString *v158; // x0
int v159; // w0
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerB3; // x19
cocos2d::CCString *v161; // x0
int v162; // w0
cocos2d::CCSpriteBatchNode *m_fireLayerB4; // x19
cocos2d::CCString *v164; // x0
int v165; // w0
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerB4; // x19
cocos2d::CCString *v167; // x0
int v168; // w0
cocos2d::CCSpriteBatchNode *m_textLayerT3; // x19
cocos2d::CCString *v170; // x0
int v171; // w0
cocos2d::CCSpriteBatchNode *m_textBlendingLayerT3; // x19
cocos2d::CCString *v173; // x0
int v174; // w0
cocos2d::CCSpriteBatchNode *m_textLayerT2; // x19
cocos2d::CCString *v176; // x0
int v177; // w0
cocos2d::CCSpriteBatchNode *m_textBlendingLayerT2; // x19
cocos2d::CCString *v179; // x0
int v180; // w0
cocos2d::CCSpriteBatchNode *m_textLayerT1; // x19
cocos2d::CCString *v182; // x0
int v183; // w0
cocos2d::CCSpriteBatchNode *m_textBlendingLayerT1; // x19
cocos2d::CCString *v185; // x0
int v186; // w0
cocos2d::CCSpriteBatchNode *m_textLayerB1; // x19
cocos2d::CCString *v188; // x0
int v189; // w0
cocos2d::CCSpriteBatchNode *m_textBlendingLayerB1; // x19
cocos2d::CCString *v191; // x0
int v192; // w0
cocos2d::CCSpriteBatchNode *m_textLayerB2; // x19
cocos2d::CCString *v194; // x0
int v195; // w0
cocos2d::CCSpriteBatchNode *m_textBlendingLayerB2; // x19
cocos2d::CCString *v197; // x0
int v198; // w0
cocos2d::CCSpriteBatchNode *m_textLayerB3; // x19
cocos2d::CCString *v200; // x0
int v201; // w0
cocos2d::CCSpriteBatchNode *m_textBlendingLayerB3; // x19
cocos2d::CCString *v203; // x0
int v204; // w0
cocos2d::CCSpriteBatchNode *m_textLayerB4; // x19
cocos2d::CCString *v206; // x0
int v207; // w0
cocos2d::CCSpriteBatchNode *m_textBlendingLayerB4; // x19
cocos2d::CCString *v209; // x0
int v210; // w0
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerT4; // x19
cocos2d::CCString *v212; // x0
int v213; // w0
unsigned int *v214; // x19
int v215; // w1
int v216; // [xsp+70h] [xbp+70h]
cocos2d::CCArray *v217; // [xsp+78h] [xbp+78h]
int v218; // [xsp+78h] [xbp+78h]
char *v219; // [xsp+98h] [xbp+98h] BYREF
void *p; // [xsp+A0h] [xbp+A0h] BYREF
_QWORD *v221; // [xsp+A8h] [xbp+A8h]
_QWORD *v222; // [xsp+B0h] [xbp+B0h]
if ( !*(_QWORD *)(*a2 - 24LL) )
return _stack_chk_guard;
if ( sub_D1641C((int)a2, &byte_F804F8) == -1 )
{
v217 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)0xFFFFFFFFFFFFFFFFLL);
v30 = 0;
v31 = sub_D168E0((int)a2, "_", 0, 1u);
v32 = v31;
v33 = *(_QWORD *)(*a2 - 24LL);
while ( 1 )
{
sub_D14F84(&v219, a2, v30, v32);
if ( v33 != v30 || *((_QWORD *)v219 - 3) )
{
sub_D153B8((int)&p, v219);
v35 = (cocos2d::CCObject *)cocos2d::CCString::create((cocos2d::CCString *)&p, v34);
cocos2d::CCArray::addObject(v217, v35);
v36 = (char *)p - 24;
if ( (char *)p - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v40 = (unsigned int *)((char *)p - 8);
do
v41 = __ldaxr(v40);
while ( __stlxr(v41 - 1, v40) );
}
else
{
v41 = *((_DWORD *)p - 2);
*((_DWORD *)p - 2) = v41 - 1;
}
if ( v41 <= 0 )
operator delete(v36);
}
}
if ( v31 == -1 )
break;
v30 = v31 + 1;
v31 = sub_D168E0((int)a2, "_", (int)v31 + 1, 1u);
v37 = v219 - 24;
if ( v219 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v38 = (unsigned int *)(v219 - 8);
do
v39 = __ldaxr(v38);
while ( __stlxr(v39 - 1, v38) );
}
else
{
v39 = *((_DWORD *)v219 - 2);
*((_DWORD *)v219 - 2) = v39 - 1;
}
if ( v39 <= 0 )
operator delete(v37);
}
v32 = v31 - v30;
if ( *(_QWORD *)(*a2 - 24LL) < v30 )
sub_D13C5C(
"%s: __pos (which is %zu) > this->size() (which is %zu)",
"basic_string::substr",
v30,
*(_QWORD *)(*a2 - 24LL));
}
v42 = v219 - 24;
if ( v219 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v214 = (unsigned int *)(v219 - 8);
do
v215 = __ldaxr(v214);
while ( __stlxr(v215 - 1, v214) );
}
else
{
v215 = *((_DWORD *)v219 - 2);
*((_DWORD *)v219 - 2) = v215 - 1;
}
if ( v215 <= 0 )
operator delete(v42);
}
if ( (unsigned int)cocos2d::CCArray::count(v217) > 3 )
{
if ( (unsigned int)cocos2d::CCArray::count(v217) > 0xF )
{
m_gameBlendingLayerT2 = a1->m_gameBlendingLayerT2;
a1->m_increasedLayerCapacity = 1;
v53 = cocos2d::CCArray::stringAtIndex(v217, 0);
v54 = cocos2d::CCString::intValue(v53);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_gameBlendingLayerT2,
(unsigned int)(float)((float)v54 * 1.1));
m_gameLayerT1 = a1->m_gameLayerT1;
v56 = cocos2d::CCArray::stringAtIndex(v217, 1u);
v57 = cocos2d::CCString::intValue(v56);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameLayerT1, (unsigned int)(float)((float)v57 * 1.1));
m_gameBlendingLayerT1 = a1->m_gameBlendingLayerT1;
v59 = cocos2d::CCArray::stringAtIndex(v217, 2u);
v60 = cocos2d::CCString::intValue(v59);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_gameBlendingLayerT1,
(unsigned int)(float)((float)v60 * 1.1));
m_game2LayerT1 = a1->m_game2LayerT1;
v62 = cocos2d::CCArray::stringAtIndex(v217, 3u);
v63 = cocos2d::CCString::intValue(v62);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_game2LayerT1, (unsigned int)(float)((float)v63 * 1.1));
m_game2BlendingLayerT1 = a1->m_game2BlendingLayerT1;
v65 = cocos2d::CCArray::stringAtIndex(v217, 4u);
v66 = cocos2d::CCString::intValue(v65);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_game2BlendingLayerT1,
(unsigned int)(float)((float)v66 * 1.1));
m_gameBlendingLayerB0 = a1->m_gameBlendingLayerB0;
v68 = cocos2d::CCArray::stringAtIndex(v217, 5u);
v69 = cocos2d::CCString::intValue(v68);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_gameBlendingLayerB0,
(unsigned int)(float)((float)v69 * 1.1));
m_gameLayerB1 = a1->m_gameLayerB1;
v71 = cocos2d::CCArray::stringAtIndex(v217, 6u);
v72 = cocos2d::CCString::intValue(v71);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameLayerB1, (unsigned int)(float)((float)v72 * 1.1));
m_gameBlendingLayerB1 = a1->m_gameBlendingLayerB1;
v74 = cocos2d::CCArray::stringAtIndex(v217, 7u);
v75 = cocos2d::CCString::intValue(v74);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_gameBlendingLayerB1,
(unsigned int)(float)((float)v75 * 1.1));
m_fireLayerB1 = a1->m_fireLayerB1;
v77 = cocos2d::CCArray::stringAtIndex(v217, 8u);
v78 = cocos2d::CCString::intValue(v77);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireLayerB1, (unsigned int)(float)((float)v78 * 1.1));
m_fireBlendingLayerB1 = a1->m_fireBlendingLayerB1;
v80 = cocos2d::CCArray::stringAtIndex(v217, 9u);
v81 = cocos2d::CCString::intValue(v80);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerB1,
(unsigned int)(float)((float)v81 * 1.1));
m_gameLayerB2 = a1->m_gameLayerB2;
v83 = cocos2d::CCArray::stringAtIndex(v217, 0xAu);
v84 = cocos2d::CCString::intValue(v83);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameLayerB2, (unsigned int)(float)((float)v84 * 1.1));
m_gameBlendingLayerB2 = a1->m_gameBlendingLayerB2;
v86 = cocos2d::CCArray::stringAtIndex(v217, 0xBu);
v87 = cocos2d::CCString::intValue(v86);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_gameBlendingLayerB2,
(unsigned int)(float)((float)v87 * 1.1));
m_glowLayerT1 = a1->m_glowLayerT1;
v89 = cocos2d::CCArray::stringAtIndex(v217, 0xCu);
v90 = cocos2d::CCString::intValue(v89);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_glowLayerT1, (unsigned int)(float)((float)v90 * 1.1));
m_glowLayerB1 = a1->m_glowLayerB1;
v92 = cocos2d::CCArray::stringAtIndex(v217, 0xEu);
v93 = cocos2d::CCString::intValue(v92);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_glowLayerB1, (unsigned int)(float)((float)v93 * 1.1));
m_glowLayerB2 = a1->m_glowLayerB2;
v95 = cocos2d::CCArray::stringAtIndex(v217, 0xFu);
v96 = cocos2d::CCString::intValue(v95);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_glowLayerB2, (unsigned int)(float)((float)v96 * 1.1));
if ( (unsigned int)cocos2d::CCArray::count(v217) > 0x36 )
{
a1->m_increasedLayerCapacity = 0;
m_gameLayerB4 = a1->m_gameLayerB4;
v98 = cocos2d::CCArray::stringAtIndex(v217, 0x10u);
v99 = cocos2d::CCString::intValue(v98);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameLayerB4, (unsigned int)(float)((float)v99 * 1.1));
m_gameBlendingLayerB4 = a1->m_gameBlendingLayerB4;
v101 = cocos2d::CCArray::stringAtIndex(v217, 0x11u);
v102 = cocos2d::CCString::intValue(v101);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_gameBlendingLayerB4,
(unsigned int)(float)((float)v102 * 1.1));
m_glowLayerB4 = a1->m_glowLayerB4;
v104 = cocos2d::CCArray::stringAtIndex(v217, 0x12u);
v105 = cocos2d::CCString::intValue(v104);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_glowLayerB4, (unsigned int)(float)((float)v105 * 1.1));
m_gameLayerB3 = a1->m_gameLayerB3;
v107 = cocos2d::CCArray::stringAtIndex(v217, 0x13u);
v108 = cocos2d::CCString::intValue(v107);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameLayerB3, (unsigned int)(float)((float)v108 * 1.1));
m_gameBlendingLayerB3 = a1->m_gameBlendingLayerB3;
v110 = cocos2d::CCArray::stringAtIndex(v217, 0x14u);
v111 = cocos2d::CCString::intValue(v110);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_gameBlendingLayerB3,
(unsigned int)(float)((float)v111 * 1.1));
m_glowLayerB3 = a1->m_glowLayerB3;
v113 = cocos2d::CCArray::stringAtIndex(v217, 0x15u);
v114 = cocos2d::CCString::intValue(v113);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_glowLayerB3, (unsigned int)(float)((float)v114 * 1.1));
m_gameLayerT2 = a1->m_gameLayerT2;
v116 = cocos2d::CCArray::stringAtIndex(v217, 0x16u);
v117 = cocos2d::CCString::intValue(v116);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameLayerT2, (unsigned int)(float)((float)v117 * 1.1));
m_glowLayerT2 = a1->m_glowLayerT2;
v119 = cocos2d::CCArray::stringAtIndex(v217, 0x17u);
v120 = cocos2d::CCString::intValue(v119);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_glowLayerT2, (unsigned int)(float)((float)v120 * 1.1));
m_gameLayerT3 = a1->m_gameLayerT3;
v122 = cocos2d::CCArray::stringAtIndex(v217, 0x18u);
v123 = cocos2d::CCString::intValue(v122);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameLayerT3, (unsigned int)(float)((float)v123 * 1.1));
m_gameBlendingLayerT3 = a1->m_gameBlendingLayerT3;
v125 = cocos2d::CCArray::stringAtIndex(v217, 0x19u);
v126 = cocos2d::CCString::intValue(v125);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_gameBlendingLayerT3,
(unsigned int)(float)((float)v126 * 1.1));
m_glowLayerT3 = a1->m_glowLayerT3;
v128 = cocos2d::CCArray::stringAtIndex(v217, 0x1Au);
v129 = cocos2d::CCString::intValue(v128);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_glowLayerT3, (unsigned int)(float)((float)v129 * 1.1));
m_gameBlendingLayerT4 = a1->m_gameBlendingLayerT4;
v131 = cocos2d::CCArray::stringAtIndex(v217, 0x1Bu);
v132 = cocos2d::CCString::intValue(v131);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_gameBlendingLayerT4,
(unsigned int)(float)((float)v132 * 1.1));
m_fireLayerT3 = a1->m_fireLayerT3;
v134 = cocos2d::CCArray::stringAtIndex(v217, 0x1Cu);
v135 = cocos2d::CCString::intValue(v134);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireLayerT3, (unsigned int)(float)((float)v135 * 1.1));
m_fireBlendingLayerT3 = a1->m_fireBlendingLayerT3;
v137 = cocos2d::CCArray::stringAtIndex(v217, 0x1Du);
v138 = cocos2d::CCString::intValue(v137);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerT3,
(unsigned int)(float)((float)v138 * 1.1));
m_fireLayerT2 = a1->m_fireLayerT2;
v140 = cocos2d::CCArray::stringAtIndex(v217, 0x1Eu);
v141 = cocos2d::CCString::intValue(v140);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireLayerT2, (unsigned int)(float)((float)v141 * 1.1));
m_fireBlendingLayerT2 = a1->m_fireBlendingLayerT2;
v143 = cocos2d::CCArray::stringAtIndex(v217, 0x1Fu);
v144 = cocos2d::CCString::intValue(v143);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerT2,
(unsigned int)(float)((float)v144 * 1.1));
m_fireLayerT1 = a1->m_fireLayerT1;
v146 = cocos2d::CCArray::stringAtIndex(v217, 0x20u);
v147 = cocos2d::CCString::intValue(v146);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireLayerT1, (unsigned int)(float)((float)v147 * 1.1));
m_fireBlendingLayerT1 = a1->m_fireBlendingLayerT1;
v149 = cocos2d::CCArray::stringAtIndex(v217, 0x21u);
v150 = cocos2d::CCString::intValue(v149);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerT1,
(unsigned int)(float)((float)v150 * 1.1));
m_fireLayerB2 = a1->m_fireLayerB2;
v152 = cocos2d::CCArray::stringAtIndex(v217, 0x22u);
v153 = cocos2d::CCString::intValue(v152);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireLayerB2, (unsigned int)(float)((float)v153 * 1.1));
m_fireBlendingLayerB2 = a1->m_fireBlendingLayerB2;
v155 = cocos2d::CCArray::stringAtIndex(v217, 0x23u);
v156 = cocos2d::CCString::intValue(v155);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerB2,
(unsigned int)(float)((float)v156 * 1.1));
m_fireLayerB3 = a1->m_fireLayerB3;
v158 = cocos2d::CCArray::stringAtIndex(v217, 0x24u);
v159 = cocos2d::CCString::intValue(v158);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireLayerB3, (unsigned int)(float)((float)v159 * 1.1));
m_fireBlendingLayerB3 = a1->m_fireBlendingLayerB3;
v161 = cocos2d::CCArray::stringAtIndex(v217, 0x25u);
v162 = cocos2d::CCString::intValue(v161);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerB3,
(unsigned int)(float)((float)v162 * 1.1));
m_fireLayerB4 = a1->m_fireLayerB4;
v164 = cocos2d::CCArray::stringAtIndex(v217, 0x26u);
v165 = cocos2d::CCString::intValue(v164);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireLayerB4, (unsigned int)(float)((float)v165 * 1.1));
m_fireBlendingLayerB4 = a1->m_fireBlendingLayerB4;
v167 = cocos2d::CCArray::stringAtIndex(v217, 0x27u);
v168 = cocos2d::CCString::intValue(v167);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerB4,
(unsigned int)(float)((float)v168 * 1.1));
m_textLayerT3 = a1->m_textLayerT3;
v170 = cocos2d::CCArray::stringAtIndex(v217, 0x28u);
v171 = cocos2d::CCString::intValue(v170);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_textLayerT3, (unsigned int)(float)((float)v171 * 1.1));
m_textBlendingLayerT3 = a1->m_textBlendingLayerT3;
v173 = cocos2d::CCArray::stringAtIndex(v217, 0x29u);
v174 = cocos2d::CCString::intValue(v173);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_textBlendingLayerT3,
(unsigned int)(float)((float)v174 * 1.1));
m_textLayerT2 = a1->m_textLayerT2;
v176 = cocos2d::CCArray::stringAtIndex(v217, 0x2Au);
v177 = cocos2d::CCString::intValue(v176);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_textLayerT2, (unsigned int)(float)((float)v177 * 1.1));
m_textBlendingLayerT2 = a1->m_textBlendingLayerT2;
v179 = cocos2d::CCArray::stringAtIndex(v217, 0x2Bu);
v180 = cocos2d::CCString::intValue(v179);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_textBlendingLayerT2,
(unsigned int)(float)((float)v180 * 1.1));
m_textLayerT1 = a1->m_textLayerT1;
v182 = cocos2d::CCArray::stringAtIndex(v217, 0x2Cu);
v183 = cocos2d::CCString::intValue(v182);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_textLayerT1, (unsigned int)(float)((float)v183 * 1.1));
m_textBlendingLayerT1 = a1->m_textBlendingLayerT1;
v185 = cocos2d::CCArray::stringAtIndex(v217, 0x2Du);
v186 = cocos2d::CCString::intValue(v185);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_textBlendingLayerT1,
(unsigned int)(float)((float)v186 * 1.1));
m_textLayerB1 = a1->m_textLayerB1;
v188 = cocos2d::CCArray::stringAtIndex(v217, 0x2Eu);
v189 = cocos2d::CCString::intValue(v188);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_textLayerB1, (unsigned int)(float)((float)v189 * 1.1));
m_textBlendingLayerB1 = a1->m_textBlendingLayerB1;
v191 = cocos2d::CCArray::stringAtIndex(v217, 0x2Fu);
v192 = cocos2d::CCString::intValue(v191);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_textBlendingLayerB1,
(unsigned int)(float)((float)v192 * 1.1));
m_textLayerB2 = a1->m_textLayerB2;
v194 = cocos2d::CCArray::stringAtIndex(v217, 0x30u);
v195 = cocos2d::CCString::intValue(v194);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_textLayerB2, (unsigned int)(float)((float)v195 * 1.1));
m_textBlendingLayerB2 = a1->m_textBlendingLayerB2;
v197 = cocos2d::CCArray::stringAtIndex(v217, 0x31u);
v198 = cocos2d::CCString::intValue(v197);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_textBlendingLayerB2,
(unsigned int)(float)((float)v198 * 1.1));
m_textLayerB3 = a1->m_textLayerB3;
v200 = cocos2d::CCArray::stringAtIndex(v217, 0x32u);
v201 = cocos2d::CCString::intValue(v200);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_textLayerB3, (unsigned int)(float)((float)v201 * 1.1));
m_textBlendingLayerB3 = a1->m_textBlendingLayerB3;
v203 = cocos2d::CCArray::stringAtIndex(v217, 0x33u);
v204 = cocos2d::CCString::intValue(v203);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_textBlendingLayerB3,
(unsigned int)(float)((float)v204 * 1.1));
m_textLayerB4 = a1->m_textLayerB4;
v206 = cocos2d::CCArray::stringAtIndex(v217, 0x34u);
v207 = cocos2d::CCString::intValue(v206);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_textLayerB4, (unsigned int)(float)((float)v207 * 1.1));
m_textBlendingLayerB4 = a1->m_textBlendingLayerB4;
v209 = cocos2d::CCArray::stringAtIndex(v217, 0x35u);
v210 = cocos2d::CCString::intValue(v209);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_textBlendingLayerB4,
(unsigned int)(float)((float)v210 * 1.1));
m_fireBlendingLayerT4 = a1->m_fireBlendingLayerT4;
v212 = cocos2d::CCArray::stringAtIndex(v217, 0x36u);
v213 = cocos2d::CCString::intValue(v212);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerT4,
(unsigned int)(float)((float)v213 * 1.1));
}
}
else if ( (unsigned int)cocos2d::CCArray::count(v217) > 3 )
{
v43 = v217;
v44 = cocos2d::CCArray::stringAtIndex(v217, 0);
v45 = cocos2d::CCString::intValue(v44);
v46 = cocos2d::CCArray::stringAtIndex(v217, 1u);
v216 = cocos2d::CCString::intValue(v46);
v47 = cocos2d::CCArray::stringAtIndex(v217, 2u);
v218 = cocos2d::CCString::intValue(v47);
v48 = cocos2d::CCArray::stringAtIndex(v43, 3u);
v49 = cocos2d::CCString::intValue(v48);
GJBaseGameLayer::updateLegacyLayerCapacity(a1, v45, v216, v218, v49);
}
}
return _stack_chk_guard;
}
p = nullptr;
v221 = nullptr;
v222 = nullptr;
v5 = sub_D168E0((int)a2, &byte_F804F8, 0, 1u);
v6 = v5;
v7 = 0;
v8 = *(_QWORD *)(*a2 - 24LL);
while ( 1 )
{
sub_D14F84(&v219, a2, v7, v6);
if ( v8 == v7 && !*((_QWORD *)v219 - 3) )
goto LABEL_12;
v9 = v221;
if ( v221 == v222 )
break;
if ( v221 )
{
sub_D18D28(v221);
v9 = v221;
}
v221 = v9 + 1;
LABEL_12:
if ( v5 == -1 )
goto LABEL_20;
LABEL_13:
v7 = v5 + 1;
v5 = sub_D168E0((int)a2, &byte_F804F8, (int)v5 + 1, 1u);
v10 = v219 - 24;
if ( v219 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v11 = (unsigned int *)(v219 - 8);
do
v12 = __ldaxr(v11);
while ( __stlxr(v12 - 1, v11) );
}
else
{
v12 = *((_DWORD *)v219 - 2);
*((_DWORD *)v219 - 2) = v12 - 1;
}
if ( v12 <= 0 )
operator delete(v10);
}
v6 = v5 - v7;
if ( *(_QWORD *)(*a2 - 24LL) < v7 )
sub_D13C5C(
"%s: __pos (which is %zu) > this->size() (which is %zu)",
"basic_string::substr",
v7,
*(_QWORD *)(*a2 - 24LL));
}
std::vector::_M_emplace_back_aux((__int64)&p, (__int64)&v219);
if ( v5 != -1 )
goto LABEL_13;
LABEL_20:
v13 = v219 - 24;
if ( v219 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v50 = (unsigned int *)(v219 - 8);
do
v51 = __ldaxr(v50);
while ( __stlxr(v51 - 1, v50) );
}
else
{
v51 = *((_DWORD *)v219 - 2);
*((_DWORD *)v219 - 2) = v51 - 1;
}
if ( v51 <= 0 )
operator delete(v13);
}
v14 = cocos2d::CCArray::count(a1->m_batchNodes);
v15 = (__int64 *)p;
v16 = v14;
v17 = v221;
v18 = (__int64 *)p;
if ( ((char *)v221 - (_BYTE *)p) >> 3 != 1 )
{
v19 = 0;
for ( i = 2; ; i = v21 )
{
v22 = 10000;
v23 = atoi((const char *)v15[v19]);
v24 = (float)atoi((const char *)v15[v19 + 1]) * 1.1;
if ( v24 < 10000.0 )
v22 = (int)v24;
if ( v16 <= v23 )
{
v18 = v15;
v21 = i + 2;
v19 += 2;
if ( v17 - v15 - 1 <= i )
break;
}
else
{
v25 = (cocos2d::CCSpriteBatchNode *)cocos2d::CCArray::objectAtIndex(a1->m_batchNodes, v23);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(v25, v22);
v15 = (__int64 *)p;
v21 = i + 2;
v17 = v221;
v19 += 2;
v18 = (__int64 *)p;
if ( (((char *)v221 - (_BYTE *)p) >> 3) - 1 <= i )
break;
}
}
}
if ( v15 != v17 )
{
do
{
v26 = *v18;
v27 = (__int64 *)(*v18 - 24);
if ( v27 != &qword_124B6B0 )
{
if ( &pthread_create )
{
v28 = (unsigned int *)(v26 - 8);
do
v29 = __ldaxr(v28);
while ( __stlxr(v29 - 1, v28) );
}
else
{
v29 = *(_DWORD *)(v26 - 8);
*(_DWORD *)(v26 - 8) = v29 - 1;
}
if ( v29 <= 0 )
operator delete(v27);
}
++v18;
}
while ( v18 != v17 );
}
if ( p )
operator delete(p);
return _stack_chk_guard;
}