//
// cocos2d::CCNotificationCenter::registerScriptObserver from 0x180093870 to 0x180093911 (161 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b654c
//
// 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=1
void __fastcall cocos2d::CCNotificationCenter::registerScriptObserver(
cocos2d::CCNotificationCenter *this,
struct cocos2d::CCObject *a2,
unsigned int a3,
char *a4)
{
void *v8; // rax
cocos2d::CCObject *v9; // rbx
if ( !cocos2d::CCNotificationCenter::observerExisted(this, a2, a4) )
{
v8 = operator new(0x60u);
v9 = nullptr;
if ( v8 )
v9 = (cocos2d::CCObject *)cocos2d::CCNotificationObserver::CCNotificationObserver(
(__int64)v8,
(__int64)a2,
0,
a4,
0);
if ( v9 )
{
((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v9->__vftable[1].encodeWithCoder)(v9, a3);
cocos2d::CCObject::autorelease(v9);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 7), v9);
}
}
}