//
// cocos2d::CCDrawNode::ensureCapacity from 0x100065000 to 0x10006504d (77 bytes)
//
// 0 xrefs:
//
// 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:19:42 +0000
//
void *__fastcall cocos2d::CCDrawNode::ensureCapacity(__int64 a1, unsigned int a2)
{
void *result; // rax
__int64 v3; // rsi
result = (void *)*(unsigned int *)(a1 + 348);
if ( a2 + *(_DWORD *)(a1 + 352) > (unsigned int)result )
{
if ( (unsigned int)result > a2 )
a2 = *(_DWORD *)(a1 + 348);
v3 = (unsigned int)result + a2;
*(_DWORD *)(a1 + 348) = v3;
result = realloc(*(void **)(a1 + 360), 20 * v3);
*(_QWORD *)(a1 + 360) = result;
}
return result;
}