//
// cocos2d::CCIMEDelegate::~CCIMEDelegate from 0x1800b4680 to 0x1800b4711 (145 bytes)
//
// 6 xrefs:
// > sub_1800B47A0 @ 0x1800b47fe
// > cocos2d::CCTextFieldTTF::~CCTextFieldTTF @ 0x1800b5070
// > sub_1800E37C0 @ 0x1800e37ce
// > sub_1800B47A0 @ 0x1800b47bc
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b88e0
//
// 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::CCIMEDelegate::~CCIMEDelegate(cocos2d::CCIMEDelegate *this)
{
struct cocos2d::CCIMEDispatcher *v2; // r9
cocos2d::CCIMEDispatcher::Impl *m_pImpl; // r8
void **v4; // rdx
cocos2d::CCIMEDelegate *v5; // rcx
cocos2d::CCIMEDelegate_vtbl *v6; // rax
cocos2d::CCIMEDispatcher::Impl *v7; // r8
this->__vftable = (cocos2d::CCIMEDelegate_vtbl *)&cocos2d::CCIMEDelegate::`vftable';
v2 = cocos2d::CCIMEDispatcher::sharedDispatcher();
m_pImpl = v2->m_pImpl;
if ( v2->m_pImpl )
{
v4 = *(void ***)m_pImpl;
v5 = **(cocos2d::CCIMEDelegate ***)m_pImpl;
if ( v5 != *(cocos2d::CCIMEDelegate **)m_pImpl )
{
while ( this != (cocos2d::CCIMEDelegate *)v5[2].__vftable )
{
v5 = (cocos2d::CCIMEDelegate *)v5->__vftable;
if ( v5 == (cocos2d::CCIMEDelegate *)v4 )
return;
}
if ( v4 != (void **)v5 )
{
v6 = *((cocos2d::CCIMEDelegate_vtbl **)m_pImpl + 2);
if ( v6 )
{
if ( v5[2].__vftable == v6 )
*((_QWORD *)m_pImpl + 2) = 0;
}
v7 = v2->m_pImpl;
v5[1].~CCIMEDelegate = (void (__stdcall *)(cocos2d::CCIMEDelegate *__hidden))v5->__vftable;
v5->attachWithIME = (bool (__stdcall *)(cocos2d::CCIMEDelegate *__hidden))v5[1].__vftable;
--*((_QWORD *)v7 + 1);
j_j_free_0(v5);
}
}
}
}