//
// cocos2d::CCIMEDelegate::CCIMEDelegate from 0x1004bbc20 to 0x1004bbcf0 (208 bytes)
//
// 6 xrefs:
// > CCTextInputNode::create @ 0x10009dfb3
// > cocos2d::CCTextFieldTTF::CCTextFieldTTF @ 0x10027bcac
// > sub_1004A9FB0 @ 0x1004a9fc6
// > cocos2d::extension::CCEditBox::CCEditBox @ 0x1004aa0f6
// > cocos2d::extension::CCEditBox::create @ 0x1004aa4d9
// > sub_1004BBE10 @ 0x1004bbe15
//
// 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(_QWORD *a1)
{
__int64 v1; // r14
__int64 v2; // rax
_QWORD *v3; // rax
_QWORD *v4; // rcx
_QWORD *v5; // rax
*a1 = &off_10094CDD0;
if ( !(_BYTE)byte_1009A1EE0 )
{
if ( __cxa_guard_acquire(&byte_1009A1EE0) )
{
v5 = operator new(0x20u);
*v5 = v5;
v5[1] = v5;
v5[2] = 0;
qword_1009A1ED8 = (__int64)v5;
v5[3] = 0;
__cxa_atexit(func, &qword_1009A1ED8, (void *)&_mh_execute_header);
__cxa_guard_release(&byte_1009A1EE0);
}
}
v1 = qword_1009A1ED8;
if ( qword_1009A1ED8 )
{
v2 = qword_1009A1ED8;
while ( 1 )
{
v2 = *(_QWORD *)(v2 + 8);
if ( v2 == qword_1009A1ED8 )
break;
if ( *(_QWORD **)(v2 + 16) == a1 )
return;
}
v3 = operator new(0x18u);
v3[2] = a1;
*v3 = v1;
v4 = *(_QWORD **)(v1 + 8);
v3[1] = v4;
*v4 = v3;
*(_QWORD *)(v1 + 8) = v3;
++*(_QWORD *)(v1 + 16);
}
}