//
// cocos2d::CCTwirl::create from 0x18002cc10 to 0x18002cd22 (274 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801438a8
// > ??> @ 0x1801afd24
//
// 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=3
struct cocos2d::CCTwirl *__fastcall cocos2d::CCTwirl::create(
float a1,
struct cocos2d::CCSize *a2,
struct cocos2d::CCPoint a3,
int a4,
float a5)
{
_OWORD *v8; // rax
_OWORD *v9; // rbx
_DWORD *v10; // rdi
_OWORD *v12; // [rsp+20h] [rbp-28h] BYREF
v8 = operator new(0x80u);
v9 = v8;
v12 = v8;
if ( v8 )
{
*v8 = 0;
v8[1] = 0;
v8[2] = 0;
v8[3] = 0;
v8[4] = 0;
v8[5] = 0;
v8[6] = 0;
v8[7] = 0;
cocos2d::CCAction::CCAction((cocos2d::CCAction *)v8);
*((_DWORD *)v9 + 20) = 0;
*(_QWORD *)v9 = &cocos2d::CCGridAction::`vftable';
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v9 + 12);
*(_QWORD *)v9 = &cocos2d::CCTwirl::`vftable';
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v9 + 13);
}
else
{
v9 = nullptr;
}
if ( !v9 )
return (struct cocos2d::CCTwirl *)v9;
v10 = cocos2d::cc_timeval::operator=(&v12, *(_DWORD **)&a3);
if ( cocos2d::CCGridAction::initWithDuration((cocos2d::CCGridAction *)v9, a1, a2) )
{
cocos2d::CCSize::operator=((_DWORD *)v9 + 26, v10);
*((_DWORD *)v9 + 28) = a4;
*((float *)v9 + 29) = a5;
*((_DWORD *)v9 + 30) = 1065353216;
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v9);
return (struct cocos2d::CCTwirl *)v9;
}
cocos2d::CCObject::release((cocos2d::CCObject *)v9);
return nullptr;
}