//
// cocos2d::CCParticleSystemQuad::allocMemory from 0xd73db4 to 0xd73eb8 (260 bytes)
//
// 3 xrefs:
// > cocos2d::CCParticleSystemQuad::initWithTotalParticles @ 0xd73f5c
// > cocos2d::CCParticleSystemQuad::setBatchNode @ 0xd74208
// > ??> @ 0xe1898
//
// 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 13:08:01 +0000
//
__int64 __fastcall cocos2d::CCParticleSystemQuad::allocMemory(cocos2d::CCParticleSystemQuad *this)
{
void *v2; // x0
void *v3; // x0
unsigned int v4; // w19
size_t v5; // x21
void *v6; // x22
size_t v7; // x19
void *v8; // x0
void *v9; // x23
size_t v10; // x2
unsigned int v11; // w21
v2 = *((void **)this + 98);
if ( v2 )
{
free(v2);
*((_QWORD *)this + 98) = 0;
}
v3 = *((void **)this + 99);
if ( v3 )
free(v3);
v4 = *((_DWORD *)this + 165);
v5 = 96LL * v4;
v6 = malloc(v5);
*((_QWORD *)this + 98) = v6;
v7 = 12LL * v4;
v8 = malloc(v7);
*((_QWORD *)this + 99) = v8;
v9 = v8;
if ( v6 )
{
if ( v8 )
{
v10 = v5;
v11 = 1;
memset(v6, 0, v10);
memset(v9, 0, v7);
return v11;
}
free(v6);
*((_QWORD *)this + 98) = 0;
return 0;
}
else
{
v11 = 0;
if ( !v8 )
return v11;
free(v8);
*((_QWORD *)this + 99) = 0;
return 0;
}
}