//
// func from 0x1004bc3d0 to 0x1004bc43b (107 bytes)
//
// 5 xrefs:
// > cocos2d::CCIMEDelegate::CCIMEDelegate @ 0x1004bbccc
// > cocos2d::CCIMEDispatcher::sharedDispatcher @ 0x1004bbd6e
// > cocos2d::CCIMEDelegate::dCCIMEDelegate @ 0x1004bbed0
// > cocos2d::CCIMEDelegate::attachWithIME @ 0x1004bc0a0
// > cocos2d::CCIMEDelegate::detachWithIME @ 0x1004bc237
//
// 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 func(__int64 **a1)
{
__int64 *v1; // r14
__int64 *v3; // rdi
_QWORD *v4; // rax
__int64 v5; // rcx
__int64 *v6; // r15
v1 = *a1;
if ( *a1 )
{
if ( v1[2] )
{
v3 = (__int64 *)v1[1];
v4 = *(_QWORD **)(*v1 + 8);
v5 = *v3;
*(_QWORD *)(v5 + 8) = v4;
*v4 = v5;
v1[2] = 0;
if ( v3 != v1 )
{
do
{
v6 = (__int64 *)v3[1];
operator delete(v3);
v3 = v6;
}
while ( v6 != v1 );
}
}
operator delete(v1);
*a1 = nullptr;
}
}