//
// cocos2d::CCIMEDelegate::dCCIMEDelegate from 0x1004bbe20 to 0x1004bbef4 (212 bytes)
//
// 6 xrefs:
// > CCTextInputNode::dCCTextInputNode @ 0x10009de83
// > ??> @ 0x10027bd7e
// > cocos2d::CCTextFieldTTF::dCCTextFieldTTF @ 0x10027be65
// > cocos2d::extension::CCEditBox::dCCEditBox @ 0x1004aa304
// > sub_1004BBF70 @ 0x1004bbf75
// > sub_1004BBF80 @ 0x1004bbf89
//
// 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::dCCIMEDelegate(_QWORD *a1)
{
__int64 v2; // rax
__int64 *v3; // rdi
__int64 v4; // rcx
_QWORD *v5; // rdx
_QWORD *v6; // rax
*a1 = &off_10094CDD0;
if ( !(_BYTE)byte_1009A1EE0 && __cxa_guard_acquire(&byte_1009A1EE0) )
{
v6 = operator new(0x20u);
*v6 = v6;
v6[1] = v6;
v6[2] = 0;
qword_1009A1ED8 = (__int64)v6;
v6[3] = 0;
__cxa_atexit(func, &qword_1009A1ED8, (void *)&_mh_execute_header);
__cxa_guard_release(&byte_1009A1EE0);
}
v2 = qword_1009A1ED8;
if ( qword_1009A1ED8 )
{
v3 = (__int64 *)qword_1009A1ED8;
while ( 1 )
{
v3 = (__int64 *)v3[1];
if ( v3 == (__int64 *)qword_1009A1ED8 )
break;
if ( (_QWORD *)v3[2] == a1 )
{
if ( *(_QWORD **)(qword_1009A1ED8 + 24) == a1 )
*(_QWORD *)(qword_1009A1ED8 + 24) = 0;
v4 = *v3;
v5 = (_QWORD *)v3[1];
*(_QWORD *)(v4 + 8) = v5;
*v5 = v4;
--*(_QWORD *)(v2 + 16);
operator delete(v3);
return;
}
}
}
}