//
// GJBaseGameLayer::increaseBatchNodeCapacity from 0x1000f16b0 to 0x1000f1742 (146 bytes)
//
// 2 xrefs:
// > PlayLayer::setupHasCompleted @ 0x10007b3b7
// > LevelEditorLayer::init @ 0x1000aac2c
//
// 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 12:21:11 +0000
//
unsigned int *__fastcall GJBaseGameLayer::increaseBatchNodeCapacity(__int64 a1, __int64 a2, __int64 a3)
{
double v3; // xmm0_8
__int64 v4; // rax
int v5; // ebx
unsigned int *result; // rax
_QWORD *v7; // r15
unsigned __int64 v8; // r12
__int64 v9; // r14
*(_QWORD *)&v3 = GameManager::sharedState(a1, a2, a3).u64[0];
v5 = 200;
if ( (unsigned __int8)GameManager::getGameVariable(v4, "0066") )
v5 = 1000;
result = *(unsigned int **)(a1 + 3984);
if ( result )
{
result = *((unsigned int **)result + 7);
if ( *result )
{
v7 = *((_QWORD **)result + 2);
v8 = (unsigned __int64)&v7[*result - 1];
do
{
v9 = *v7;
if ( !*v7 )
break;
result = (unsigned int *)cocos2d::CCSpriteBatchNode::getAtlasCapacity(*v7, v3);
if ( (int)result < v5 )
result = (unsigned int *)cocos2d::CCSpriteBatchNode::increaseAtlasCapacity(v9, (unsigned int)v5);
++v7;
}
while ( (unsigned __int64)v7 <= v8 );
}
}
return result;
}