//
// cocos2d::CCTwirl::copyWithZone from 0x18002c940 to 0x18002ca89 (329 bytes)
//
// 3 xrefs:
// > ??> @ 0x1800eed18
// > ??> @ 0x18014cf68
// > ??> @ 0x1801b9dcc
//
// 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:32 +0000
//
// Hidden C++ exception states: #wind=4
struct cocos2d::CCObject *__fastcall cocos2d::CCTwirl::copyWithZone(cocos2d::CCTwirl *this, struct cocos2d::CCZone *a2)
{
tinyxml2::XMLHandle *v2; // rax
tinyxml2::XMLHandle *v4; // rdi
_DWORD *v5; // rbx
_OWORD *v6; // rax
tinyxml2::XMLHandle *v7; // rax
int v8; // xmm6_4
int v9; // ebp
_DWORD *v10; // r14
tinyxml2::XMLHandle *v12; // [rsp+50h] [rbp+8h] BYREF
v2 = a2;
v4 = nullptr;
if ( !a2 || (v5 = *(_DWORD **)a2) == nullptr )
{
v6 = (_OWORD *)sub_1800E4AC0(0x80u);
v5 = v6;
v12 = (tinyxml2::XMLHandle *)v6;
if ( v6 )
{
*v6 = 0;
v6[1] = 0;
v6[2] = 0;
v6[3] = 0;
v6[4] = 0;
v6[5] = 0;
v6[6] = 0;
v6[7] = 0;
cocos2d::CCAction::CCAction((cocos2d::CCAction *)v6);
v5[20] = 0;
*(_QWORD *)v5 = &cocos2d::CCGridAction::`vftable';
cocos2d::CCSize::CCSize((cocos2d::CCSize *)(v5 + 24));
*(_QWORD *)v5 = &cocos2d::CCTwirl::`vftable';
cocos2d::CCSize::CCSize((cocos2d::CCSize *)(v5 + 26));
}
else
{
v5 = nullptr;
}
v7 = (tinyxml2::XMLHandle *)sub_1800E4AC0(8u);
v12 = v7;
if ( v7 )
v2 = tinyxml2::XMLHandle::XMLHandle(v7, (struct tinyxml2::XMLNode *)v5);
else
v2 = nullptr;
v4 = v2;
}
cocos2d::CCGridAction::copyWithZone(this, v2);
v8 = *((_DWORD *)this + 29);
v9 = *((_DWORD *)this + 28);
v10 = cocos2d::cc_timeval::operator=(&v12, (_DWORD *)this + 26);
if ( cocos2d::CCGridAction::initWithDuration(
(cocos2d::CCGridAction *)v5,
*((float *)this + 20),
(cocos2d::CCTwirl *)((char *)this + 96)) )
{
cocos2d::CCSize::operator=(v5 + 26, v10);
v5[28] = v9;
v5[29] = v8;
v5[30] = 1065353216;
}
if ( v4 )
j_j_free_0(v4);
return (struct cocos2d::CCObject *)v5;
}