//
// cocos2d::CCIMEDispatcher::attachDelegateWithIME from 0x10026ba08 to 0x10026bae0 (216 bytes)
//
// 1 xrefs:
// > cocos2d::CCIMEDelegate::attachWithIME @ 0x10026ba04
//
// This function is hookable on this platform (idp: arm, 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:01:44 +0000
//
__int64 __fastcall cocos2d::CCIMEDispatcher::attachDelegateWithIME(__int64 *a1, __int64 a2)
{
__int64 result; // x0
__int64 v4; // x8
__int64 v6; // x21
__int64 v7; // x0
__int64 v8; // x0
result = 0;
if ( a2 )
{
v4 = *a1;
if ( *a1 )
{
v6 = *a1;
do
{
v6 = *(_QWORD *)(v6 + 8);
if ( v6 == v4 )
return 0;
}
while ( *(_QWORD *)(v6 + 16) != a2 );
v7 = *(_QWORD *)(v4 + 24);
if ( !v7 )
{
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 32LL))(a2);
if ( !(_DWORD)result )
return result;
goto LABEL_12;
}
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 48LL))(v7);
if ( (_DWORD)result )
{
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 32LL))(a2);
if ( (_DWORD)result )
{
v8 = *(_QWORD *)(*a1 + 24);
*(_QWORD *)(*a1 + 24) = 0;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 56LL))(v8);
LABEL_12:
*(_QWORD *)(*a1 + 24) = *(_QWORD *)(v6 + 16);
(*(void (__fastcall **)(__int64))(*(_QWORD *)a2 + 40LL))(a2);
return 1;
}
}
}
}
return result;
}