//
// GJBaseGameLayer::updateLayerCapacity from 0x1001155b0 to 0x100116a13 (5219 bytes)
//
// 1 xrefs:
// > PlayLayer::setupHasCompleted @ 0x1000adde9
//
// 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
//
void __fastcall GJBaseGameLayer::updateLayerCapacity(GJBaseGameLayer *a1, __int64 a2, double a3)
{
unsigned __int8 *v3; // r12
unsigned int v4; // r15d
__int64 v5; // rbx
signed __int64 v6; // rdx
_BYTE *v7; // r14
GJBaseGameLayer *v8; // rax
_BYTE *v9; // rax
__int64 v10; // rax
unsigned int v11; // edx
unsigned __int8 *v12; // rax
__int64 v13; // r15
__int64 v14; // rsi
unsigned __int8 *v15; // rdx
unsigned __int64 v16; // r14
bool v17; // zf
unsigned int v18; // r13d
unsigned __int64 v19; // r13
unsigned __int8 *v20; // rbx
size_t v21; // r13
char *v22; // r14
char v23; // al
const char *v24; // rbx
size_t v25; // r12
size_t v26; // rax
void *v27; // r13
char *v28; // r14
size_t v29; // r12
__int64 v30; // rax
__int64 v31; // rbx
unsigned int v32; // esi
unsigned __int8 *v33; // rax
unsigned __int64 v34; // rsi
unsigned __int8 *v35; // rdx
unsigned __int64 v36; // rdi
cocos2d::CCString *v37; // rax
int v38; // ebx
cocos2d::CCString *v39; // rax
int v40; // r14d
cocos2d::CCString *v41; // rax
int v42; // r15d
cocos2d::CCString *v43; // rax
int v44; // eax
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerT2; // rbx
cocos2d::CCString *v46; // rax
int v47; // eax
cocos2d::CCSpriteBatchNode *m_gameLayerT1; // rbx
cocos2d::CCString *v49; // rax
int v50; // eax
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerT1; // rbx
cocos2d::CCString *v52; // rax
int v53; // eax
cocos2d::CCSpriteBatchNode *m_game2LayerT1; // rbx
cocos2d::CCString *v55; // rax
int v56; // eax
cocos2d::CCSpriteBatchNode *m_game2BlendingLayerT1; // rbx
cocos2d::CCString *v58; // rax
int v59; // eax
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerB0; // rbx
cocos2d::CCString *v61; // rax
int v62; // eax
cocos2d::CCSpriteBatchNode *m_gameLayerB1; // rbx
cocos2d::CCString *v64; // rax
int v65; // eax
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerB1; // rbx
cocos2d::CCString *v67; // rax
int v68; // eax
cocos2d::CCSpriteBatchNode *m_fireLayerB1; // rbx
cocos2d::CCString *v70; // rax
int v71; // eax
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerB1; // rbx
cocos2d::CCString *v73; // rax
int v74; // eax
cocos2d::CCSpriteBatchNode *m_gameLayerB2; // rbx
cocos2d::CCString *v76; // rax
int v77; // eax
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerB2; // rbx
cocos2d::CCString *v79; // rax
int v80; // eax
cocos2d::CCSpriteBatchNode *m_glowLayerT1; // rbx
cocos2d::CCString *v82; // rax
int v83; // eax
cocos2d::CCSpriteBatchNode *m_glowLayerB1; // rbx
cocos2d::CCString *v85; // rax
int v86; // eax
cocos2d::CCSpriteBatchNode *m_glowLayerB2; // rbx
cocos2d::CCString *v88; // rax
int v89; // eax
cocos2d::CCSpriteBatchNode *m_gameLayerB4; // rbx
cocos2d::CCString *v91; // rax
int v92; // eax
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerB4; // rbx
cocos2d::CCString *v94; // rax
int v95; // eax
cocos2d::CCSpriteBatchNode *m_glowLayerB4; // rbx
cocos2d::CCString *v97; // rax
int v98; // eax
cocos2d::CCSpriteBatchNode *m_gameLayerB3; // rbx
cocos2d::CCString *v100; // rax
int v101; // eax
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerB3; // rbx
cocos2d::CCString *v103; // rax
int v104; // eax
cocos2d::CCSpriteBatchNode *m_glowLayerB3; // rbx
cocos2d::CCString *v106; // rax
int v107; // eax
cocos2d::CCSpriteBatchNode *m_gameLayerT2; // rbx
cocos2d::CCString *v109; // rax
int v110; // eax
cocos2d::CCSpriteBatchNode *m_glowLayerT2; // rbx
cocos2d::CCString *v112; // rax
int v113; // eax
cocos2d::CCSpriteBatchNode *m_gameLayerT3; // rbx
cocos2d::CCString *v115; // rax
int v116; // eax
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerT3; // rbx
cocos2d::CCString *v118; // rax
int v119; // eax
cocos2d::CCSpriteBatchNode *m_glowLayerT3; // rbx
cocos2d::CCString *v121; // rax
int v122; // eax
cocos2d::CCSpriteBatchNode *m_gameBlendingLayerT4; // rbx
cocos2d::CCString *v124; // rax
int v125; // eax
cocos2d::CCSpriteBatchNode *m_fireLayerT3; // rbx
cocos2d::CCString *v127; // rax
int v128; // eax
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerT3; // rbx
cocos2d::CCString *v130; // rax
int v131; // eax
cocos2d::CCSpriteBatchNode *m_fireLayerT2; // rbx
cocos2d::CCString *v133; // rax
int v134; // eax
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerT2; // rbx
cocos2d::CCString *v136; // rax
int v137; // eax
cocos2d::CCSpriteBatchNode *m_fireLayerT1; // rbx
cocos2d::CCString *v139; // rax
int v140; // eax
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerT1; // rbx
cocos2d::CCString *v142; // rax
int v143; // eax
cocos2d::CCSpriteBatchNode *m_fireLayerB2; // rbx
cocos2d::CCString *v145; // rax
int v146; // eax
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerB2; // rbx
cocos2d::CCString *v148; // rax
int v149; // eax
cocos2d::CCSpriteBatchNode *m_fireLayerB3; // rbx
cocos2d::CCString *v151; // rax
int v152; // eax
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerB3; // rbx
cocos2d::CCString *v154; // rax
int v155; // eax
cocos2d::CCSpriteBatchNode *m_fireLayerB4; // rbx
cocos2d::CCString *v157; // rax
int v158; // eax
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerB4; // rbx
cocos2d::CCString *v160; // rax
int v161; // eax
cocos2d::CCSpriteBatchNode *m_textLayerT3; // rbx
cocos2d::CCString *v163; // rax
int v164; // eax
cocos2d::CCSpriteBatchNode *m_textBlendingLayerT3; // rbx
cocos2d::CCString *v166; // rax
int v167; // eax
cocos2d::CCSpriteBatchNode *m_textLayerT2; // rbx
cocos2d::CCString *v169; // rax
int v170; // eax
cocos2d::CCSpriteBatchNode *m_textBlendingLayerT2; // rbx
cocos2d::CCString *v172; // rax
int v173; // eax
cocos2d::CCSpriteBatchNode *m_textLayerT1; // rbx
cocos2d::CCString *v175; // rax
int v176; // eax
cocos2d::CCSpriteBatchNode *m_textBlendingLayerT1; // rbx
cocos2d::CCString *v178; // rax
int v179; // eax
cocos2d::CCSpriteBatchNode *m_textLayerB1; // rbx
cocos2d::CCString *v181; // rax
int v182; // eax
cocos2d::CCSpriteBatchNode *m_textBlendingLayerB1; // rbx
cocos2d::CCString *v184; // rax
int v185; // eax
cocos2d::CCSpriteBatchNode *m_textLayerB2; // rbx
cocos2d::CCString *v187; // rax
int v188; // eax
cocos2d::CCSpriteBatchNode *m_textBlendingLayerB2; // rbx
cocos2d::CCString *v190; // rax
int v191; // eax
cocos2d::CCSpriteBatchNode *m_textLayerB3; // rbx
cocos2d::CCString *v193; // rax
int v194; // eax
cocos2d::CCSpriteBatchNode *m_textBlendingLayerB3; // rbx
cocos2d::CCString *v196; // rax
int v197; // eax
cocos2d::CCSpriteBatchNode *m_textLayerB4; // rbx
cocos2d::CCString *v199; // rax
int v200; // eax
cocos2d::CCSpriteBatchNode *m_textBlendingLayerB4; // rbx
cocos2d::CCString *v202; // rax
int v203; // eax
cocos2d::CCSpriteBatchNode *m_fireBlendingLayerT4; // rbx
cocos2d::CCString *v205; // rax
int v206; // eax
unsigned __int8 *v207; // r14
double v208; // xmm0_8
unsigned __int8 *v209; // rax
__int64 v210; // rcx
__int64 v211; // r15
__int64 v212; // rsi
unsigned __int8 *v213; // rcx
unsigned __int8 *v214; // rdx
unsigned __int64 v215; // rcx
unsigned int v216; // r13d
unsigned __int64 v217; // r13
size_t v218; // r13
char *v219; // rbx
size_t v220; // r12
__int64 v221; // rcx
__int64 v222; // rbx
unsigned __int64 v223; // r13
_OWORD *v224; // r14
char *v225; // r14
unsigned int v226; // esi
unsigned __int8 *v227; // rax
unsigned __int64 v228; // rsi
unsigned __int8 *v229; // rdx
unsigned __int64 v230; // rdi
void **v231; // r12
void **v232; // r13
void **v233; // rdi
__int64 v234; // r14
unsigned __int64 v235; // r15
const char *v236; // rdi
int v237; // eax
char v238; // bl
const char *v239; // rdi
float v240; // xmm0_4
int v241; // eax
const char *v242; // rdi
unsigned int v243; // ebx
cocos2d::CCSpriteBatchNode *v244; // rax
cocos2d::CCArray *v245; // [rsp+8h] [rbp-88h]
unsigned __int8 *v246; // [rsp+10h] [rbp-80h]
int v247; // [rsp+10h] [rbp-80h]
__int64 v248; // [rsp+18h] [rbp-78h]
unsigned __int8 *v249; // [rsp+18h] [rbp-78h]
unsigned __int8 *v250; // [rsp+20h] [rbp-70h]
__int64 v251; // [rsp+20h] [rbp-70h]
GJBaseGameLayer *v252; // [rsp+28h] [rbp-68h]
void *v253[2]; // [rsp+30h] [rbp-60h] BYREF
void *__p; // [rsp+40h] [rbp-50h]
__int128 __dst; // [rsp+48h] [rbp-48h] BYREF
void *v256; // [rsp+58h] [rbp-38h]
unsigned __int64 v257; // [rsp+60h] [rbp-30h]
v3 = (unsigned __int8 *)a2;
v252 = a1;
v4 = *(unsigned __int8 *)a2;
if ( (v4 & 1) != 0 )
{
v6 = *(_QWORD *)(a2 + 8);
if ( !v6 )
return;
v5 = *(_QWORD *)(a2 + 16);
v246 = (unsigned __int8 *)a2;
if ( v6 <= 0 )
goto LABEL_13;
}
else
{
if ( !*(_BYTE *)a2 )
return;
v5 = a2 + 1;
v6 = v4 >> 1;
v246 = (unsigned __int8 *)a2;
if ( !(v4 >> 1) )
goto LABEL_13;
}
v7 = (_BYTE *)(v5 + v6);
v8 = (GJBaseGameLayer *)v5;
while ( 1 )
{
a1 = v8;
a2 = 44;
v9 = memchr(v8, 44, v6);
if ( !v9 )
goto LABEL_13;
if ( *v9 == 44 )
break;
v8 = (GJBaseGameLayer *)(v9 + 1);
v6 = v7 - (_BYTE *)v8;
if ( v7 - (_BYTE *)v8 <= 0 )
goto LABEL_13;
}
if ( v9 == v7 || &v9[-v5 + 1] == nullptr )
{
LABEL_13:
v10 = sub_10071F9E0(a1, a2);
v11 = *v3;
v245 = (cocos2d::CCArray *)v10;
v250 = v3 + 1;
if ( (v11 & 1) != 0 )
{
v12 = *((unsigned __int8 **)v3 + 2);
v13 = -1;
v248 = *((_QWORD *)v3 + 1);
if ( !v248 )
goto LABEL_23;
}
else
{
v12 = v3 + 1;
v13 = -1;
v248 = v11 >> 1;
if ( !(v11 >> 1) )
{
LABEL_23:
v16 = 0;
while ( 1 )
{
v18 = *v3;
if ( (v18 & 1) != 0 )
{
v19 = *((_QWORD *)v3 + 1);
if ( v19 < v16 )
LABEL_154:
sub_1000547C0();
v20 = *((unsigned __int8 **)v3 + 2);
}
else
{
v19 = v18 >> 1;
v20 = v250;
if ( v16 > v19 )
goto LABEL_154;
}
v21 = v19 - v16;
if ( v21 >= v13 - v16 )
v21 = v13 - v16;
if ( v21 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(a3);
v257 = v16;
if ( v21 >= 0x17 )
{
v25 = (v21 | 7) + 1;
if ( (v21 | 7) == 0x17 )
v25 = 26;
v22 = (char *)operator new(v25);
v256 = v22;
*(_QWORD *)&__dst = v25 + 1;
v3 = v246;
*((_QWORD *)&__dst + 1) = v21;
}
else
{
LOBYTE(__dst) = 2 * v21;
v22 = (char *)&__dst + 1;
if ( !v21 )
{
BYTE1(__dst) = 0;
v23 = __dst;
if ( (__dst & 1) == 0 )
goto LABEL_36;
goto LABEL_43;
}
}
memmove(v22, &v20[v257], v21);
v22[v21] = 0;
v23 = __dst;
if ( (__dst & 1) == 0 )
{
LABEL_36:
v16 = v257;
if ( !v23 && v257 == v248 )
goto LABEL_56;
v24 = (char *)&__dst + 1;
goto LABEL_46;
}
LABEL_43:
v16 = v257;
if ( !*((_QWORD *)&__dst + 1) && v257 == v248 )
goto LABEL_56;
v24 = (const char *)v256;
LABEL_46:
v26 = strlen(v24);
if ( v26 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(a3);
v27 = (void *)v26;
if ( v26 >= 0x17 )
{
v29 = (v26 | 7) + 1;
if ( (v26 | 7) == 0x17 )
v29 = 26;
v28 = (char *)operator new(v29);
__p = v28;
v253[0] = (void *)(v29 | 1);
v253[1] = v27;
v3 = v246;
LABEL_53:
memmove(v28, v24, (size_t)v27);
goto LABEL_54;
}
LOBYTE(v253[0]) = 2 * v26;
v28 = (char *)v253 + 1;
if ( v26 )
goto LABEL_53;
LABEL_54:
*((_BYTE *)v27 + (_QWORD)v28) = 0;
v30 = sub_1007AB360(v253);
sub_10071FCD0(v245, v30);
v16 = v257;
if ( ((__int64)v253[0] & 1) != 0 )
operator delete(__p);
LABEL_56:
v31 = -1;
if ( v13 != -1 )
{
v32 = *v3;
if ( (v32 & 1) != 0 )
{
v33 = *((unsigned __int8 **)v3 + 2);
v34 = *((_QWORD *)v3 + 1);
v16 = v13 + 1;
if ( v34 > v13 + 1 )
goto LABEL_63;
}
else
{
v34 = v32 >> 1;
v33 = v250;
v16 = v13 + 1;
if ( v34 > v13 + 1 )
{
LABEL_63:
v35 = &v33[v16];
v36 = v34 + ~v13;
while ( *v35 != 95 )
{
++v35;
if ( !--v36 )
{
v35 = &v33[v34];
break;
}
}
v31 = v35 - v33;
if ( v35 == &v33[v34] )
v31 = -1;
}
}
}
if ( (__dst & 1) != 0 )
operator delete(v256);
v17 = v13 == -1;
v13 = v31;
if ( v17 )
{
if ( (unsigned int)sub_100720070(v245) >= 4 )
{
if ( (unsigned int)sub_100720070(v245) > 0xF )
{
v252->m_increasedLayerCapacity = 1;
m_gameBlendingLayerT2 = v252->m_gameBlendingLayerT2;
v46 = cocos2d::CCArray::stringAtIndex(v245, 0);
v47 = cocos2d::CCString::intValue(v46);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameBlendingLayerT2, (int)(float)((float)v47 * 1.1));
m_gameLayerT1 = v252->m_gameLayerT1;
v49 = cocos2d::CCArray::stringAtIndex(v245, 1u);
v50 = cocos2d::CCString::intValue(v49);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameLayerT1, (int)(float)((float)v50 * 1.1));
m_gameBlendingLayerT1 = v252->m_gameBlendingLayerT1;
v52 = cocos2d::CCArray::stringAtIndex(v245, 2u);
v53 = cocos2d::CCString::intValue(v52);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameBlendingLayerT1, (int)(float)((float)v53 * 1.1));
m_game2LayerT1 = v252->m_game2LayerT1;
v55 = cocos2d::CCArray::stringAtIndex(v245, 3u);
v56 = cocos2d::CCString::intValue(v55);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_game2LayerT1, (int)(float)((float)v56 * 1.1));
m_game2BlendingLayerT1 = v252->m_game2BlendingLayerT1;
v58 = cocos2d::CCArray::stringAtIndex(v245, 4u);
v59 = cocos2d::CCString::intValue(v58);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_game2BlendingLayerT1,
(int)(float)((float)v59 * 1.1));
m_gameBlendingLayerB0 = v252->m_gameBlendingLayerB0;
v61 = cocos2d::CCArray::stringAtIndex(v245, 5u);
v62 = cocos2d::CCString::intValue(v61);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameBlendingLayerB0, (int)(float)((float)v62 * 1.1));
m_gameLayerB1 = v252->m_gameLayerB1;
v64 = cocos2d::CCArray::stringAtIndex(v245, 6u);
v65 = cocos2d::CCString::intValue(v64);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameLayerB1, (int)(float)((float)v65 * 1.1));
m_gameBlendingLayerB1 = v252->m_gameBlendingLayerB1;
v67 = cocos2d::CCArray::stringAtIndex(v245, 7u);
v68 = cocos2d::CCString::intValue(v67);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameBlendingLayerB1, (int)(float)((float)v68 * 1.1));
m_fireLayerB1 = v252->m_fireLayerB1;
v70 = cocos2d::CCArray::stringAtIndex(v245, 8u);
v71 = cocos2d::CCString::intValue(v70);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireLayerB1, (int)(float)((float)v71 * 1.1));
m_fireBlendingLayerB1 = v252->m_fireBlendingLayerB1;
v73 = cocos2d::CCArray::stringAtIndex(v245, 9u);
v74 = cocos2d::CCString::intValue(v73);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireBlendingLayerB1, (int)(float)((float)v74 * 1.1));
m_gameLayerB2 = v252->m_gameLayerB2;
v76 = cocos2d::CCArray::stringAtIndex(v245, 0xAu);
v77 = cocos2d::CCString::intValue(v76);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameLayerB2, (int)(float)((float)v77 * 1.1));
m_gameBlendingLayerB2 = v252->m_gameBlendingLayerB2;
v79 = cocos2d::CCArray::stringAtIndex(v245, 0xBu);
v80 = cocos2d::CCString::intValue(v79);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameBlendingLayerB2, (int)(float)((float)v80 * 1.1));
m_glowLayerT1 = v252->m_glowLayerT1;
v82 = cocos2d::CCArray::stringAtIndex(v245, 0xCu);
v83 = cocos2d::CCString::intValue(v82);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_glowLayerT1, (int)(float)((float)v83 * 1.1));
m_glowLayerB1 = v252->m_glowLayerB1;
v85 = cocos2d::CCArray::stringAtIndex(v245, 0xEu);
v86 = cocos2d::CCString::intValue(v85);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_glowLayerB1, (int)(float)((float)v86 * 1.1));
m_glowLayerB2 = v252->m_glowLayerB2;
v88 = cocos2d::CCArray::stringAtIndex(v245, 0xFu);
v89 = cocos2d::CCString::intValue(v88);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_glowLayerB2, (int)(float)((float)v89 * 1.1));
if ( (unsigned int)sub_100720070(v245) >= 0x37 )
{
v252->m_increasedLayerCapacity = 0;
m_gameLayerB4 = v252->m_gameLayerB4;
v91 = cocos2d::CCArray::stringAtIndex(v245, 0x10u);
v92 = cocos2d::CCString::intValue(v91);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameLayerB4, (int)(float)((float)v92 * 1.1));
m_gameBlendingLayerB4 = v252->m_gameBlendingLayerB4;
v94 = cocos2d::CCArray::stringAtIndex(v245, 0x11u);
v95 = cocos2d::CCString::intValue(v94);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_gameBlendingLayerB4,
(int)(float)((float)v95 * 1.1));
m_glowLayerB4 = v252->m_glowLayerB4;
v97 = cocos2d::CCArray::stringAtIndex(v245, 0x12u);
v98 = cocos2d::CCString::intValue(v97);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_glowLayerB4, (int)(float)((float)v98 * 1.1));
m_gameLayerB3 = v252->m_gameLayerB3;
v100 = cocos2d::CCArray::stringAtIndex(v245, 0x13u);
v101 = cocos2d::CCString::intValue(v100);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameLayerB3, (int)(float)((float)v101 * 1.1));
m_gameBlendingLayerB3 = v252->m_gameBlendingLayerB3;
v103 = cocos2d::CCArray::stringAtIndex(v245, 0x14u);
v104 = cocos2d::CCString::intValue(v103);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_gameBlendingLayerB3,
(int)(float)((float)v104 * 1.1));
m_glowLayerB3 = v252->m_glowLayerB3;
v106 = cocos2d::CCArray::stringAtIndex(v245, 0x15u);
v107 = cocos2d::CCString::intValue(v106);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_glowLayerB3, (int)(float)((float)v107 * 1.1));
m_gameLayerT2 = v252->m_gameLayerT2;
v109 = cocos2d::CCArray::stringAtIndex(v245, 0x16u);
v110 = cocos2d::CCString::intValue(v109);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameLayerT2, (int)(float)((float)v110 * 1.1));
m_glowLayerT2 = v252->m_glowLayerT2;
v112 = cocos2d::CCArray::stringAtIndex(v245, 0x17u);
v113 = cocos2d::CCString::intValue(v112);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_glowLayerT2, (int)(float)((float)v113 * 1.1));
m_gameLayerT3 = v252->m_gameLayerT3;
v115 = cocos2d::CCArray::stringAtIndex(v245, 0x18u);
v116 = cocos2d::CCString::intValue(v115);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_gameLayerT3, (int)(float)((float)v116 * 1.1));
m_gameBlendingLayerT3 = v252->m_gameBlendingLayerT3;
v118 = cocos2d::CCArray::stringAtIndex(v245, 0x19u);
v119 = cocos2d::CCString::intValue(v118);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_gameBlendingLayerT3,
(int)(float)((float)v119 * 1.1));
m_glowLayerT3 = v252->m_glowLayerT3;
v121 = cocos2d::CCArray::stringAtIndex(v245, 0x1Au);
v122 = cocos2d::CCString::intValue(v121);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_glowLayerT3, (int)(float)((float)v122 * 1.1));
m_gameBlendingLayerT4 = v252->m_gameBlendingLayerT4;
v124 = cocos2d::CCArray::stringAtIndex(v245, 0x1Bu);
v125 = cocos2d::CCString::intValue(v124);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_gameBlendingLayerT4,
(int)(float)((float)v125 * 1.1));
m_fireLayerT3 = v252->m_fireLayerT3;
v127 = cocos2d::CCArray::stringAtIndex(v245, 0x1Cu);
v128 = cocos2d::CCString::intValue(v127);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireLayerT3, (int)(float)((float)v128 * 1.1));
m_fireBlendingLayerT3 = v252->m_fireBlendingLayerT3;
v130 = cocos2d::CCArray::stringAtIndex(v245, 0x1Du);
v131 = cocos2d::CCString::intValue(v130);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerT3,
(int)(float)((float)v131 * 1.1));
m_fireLayerT2 = v252->m_fireLayerT2;
v133 = cocos2d::CCArray::stringAtIndex(v245, 0x1Eu);
v134 = cocos2d::CCString::intValue(v133);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireLayerT2, (int)(float)((float)v134 * 1.1));
m_fireBlendingLayerT2 = v252->m_fireBlendingLayerT2;
v136 = cocos2d::CCArray::stringAtIndex(v245, 0x1Fu);
v137 = cocos2d::CCString::intValue(v136);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerT2,
(int)(float)((float)v137 * 1.1));
m_fireLayerT1 = v252->m_fireLayerT1;
v139 = cocos2d::CCArray::stringAtIndex(v245, 0x20u);
v140 = cocos2d::CCString::intValue(v139);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireLayerT1, (int)(float)((float)v140 * 1.1));
m_fireBlendingLayerT1 = v252->m_fireBlendingLayerT1;
v142 = cocos2d::CCArray::stringAtIndex(v245, 0x21u);
v143 = cocos2d::CCString::intValue(v142);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerT1,
(int)(float)((float)v143 * 1.1));
m_fireLayerB2 = v252->m_fireLayerB2;
v145 = cocos2d::CCArray::stringAtIndex(v245, 0x22u);
v146 = cocos2d::CCString::intValue(v145);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireLayerB2, (int)(float)((float)v146 * 1.1));
m_fireBlendingLayerB2 = v252->m_fireBlendingLayerB2;
v148 = cocos2d::CCArray::stringAtIndex(v245, 0x23u);
v149 = cocos2d::CCString::intValue(v148);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerB2,
(int)(float)((float)v149 * 1.1));
m_fireLayerB3 = v252->m_fireLayerB3;
v151 = cocos2d::CCArray::stringAtIndex(v245, 0x24u);
v152 = cocos2d::CCString::intValue(v151);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireLayerB3, (int)(float)((float)v152 * 1.1));
m_fireBlendingLayerB3 = v252->m_fireBlendingLayerB3;
v154 = cocos2d::CCArray::stringAtIndex(v245, 0x25u);
v155 = cocos2d::CCString::intValue(v154);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerB3,
(int)(float)((float)v155 * 1.1));
m_fireLayerB4 = v252->m_fireLayerB4;
v157 = cocos2d::CCArray::stringAtIndex(v245, 0x26u);
v158 = cocos2d::CCString::intValue(v157);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_fireLayerB4, (int)(float)((float)v158 * 1.1));
m_fireBlendingLayerB4 = v252->m_fireBlendingLayerB4;
v160 = cocos2d::CCArray::stringAtIndex(v245, 0x27u);
v161 = cocos2d::CCString::intValue(v160);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerB4,
(int)(float)((float)v161 * 1.1));
m_textLayerT3 = v252->m_textLayerT3;
v163 = cocos2d::CCArray::stringAtIndex(v245, 0x28u);
v164 = cocos2d::CCString::intValue(v163);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_textLayerT3, (int)(float)((float)v164 * 1.1));
m_textBlendingLayerT3 = v252->m_textBlendingLayerT3;
v166 = cocos2d::CCArray::stringAtIndex(v245, 0x29u);
v167 = cocos2d::CCString::intValue(v166);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_textBlendingLayerT3,
(int)(float)((float)v167 * 1.1));
m_textLayerT2 = v252->m_textLayerT2;
v169 = cocos2d::CCArray::stringAtIndex(v245, 0x2Au);
v170 = cocos2d::CCString::intValue(v169);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_textLayerT2, (int)(float)((float)v170 * 1.1));
m_textBlendingLayerT2 = v252->m_textBlendingLayerT2;
v172 = cocos2d::CCArray::stringAtIndex(v245, 0x2Bu);
v173 = cocos2d::CCString::intValue(v172);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_textBlendingLayerT2,
(int)(float)((float)v173 * 1.1));
m_textLayerT1 = v252->m_textLayerT1;
v175 = cocos2d::CCArray::stringAtIndex(v245, 0x2Cu);
v176 = cocos2d::CCString::intValue(v175);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_textLayerT1, (int)(float)((float)v176 * 1.1));
m_textBlendingLayerT1 = v252->m_textBlendingLayerT1;
v178 = cocos2d::CCArray::stringAtIndex(v245, 0x2Du);
v179 = cocos2d::CCString::intValue(v178);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_textBlendingLayerT1,
(int)(float)((float)v179 * 1.1));
m_textLayerB1 = v252->m_textLayerB1;
v181 = cocos2d::CCArray::stringAtIndex(v245, 0x2Eu);
v182 = cocos2d::CCString::intValue(v181);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_textLayerB1, (int)(float)((float)v182 * 1.1));
m_textBlendingLayerB1 = v252->m_textBlendingLayerB1;
v184 = cocos2d::CCArray::stringAtIndex(v245, 0x2Fu);
v185 = cocos2d::CCString::intValue(v184);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_textBlendingLayerB1,
(int)(float)((float)v185 * 1.1));
m_textLayerB2 = v252->m_textLayerB2;
v187 = cocos2d::CCArray::stringAtIndex(v245, 0x30u);
v188 = cocos2d::CCString::intValue(v187);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_textLayerB2, (int)(float)((float)v188 * 1.1));
m_textBlendingLayerB2 = v252->m_textBlendingLayerB2;
v190 = cocos2d::CCArray::stringAtIndex(v245, 0x31u);
v191 = cocos2d::CCString::intValue(v190);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_textBlendingLayerB2,
(int)(float)((float)v191 * 1.1));
m_textLayerB3 = v252->m_textLayerB3;
v193 = cocos2d::CCArray::stringAtIndex(v245, 0x32u);
v194 = cocos2d::CCString::intValue(v193);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_textLayerB3, (int)(float)((float)v194 * 1.1));
m_textBlendingLayerB3 = v252->m_textBlendingLayerB3;
v196 = cocos2d::CCArray::stringAtIndex(v245, 0x33u);
v197 = cocos2d::CCString::intValue(v196);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_textBlendingLayerB3,
(int)(float)((float)v197 * 1.1));
m_textLayerB4 = v252->m_textLayerB4;
v199 = cocos2d::CCArray::stringAtIndex(v245, 0x34u);
v200 = cocos2d::CCString::intValue(v199);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(m_textLayerB4, (int)(float)((float)v200 * 1.1));
m_textBlendingLayerB4 = v252->m_textBlendingLayerB4;
v202 = cocos2d::CCArray::stringAtIndex(v245, 0x35u);
v203 = cocos2d::CCString::intValue(v202);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_textBlendingLayerB4,
(int)(float)((float)v203 * 1.1));
m_fireBlendingLayerT4 = v252->m_fireBlendingLayerT4;
v205 = cocos2d::CCArray::stringAtIndex(v245, 0x36u);
v206 = cocos2d::CCString::intValue(v205);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(
m_fireBlendingLayerT4,
(int)(float)((float)v206 * 1.1));
}
}
else if ( (unsigned int)sub_100720070(v245) >= 4 )
{
v37 = cocos2d::CCArray::stringAtIndex(v245, 0);
v38 = cocos2d::CCString::intValue(v37);
v39 = cocos2d::CCArray::stringAtIndex(v245, 1u);
v40 = cocos2d::CCString::intValue(v39);
v41 = cocos2d::CCArray::stringAtIndex(v245, 2u);
v42 = cocos2d::CCString::intValue(v41);
v43 = cocos2d::CCArray::stringAtIndex(v245, 3u);
v44 = cocos2d::CCString::intValue(v43);
GJBaseGameLayer::updateLegacyLayerCapacity(v252, v38, v40, v42, v44);
}
}
return;
}
}
}
}
v14 = v248;
v15 = v12;
do
{
if ( *v15 == 95 )
goto LABEL_21;
++v15;
--v14;
}
while ( v14 );
v15 = &v12[v248];
LABEL_21:
v13 = -1;
if ( v15 != &v12[v248] )
v13 = v15 - v12;
goto LABEL_23;
}
v207 = v3 + 1;
v208 = 0.0;
*(_OWORD *)v253 = 0;
__p = nullptr;
if ( (v4 & 1) != 0 )
{
v209 = *((unsigned __int8 **)v3 + 2);
v210 = *((_QWORD *)v3 + 1);
}
else
{
v209 = v3 + 1;
v210 = v4 >> 1;
}
v211 = -1;
v251 = v210;
if ( v210 )
{
v212 = v210;
v213 = &v209[v210];
v214 = v209;
while ( *v214 != 44 )
{
++v214;
if ( !--v212 )
{
v214 = &v209[v251];
break;
}
}
v211 = -1;
if ( v214 != v213 )
v211 = v214 - v209;
}
v215 = 0;
v249 = v3 + 1;
do
{
v216 = *v3;
if ( (v216 & 1) != 0 )
{
v217 = *((_QWORD *)v3 + 1);
if ( v217 < v215 )
LABEL_157:
sub_1000547C0();
v207 = *((unsigned __int8 **)v3 + 2);
}
else
{
v217 = v216 >> 1;
if ( v215 > v217 )
goto LABEL_157;
}
v218 = v217 - v215;
if ( v218 >= v211 - v215 )
v218 = v211 - v215;
if ( v218 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v208);
v257 = v215;
if ( v218 >= 0x17 )
{
v220 = (v218 | 7) + 1;
if ( (v218 | 7) == 0x17 )
v220 = 26;
v219 = (char *)operator new(v220);
v256 = v219;
*(_QWORD *)&__dst = v220 | 1;
*((_QWORD *)&__dst + 1) = v218;
v3 = v246;
LABEL_103:
memmove(v219, &v207[v257], v218);
goto LABEL_104;
}
LOBYTE(__dst) = 2 * v218;
v219 = (char *)&__dst + 1;
if ( v218 )
goto LABEL_103;
LABEL_104:
v219[v218] = 0;
v221 = (unsigned __int8)__dst >> 1;
if ( (__dst & 1) != 0 )
v221 = *((_QWORD *)&__dst + 1);
if ( v221 || v257 != v251 )
{
v224 = v253[1];
if ( v253[1] >= __p )
{
v225 = sub_100054890((__int64)v253, (__int64)&__dst, v208);
}
else
{
if ( (__dst & 1) != 0 )
{
sub_100006B70((_QWORD *)v253[1], v256, *((unsigned __int64 *)&__dst + 1), v208);
}
else
{
*((_QWORD *)v253[1] + 2) = v256;
v208 = *(double *)&__dst;
*v224 = __dst;
}
v225 = (char *)v224 + 24;
}
v253[1] = v225;
v222 = -1;
v207 = v249;
if ( v211 == -1 )
{
LABEL_109:
v215 = v257;
goto LABEL_110;
}
}
else
{
v222 = -1;
v207 = v249;
if ( v211 == -1 )
goto LABEL_109;
}
v226 = *v3;
if ( (v226 & 1) != 0 )
{
v227 = *((unsigned __int8 **)v3 + 2);
v228 = *((_QWORD *)v3 + 1);
v215 = v211 + 1;
if ( v228 <= v211 + 1 )
goto LABEL_110;
}
else
{
v228 = v226 >> 1;
v227 = v207;
v215 = v211 + 1;
if ( v228 <= v211 + 1 )
goto LABEL_110;
}
v229 = &v227[v215];
v230 = v228 + ~v211;
while ( *v229 != 44 )
{
++v229;
if ( !--v230 )
{
v229 = &v227[v228];
break;
}
}
v222 = v229 - v227;
if ( v229 == &v227[v228] )
v222 = -1;
LABEL_110:
if ( (__dst & 1) != 0 )
{
v223 = v215;
operator delete(v256);
v215 = v223;
}
v17 = v211 == -1;
v211 = v222;
}
while ( !v17 );
v247 = sub_100720070(v252->m_batchNodes);
v231 = (void **)v253[0];
v232 = (void **)v253[1];
if ( (void *)((char *)v253[1] - (char *)v253[0]) != (void *)24 )
{
v234 = 25;
v235 = 0;
do
{
if ( (*((_BYTE *)v231 + v234 - 25) & 1) != 0 )
v236 = *(const char **)((char *)v231 + v234 - 9);
else
v236 = (char *)v231 + v234 - 24;
v237 = atoi(v236);
v238 = *((_BYTE *)v231 + v234 - 1);
LODWORD(v257) = v237;
if ( (v238 & 1) != 0 )
v239 = *(const char **)((char *)v231 + v234 + 15);
else
v239 = (char *)v231 + v234;
v240 = (float)atoi(v239) * 1.1;
v241 = 10000;
if ( v240 < 10000.0 )
{
if ( (v238 & 1) != 0 )
v242 = *(const char **)((char *)v231 + v234 + 15);
else
v242 = (char *)v231 + v234;
v241 = (int)(float)((float)atoi(v242) * 1.1);
}
if ( (int)v257 < v247 )
{
v243 = v241;
v244 = (cocos2d::CCSpriteBatchNode *)sub_1007200C0(v252->m_batchNodes, (unsigned int)v257);
cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(v244, v243);
v231 = (void **)v253[0];
v232 = (void **)v253[1];
}
v235 += 2LL;
v234 += 48;
}
while ( 0xAAAAAAAAAAAAAAABLL * (v232 - v231) - 1 > v235 );
}
if ( v231 )
{
v233 = v231;
if ( v232 != v231 )
{
do
{
if ( (*(_BYTE *)(v232 - 3) & 1) != 0 )
operator delete(*(v232 - 1));
v232 -= 3;
}
while ( v232 != v231 );
v233 = (void **)v253[0];
}
v253[1] = v231;
operator delete(v233);
}
}