//
// cocos2d::CCIMEDispatcher::addDelegate from 0x1004b4ef0 to 0x1004b4f4d (93 bytes)
//
// 0 xrefs:
//
// 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 12:31:00 +0000
//
void __fastcall cocos2d::CCIMEDispatcher::addDelegate(__int64 *a1, __int64 a2)
{
__int64 v2; // rbx
__int64 v3; // rax
_QWORD *v4; // rax
_QWORD *v5; // rcx
if ( a2 )
{
v2 = *a1;
if ( *a1 )
{
v3 = *a1;
while ( 1 )
{
v3 = *(_QWORD *)(v3 + 8);
if ( v3 == v2 )
break;
if ( *(_QWORD *)(v3 + 16) == a2 )
return;
}
v4 = operator new(0x18u);
v4[2] = a2;
*v4 = v2;
v5 = *(_QWORD **)(v2 + 8);
v4[1] = v5;
*v5 = v4;
*(_QWORD *)(v2 + 8) = v4;
++*(_QWORD *)(v2 + 16);
}
}
}