//
// TouchControlEditLayer::restoreSiblings from 0xd05368 to 0xd05414 (172 bytes)
//
// 2 xrefs:
// > TouchControlEditLayer::onExit @ 0xd05424
// > ??> @ 0x9a2e8
//
// This function is hookable on this platform (idp: arm, 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 13:06:56 +0000
//
__int64 __fastcall TouchControlEditLayer::restoreSiblings(__int64 this)
{
cocos2d::CCArray *v1; // x2
unsigned int *v2; // x3
__int64 *v3; // x20
__int64 v4; // x19
char *v5; // x21
__int64 v6; // x19
__int64 v7; // x22
v1 = *(cocos2d::CCArray **)(this + 1280);
if ( v1 )
{
v2 = *((unsigned int **)v1 + 7);
if ( *v2 )
{
v3 = *((__int64 **)v2 + 2);
v4 = 8LL * *v2 - 8;
v5 = (char *)v3 + v4;
if ( v3 <= (__int64 *)((char *)v3 + v4) )
{
v6 = *v3;
v7 = this;
if ( *v3 )
{
do
{
if ( (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 512LL))(v6) )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 344LL))(v6, 1);
if ( v5 < (char *)++v3 )
break;
v6 = *v3;
}
while ( *v3 );
v1 = *(cocos2d::CCArray **)(v7 + 1280);
}
}
}
return cocos2d::CCArray::removeAllObjects(v1);
}
return this;
}