//
// cocos2d::CCNotificationCenter::unregisterScriptObserver from 0xb1e068 to 0xb1e12c (196 bytes)
//
// 1 xrefs:
// > ??> @ 0x952b0
//
// 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
//
void cocos2d::CCNotificationCenter::unregisterScriptObserver(
cocos2d::CCNotificationCenter *a1,
cocos2d::CCObject *a2,
const char *a3)
{
cocos2d::CCNotificationCenter_vtbl *v3; // x23
bool (__fastcall *canEncode)(cocos2d::CCObject *__hidden); // x4
cocos2d::_ccArray **v5; // x19
__int64 v6; // x20
char *v7; // x21
cocos2d::_ccArray *i; // x20
const char *v12; // x0
bool v13; // w3
v3 = a1[1].__vftable;
if ( v3 )
{
canEncode = v3->canEncode;
if ( *(_DWORD *)canEncode )
{
v5 = *((cocos2d::_ccArray ***)canEncode + 2);
v6 = 8LL * *(unsigned int *)canEncode - 8;
v7 = (char *)v5 + v6;
if ( v5 <= (cocos2d::_ccArray **)((char *)v5 + v6) )
{
for ( i = *v5; *v5; i = *v5 )
{
v12 = (const char *)(*(__int64 (__fastcall **)(cocos2d::_ccArray *))(*(_QWORD *)&i->num + 96LL))(i);
if ( !strcmp(v12, a3)
&& a2 == (cocos2d::CCObject *)(*(__int64 (__fastcall **)(cocos2d::_ccArray *))(*(_QWORD *)&i->num + 80LL))(i) )
{
cocos2d::CCArray::removeObject(
(cocos2d::CCArray *)a1[1].__vftable,
i,
(cocos2d::CCObject *)((char *)&dword_0 + 1),
v13);
}
if ( v7 < (char *)++v5 )
break;
}
}
}
}
}