//
// TouchControlEditLayer::onEnter from 0x1404566d0 to 0x1404567bc (236 bytes)
//
// 4 xrefs:
// > ??> @ 0x140795890
// > ??> @ 0x1408cd064
// > ??> @ 0x1408cd0bc
// > ??> @ 0x140927a94
//
// 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 11:32:29 +0000
//
int __fastcall TouchControlEditLayer::onEnter(cocos2d::CCArray **a1)
{
__int64 v2; // rax
__int64 v3; // rcx
cocos2d::CCArray *v4; // rbp
cocos2d::CCObject *v5; // rax
unsigned int v6; // ebx
struct cocos2d::CCObject *v7; // rax
struct cocos2d::CCObject *v8; // rdi
cocos2d::CCLayer::onEnter((cocos2d::CCLayer *)a1);
v2 = (*((__int64 (__fastcall **)(cocos2d::CCArray **))*a1 + 63))(a1);
if ( v2 )
{
v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 480LL))(v2);
v4 = (cocos2d::CCArray *)v2;
if ( v2 )
{
if ( !a1[159] )
{
v5 = (cocos2d::CCObject *)cocos2d::CCArray::create(v3);
a1[159] = v5;
cocos2d::CCObject::retain(v5);
}
v6 = 0;
for ( LODWORD(v2) = cocos2d::CCArray::count(v4); v6 < (unsigned int)v2; LODWORD(v2) = cocos2d::CCArray::count(v4) )
{
v7 = cocos2d::CCArray::objectAtIndex(v4, v6);
v8 = v7;
if ( v7 != (struct cocos2d::CCObject *)a1
&& v6
&& (*(unsigned __int8 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v7 + 344LL))(v7) )
{
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v8 + 336LL))(v8, 0);
cocos2d::CCArray::addObject(a1[159], v8);
}
++v6;
}
}
}
return v2;
}