//
// cocos2d::CCAnimation::copyWithZone from 0x180089a60 to 0x180089b26 (198 bytes)
//
// 3 xrefs:
// > ??> @ 0x180103638
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b59c4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=2
struct cocos2d::CCObject *__fastcall cocos2d::CCAnimation::copyWithZone(
cocos2d::CCAnimation *this,
cocos2d::CCObject **a2)
{
tinyxml2::XMLHandle *v3; // rdi
cocos2d::CCObject *v4; // rbx
cocos2d::CCObject *v5; // rax
tinyxml2::XMLHandle *v6; // rax
v3 = nullptr;
if ( !a2 || (v4 = *a2) == nullptr )
{
v5 = (cocos2d::CCObject *)operator new(0x58u);
v4 = v5;
if ( v5 )
{
cocos2d::CCObject::CCObject(v5);
v4->__vftable = (cocos2d::CCObject_vtbl *)&cocos2d::CCAnimation::`vftable';
v4[1].__vftable = nullptr;
v4[1].m_uID = 0;
*(_QWORD *)&v4[1].m_nTag = 0;
LOBYTE(v4[1].m_uAutoReleaseCount) = 0;
v4[1].m_eObjType = 0;
}
else
{
v4 = nullptr;
}
v6 = (tinyxml2::XMLHandle *)operator new(8u);
if ( v6 )
v3 = tinyxml2::XMLHandle::XMLHandle(v6, (struct tinyxml2::XMLNode *)v4);
}
cocos2d::CCAnimation::initWithAnimationFrames(
(cocos2d::CCAnimation *)v4,
this->m_pFrames,
this->m_fDelayPerUnit,
this->m_uLoops);
LOBYTE(v4[1].m_uAutoReleaseCount) = this->m_bRestoreOriginalFrame;
if ( v3 )
j_j_free_0(v3);
return v4;
}