//
// GJBaseGameLayer::getCapacityString from 0x9ec158 to 0x9ec38c (564 bytes)
//
// 2 xrefs:
// > PlayLayer::levelComplete @ 0x703a8c
// > ??> @ 0xe87b0
//
// 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:59:03 +0000
//
__int64 *__usercall GJBaseGameLayer::getCapacityString@(__int64 *__return_ptr a1@, GJBaseGameLayer *this@)
{
__int64 v2; // x0
unsigned int *v3; // x1
size_t v4; // x20
const char *v5; // x0
size_t v6; // x0
cocos2d::CCSpriteBatchNode **v8; // x20
__int64 v9; // x0
char *v10; // x25
cocos2d::CCSpriteBatchNode *v11; // x0
unsigned int v12; // w21
int v13; // w23
signed int UsedAtlasCapacity; // w22
size_t v15; // x24
size_t v16; // x23
size_t v17; // x24
size_t v18; // x23
void *v19; // [xsp+60h] [xbp+60h]
size_t v21; // [xsp+88h] [xbp+88h] BYREF
unsigned __int64 v22; // [xsp+90h] [xbp+90h]
_BYTE *v23; // [xsp+98h] [xbp+98h]
_BYTE v24[504]; // [xsp+A0h] [xbp+A0h] BYREF
v2 = *((_QWORD *)this + 498);
v21 = 0;
v22 = 500;
v23 = v24;
if ( v2
&& (v3 = *(unsigned int **)(v2 + 56), *v3)
&& (v8 = *((cocos2d::CCSpriteBatchNode ***)v3 + 2),
v9 = 8LL * *v3 - 8,
v10 = (char *)v8 + v9,
v8 <= (cocos2d::CCSpriteBatchNode **)((char *)v8 + v9))
&& (v11 = *v8) != nullptr )
{
v12 = 0;
v13 = 1;
do
{
UsedAtlasCapacity = cocos2d::CCSpriteBatchNode::getUsedAtlasCapacity(v11);
if ( UsedAtlasCapacity > 200 )
{
if ( !v13 )
{
v15 = v21;
v16 = v21 + 1;
if ( v21 + 1 > v22 )
fmt::internal::Array::grow(&v21, v21 + 1);
v21 = v16;
v23[v15] = 44;
}
fmt::BasicWriter::FormatInt,char>>(&v21, v12);
v17 = v21;
v18 = v21 + 1;
if ( v21 + 1 > v22 )
fmt::internal::Array::grow(&v21, v21 + 1);
v21 = v18;
v23[v17] = 44;
fmt::BasicWriter::FormatInt,char>>(
&v21,
UsedAtlasCapacity);
v13 = 0;
}
++v8;
++v12;
if ( v10 < (char *)v8 )
break;
v11 = *v8;
}
while ( *v8 );
v4 = v21;
if ( v22 < v21 + 1 )
fmt::internal::Array::grow(&v21, v21 + 1);
}
else
{
v4 = 0;
}
v23[v4] = 0;
v19 = v23;
v5 = v23;
*a1 = 0;
a1[1] = 0;
a1[2] = 0;
v6 = strlen(v5);
std::string::__init(a1, v19, v6);
if ( v23 != v24 && v23 )
operator delete[](v23);
return a1;
}