//
// cocos2d::CCNotificationObserver::CCNotificationObserver from 0x7f5b60 to 0x7f5c62 (258 bytes)
//
// 2 xrefs:
// > cocos2d::CCNotificationCenter::addObserver @ 0x7f5c9c
// > cocos2d::CCNotificationCenter::registerScriptObserver @ 0x7f5cea
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:01:08 +0000
//
// Alternative name is '_ZN7cocos2d22CCNotificationObserverC1EPNS_8CCObjectEMS1_FvS2_EPKcS2_'
int __fastcall cocos2d::CCNotificationObserver::CCNotificationObserver(
int a1,
int a2,
int a3,
int a4,
const char *a5,
int a6)
{
size_t v8; // r0
void *v9; // r5
size_t v10; // r0
size_t v11; // r0
size_t v12; // r5
char *v13; // r3
unsigned int v14; // r0
size_t v15; // r0
int v16; // r5
size_t v17; // r2
char *v18; // r1
int v22; // [sp+8h] [bp-14h] BYREF
size_t v23; // [sp+Ch] [bp-10h]
void *v24; // [sp+10h] [bp-Ch]
cocos2d::CCObject::CCObject((_DWORD *)a1);
*(_DWORD *)(a1 + 52) = a2;
*(_DWORD *)a1 = &off_D11570;
*(_DWORD *)(a1 + 56) = a3;
*(_DWORD *)(a1 + 60) = a4;
*(_DWORD *)(a1 + 68) = a6;
v8 = strlen(a5);
v9 = (void *)operator new[](v8 + 1);
*(_DWORD *)(a1 + 64) = v9;
v10 = strlen(a5);
memset(v9, 0, v10 + 1);
v22 = 0;
v23 = 0;
v24 = nullptr;
v11 = strlen(a5);
v12 = v11;
if ( v11 > 0xA )
{
v14 = (v11 + 16) & 0xFFFFFFF0;
v22 = v14 | 1;
v23 = v12;
v13 = (char *)operator new(v14);
v24 = v13;
}
else
{
LOBYTE(v22) = 2 * v11;
v13 = (char *)&v22 + 1;
if ( !v11 )
goto LABEL_6;
}
v13 = (char *)memcpy(v13, a5, v12);
LABEL_6:
v13[v12] = 0;
v15 = strlen(a5);
v16 = v22 & 1;
if ( v16 )
v17 = v23;
else
v17 = (int)(unsigned __int8)v22 >> 1;
if ( v17 >= v15 )
v17 = v15;
if ( v16 )
{
v18 = (char *)v24;
if ( !v17 )
{
*(_DWORD *)(a1 + 72) = 0;
goto LABEL_14;
}
}
else
{
if ( !v17 )
{
*(_DWORD *)(a1 + 72) = 0;
return a1;
}
v18 = (char *)&v22 + 1;
}
memcpy(*(void **)(a1 + 64), v18, v17);
*(_DWORD *)(a1 + 72) = 0;
if ( v16 )
LABEL_14:
operator delete(v24);
return a1;
}