//
// cocos2d::CCIMEDispatcher::attachDelegateWithIME from 0x7fe386 to 0x7fe3e8 (98 bytes)
//
// 1 xrefs:
// > cocos2d::CCIMEDelegate::attachWithIME @ 0x7fe5e8
//
// 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:17 +0000
//
int __fastcall cocos2d::CCIMEDispatcher::attachDelegateWithIME(
cocos2d::CCIMEDispatcher::Impl **this,
cocos2d::CCIMEDelegate *a2)
{
cocos2d::CCIMEDispatcher::Impl *v3; // r7
int Delegate; // r6
int v6; // r0
int v7; // r0
v3 = *this;
if ( *this )
{
if ( a2 )
{
Delegate = cocos2d::CCIMEDispatcher::Impl::findDelegate(*this, a2);
if ( v3 != (cocos2d::CCIMEDispatcher::Impl *)Delegate )
{
v6 = *((_DWORD *)*this + 3);
if ( v6 )
{
if ( (*(int (__fastcall **)(int))(*(_DWORD *)v6 + 24))(v6)
&& (*(int (__fastcall **)(cocos2d::CCIMEDelegate *))(*(_DWORD *)a2 + 16))(a2) )
{
v7 = *((_DWORD *)*this + 3);
*((_DWORD *)*this + 3) = 0;
(*(void (__fastcall **)(int))(*(_DWORD *)v7 + 28))(v7);
LABEL_9:
*((_DWORD *)*this + 3) = *(_DWORD *)(Delegate + 8);
(*(void (__fastcall **)(cocos2d::CCIMEDelegate *))(*(_DWORD *)a2 + 20))(a2);
return 1;
}
}
else if ( (*(int (__fastcall **)(cocos2d::CCIMEDelegate *))(*(_DWORD *)a2 + 16))(a2) )
{
goto LABEL_9;
}
}
}
}
return 0;
}