//
// cocos2d::CCParticleSystemQuad::allocMemory from 0x18006c4f0 to 0x18006c5eb (251 bytes)
//
// 4 xrefs:
// > cocos2d::CCParticleSystemQuad::initWithTotalParticles @ 0x18006cbd5
// > cocos2d::CCParticleSystemQuad::setBatchNode @ 0x18006cce7
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bdfe4
//
// 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:55 +0000
//
char __fastcall cocos2d::CCParticleSystemQuad::allocMemory(cocos2d::CCParticleSystemQuad *this)
{
void *v2; // rcx
void *v3; // rcx
void *v4; // rax
void *v5; // rcx
void *v7; // rcx
v2 = *((void **)this + 99);
if ( v2 )
{
free(v2);
*((_QWORD *)this + 99) = 0;
}
v3 = *((void **)this + 100);
if ( v3 )
{
free(v3);
*((_QWORD *)this + 100) = 0;
}
*((_QWORD *)this + 99) = malloc(96LL * *((unsigned int *)this + 167));
v4 = malloc(2LL * (unsigned int)(6 * *((_DWORD *)this + 167)));
v5 = *((void **)this + 99);
*((_QWORD *)this + 100) = v4;
if ( v5 )
{
if ( v4 )
{
memset(v5, 0, 96LL * *((unsigned int *)this + 167));
memset(*((void **)this + 100), 0, 2LL * (unsigned int)(6 * *((_DWORD *)this + 167)));
return 1;
}
free(v5);
*((_QWORD *)this + 99) = 0;
}
v7 = *((void **)this + 100);
if ( v7 )
{
free(v7);
*((_QWORD *)this + 100) = 0;
}
return 0;
}