//
// cocos2d::CCIMEDelegate::CCIMEDelegate from 0x1004b4d60 to 0x1004b4e30 (208 bytes)
//
// 6 xrefs:
// > CCTextInputNode::CCTextInputNode @ 0x10006d6bd
// > cocos2d::CCTextFieldTTF::CCTextFieldTTF @ 0x1002682ac
// > sub_1004A2E50 @ 0x1004a2e66
// > sub_1004A2F80 @ 0x1004a2f96
// > cocos2d::extension::CCEditBox::create @ 0x1004a3379
// > sub_1004B4F50 @ 0x1004b4f55
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:31:00 +0000
//
void __fastcall cocos2d::CCIMEDelegate::CCIMEDelegate(_QWORD *a1)
{
__int64 v1; // r14
__int64 v2; // rax
_QWORD *v3; // rax
_QWORD *v4; // rcx
_QWORD *v5; // rax
*a1 = &off_100B57DE0;
if ( !(_BYTE)byte_100BE41A0 )
{
if ( __cxa_guard_acquire(&byte_100BE41A0) )
{
v5 = operator new(0x20u);
*v5 = v5;
v5[1] = v5;
v5[2] = 0;
qword_100BE4198 = (__int64)v5;
v5[3] = 0;
__cxa_atexit(func, &qword_100BE4198, (void *)&_mh_execute_header);
__cxa_guard_release(&byte_100BE41A0);
}
}
v1 = qword_100BE4198;
if ( qword_100BE4198 )
{
v2 = qword_100BE4198;
while ( 1 )
{
v2 = *(_QWORD *)(v2 + 8);
if ( v2 == qword_100BE4198 )
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);
}
}