//
// cocos2d::CCNotificationCenter::getObserverHandlerByName from 0x180096c60 to 0x180096cfe (158 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c0750
//
// 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:22:10 +0000
//
int __fastcall cocos2d::CCNotificationCenter::getObserverHandlerByName(
cocos2d::CCNotificationCenter *this,
const char *a2)
{
__int64 v4; // rax
unsigned int *v5; // rbx
__int64 v6; // rax
_QWORD *v7; // rbx
_QWORD *i; // rsi
__int64 v9; // rdi
const char *v10; // rax
if ( a2 )
{
if ( strlen(a2) )
{
v4 = *((_QWORD *)this + 7);
if ( v4 )
{
v5 = *(unsigned int **)(v4 + 56);
v6 = *v5;
if ( (_DWORD)v6 )
{
v7 = *((_QWORD **)v5 + 2);
for ( i = &v7[v6 - 1]; v7 <= i; ++v7 )
{
v9 = *v7;
if ( !*v7 )
break;
v10 = (const char *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v9 + 88LL))(*v7);
if ( !strcmp(v10, a2) )
return (*(int (__fastcall **)(__int64))(*(_QWORD *)v9 + 104LL))(v9);
}
}
}
}
}
return -1;
}