//
// cocos2d::CCNotificationCenter::getObserverHandlerByName from 0x100287d30 to 0x100287db8 (136 bytes)
//
// 0 xrefs:
//
// 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
//
int __fastcall cocos2d::CCNotificationCenter::getObserverHandlerByName(
cocos2d::CCNotificationCenter *a1,
const char *a2)
{
cocos2d::CCNotificationCenter_vtbl *v2; // rax
bool (__cdecl *canEncode)(cocos2d::CCObject *__hidden); // rax
_QWORD *v4; // r15
unsigned __int64 v5; // r12
__int64 v6; // r14
const char *v7; // rax
if ( a2 )
{
if ( *a2 )
{
v2 = a1[1].__vftable;
if ( v2 )
{
canEncode = v2->canEncode;
if ( *(_DWORD *)canEncode )
{
v4 = *((_QWORD **)canEncode + 2);
v5 = (unsigned __int64)&v4[*(unsigned int *)canEncode - 1];
do
{
v6 = *v4;
if ( !*v4 )
break;
v7 = (const char *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v6 + 96LL))(*v4);
if ( !strcmp(v7, a2) )
return (*(int (__fastcall **)(__int64))(*(_QWORD *)v6 + 112LL))(v6);
++v4;
}
while ( (unsigned __int64)v4 <= v5 );
}
}
}
}
return -1;
}