//
// cocos2d::CCDrawNode::ensureCapacity from 0x180015180 to 0x1800151ce (78 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801b8548
//
// 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 11:21:23 +0000
//
void __fastcall cocos2d::CCDrawNode::ensureCapacity(cocos2d::CCDrawNode *this, unsigned int a2)
{
unsigned int v3; // ecx
__int64 v4; // rax
void *v5; // rcx
v3 = *((_DWORD *)this + 88);
if ( a2 + *((_DWORD *)this + 89) > v3 )
{
if ( v3 > a2 )
a2 = v3;
v4 = v3 + a2;
v5 = *((void **)this + 45);
*((_DWORD *)this + 88) = v4;
*((_QWORD *)this + 45) = realloc(v5, 20 * v4);
}
}