//
// cocos2d::extension::CCEditBox::dCCEditBox from 0x1004aa210 to 0x1004aa35d (333 bytes)
//
// 6 xrefs:
// > sub_1004AA3B0 @ 0x1004aa3b5
// > sub_1004AA3C0 @ 0x1004aa3cc
// > sub_1004AA3E0 @ 0x1004aa3ec
// > sub_1004AA400 @ 0x1004aa409
// > sub_1004AA420 @ 0x1004aa433
// > sub_1004AA450 @ 0x1004aa463
//
// 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
//
__int64 __fastcall cocos2d::extension::CCEditBox::dCCEditBox(__int64 a1)
{
__int64 v2; // rdi
cocos2d::CCScriptEngineManager *v3; // rax
__int64 v4; // r14
*(_QWORD *)a1 = off_100947360;
*(_QWORD *)(a1 + 320) = off_100947998;
*(_QWORD *)(a1 + 328) = &off_100947A08;
*(_QWORD *)(a1 + 336) = off_100947A20;
*(_QWORD *)(a1 + 344) = off_100947A40;
*(_QWORD *)(a1 + 352) = off_100947A60;
*(_QWORD *)(a1 + 408) = off_100947A88;
*(_QWORD *)(a1 + 568) = off_100947B08;
v2 = *(_QWORD *)(a1 + 576);
if ( v2 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v2 + 8LL))(v2);
*(_QWORD *)(a1 + 576) = 0;
}
if ( *(_DWORD *)(a1 + 728) )
{
v3 = cocos2d::CCScriptEngineManager::sharedManager();
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)v3 + 32LL))(*(_QWORD *)v3, *(unsigned int *)(a1 + 728));
*(_DWORD *)(a1 + 728) = 0;
}
if ( (*(_BYTE *)(a1 + 680) & 1) != 0 )
{
operator delete(*(void **)(a1 + 696));
if ( (*(_BYTE *)(a1 + 656) & 1) == 0 )
{
LABEL_7:
if ( (*(_BYTE *)(a1 + 632) & 1) == 0 )
goto LABEL_8;
LABEL_13:
operator delete(*(void **)(a1 + 648));
v4 = a1 + 568;
if ( (*(_BYTE *)(a1 + 608) & 1) == 0 )
goto LABEL_10;
goto LABEL_9;
}
}
else if ( (*(_BYTE *)(a1 + 656) & 1) == 0 )
{
goto LABEL_7;
}
operator delete(*(void **)(a1 + 672));
if ( (*(_BYTE *)(a1 + 632) & 1) != 0 )
goto LABEL_13;
LABEL_8:
v4 = a1 + 568;
if ( (*(_BYTE *)(a1 + 608) & 1) != 0 )
LABEL_9:
operator delete(*(void **)(a1 + 624));
LABEL_10:
cocos2d::CCIMEDelegate::dCCIMEDelegate(v4);
return cocos2d::extension::CCControlButton::dCCControlButton((_QWORD *)a1);
}