//
// cocos2d::CCNotificationCenter::postNotification from 0x180093710 to 0x18009383a (298 bytes)
//
// 4 xrefs:
// > ??> @ 0x18013e188
// > ??> @ 0x18013e1bc
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b6504
//
// 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 __fastcall cocos2d::CCNotificationCenter::postNotification(
cocos2d::CCNotificationCenter *this,
const char *a2,
struct cocos2d::CCObject *a3)
{
unsigned int v6; // eax
struct cocos2d::CCArray *v7; // rdi
cocos2d::ccArray *data; // rdi
__int64 num; // rax
cocos2d::CCObject **arr; // rdi
cocos2d::CCObject **i; // rbp
cocos2d::CCObject *v12; // rbx
__int64 v13; // rax
const char *v14; // rcx
int v15; // edx
int v16; // r8d
struct cocos2d::CCScriptEngineManager *v17; // rax
cocos2d::CCObject_vtbl *v18; // rcx
struct cocos2d::CCObject *v19; // rdx
v6 = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 7));
v7 = cocos2d::CCArray::createWithCapacity(v6);
cocos2d::CCArray::addObjectsFromArray(v7, *((struct cocos2d::CCArray **)this + 7));
if ( v7 )
{
data = v7->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
for ( i = &arr[num - 1]; arr <= i; ++arr )
{
v12 = *arr;
if ( !*arr )
break;
if ( (struct cocos2d::CCObject *)((__int64 (__fastcall *)(cocos2d::CCObject *))v12->__vftable[1].acceptVisitor)(*arr) == a3
|| !((__int64 (__fastcall *)(cocos2d::CCObject *))v12->__vftable[1].acceptVisitor)(v12)
|| !a3 )
{
v13 = ((__int64 (__fastcall *)(cocos2d::CCObject *))v12->__vftable[1].isEqual)(v12) - (_QWORD)a2;
v14 = a2;
do
{
v15 = (unsigned __int8)v14[v13];
v16 = *(unsigned __int8 *)v14 - v15;
if ( v16 )
break;
++v14;
}
while ( v15 );
if ( !v16 )
{
if ( ((unsigned int (__fastcall *)(cocos2d::CCObject *))v12->__vftable[1].update)(v12) )
{
v17 = cocos2d::CCScriptEngineManager::sharedManager();
(*(void (__fastcall **)(_QWORD, cocos2d::CCNotificationCenter *, const char *))(**(_QWORD **)v17 + 80LL))(
*(_QWORD *)v17,
this,
a2);
}
else
{
v18 = v12[1].__vftable;
if ( v18 )
{
v19 = a3;
if ( !a3 )
v19 = *(struct cocos2d::CCObject **)&v12[1].m_uAutoReleaseCount;
(*(void (__fastcall **)(cocos2d::CCObject_vtbl *, struct cocos2d::CCObject *))&v12[1].m_uID)(v18, v19);
}
}
}
}
}
}
}
}