//
// cocos2d::CCCallFuncN::create from 0x1800301f0 to 0x18003031d (301 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801ba198
//
// 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:33 +0000
//
// Hidden C++ exception states: #wind=1
cocos2d::CCAction *__fastcall cocos2d::CCCallFuncN::create(cocos2d::CCObject *this, __int64 a2)
{
cocos2d::CCAction *v4; // rax
cocos2d::CCAction *v5; // rbx
unsigned __int8 (__fastcall *v6)(cocos2d::CCAction *, cocos2d::CCObject *, __int64); // r9
cocos2d::CCObject *v7; // rcx
cocos2d::CCCallFuncND *(__fastcall *v9)(cocos2d::CCCallFuncND *, char); // r8
v4 = (cocos2d::CCAction *)sub_1800E4AC0(0x78u);
v5 = v4;
if ( v4 )
{
cocos2d::CCAction::CCAction(v4);
*((_DWORD *)v5 + 20) = 0;
*((_QWORD *)v5 + 11) = 0;
*((_DWORD *)v5 + 24) = 0;
*((_QWORD *)v5 + 13) = 0;
*(_QWORD *)v5 = &cocos2d::CCCallFuncN::`vftable'{for `cocos2d::CCCallFunc'};
*((_QWORD *)v5 + 14) = &cocos2d::CCCallFuncN::`vftable'{for `cocos2d::TypeInfo'};
}
else
{
v5 = nullptr;
}
if ( !v5 )
return nullptr;
v6 = *(unsigned __int8 (__fastcall **)(cocos2d::CCAction *, cocos2d::CCObject *, __int64))(*(_QWORD *)v5 + 128LL);
if ( (char *)v6 != (char *)&cocos2d::CCCallFuncN::initWithTarget )
{
if ( v6(v5, this, a2) )
{
cocos2d::CCObject::autorelease(v5);
return v5;
}
v9 = *(cocos2d::CCCallFuncND *(__fastcall **)(cocos2d::CCCallFuncND *, char))(*(_QWORD *)v5 + 8LL);
if ( v9 == sub_18002F400 )
{
sub_18002F400(v5, 1);
return nullptr;
}
v9(v5, 1);
return nullptr;
}
if ( this )
cocos2d::CCObject::retain(this);
v7 = *((cocos2d::CCObject **)v5 + 11);
if ( v7 )
cocos2d::CCObject::release(v7);
*((_QWORD *)v5 + 11) = this;
*((_QWORD *)v5 + 13) = a2;
cocos2d::CCObject::autorelease(v5);
return v5;
}