//
// EditorUI::deselectTargetPortals from 0xbdc6a8 to 0xbdc794 (236 bytes)
//
// 4 xrefs:
// > EditorUI::onDelete @ 0x7d1b10
// > EditorUI::onDelete @ 0x7d1b78
// > EditorUI::onDeleteSelected @ 0x7d1ea4
// > ??> @ 0xbc278
//
// 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:03:43 +0000
//
__n128 __fastcall EditorUI::deselectTargetPortals(EditorUI *this)
{
cocos2d::CCArray *v2; // x0
cocos2d::CCArray *v3; // x0
__n128 result; // q0
unsigned int v5; // w19
cocos2d::CCArray *v6; // x21
bool v7; // cf
unsigned int v8; // w1
cocos2d::CCObject *v9; // x1
unsigned int v10; // w19
GameObject *v11; // x0
unsigned int v12; // w1
__int64 v13; // x0
v2 = *((cocos2d::CCArray **)this + 112);
if ( v2 && (v3 = (cocos2d::CCArray *)cocos2d::CCArray::count(v2), (_DWORD)v3) )
{
v5 = 0;
v6 = (cocos2d::CCArray *)cocos2d::CCArray::create(v3);
while ( 1 )
{
v7 = v5 >= (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 112));
v8 = v5++;
if ( v7 )
break;
while ( 1 )
{
v9 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 112), v8);
if ( *((_DWORD *)v9 + 257) != 749 )
break;
cocos2d::CCArray::addObject(v6, v9);
v7 = v5 >= (unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 112));
v8 = v5++;
if ( v7 )
goto LABEL_8;
}
}
LABEL_8:
v10 = 0;
while ( 1 )
{
v7 = v10 >= (unsigned int)cocos2d::CCArray::count(v6);
v12 = v10++;
if ( v7 )
break;
v11 = (GameObject *)cocos2d::CCArray::objectAtIndex(v6, v12);
EditorUI::deselectObject(this, v11);
}
}
else
{
v13 = *((_QWORD *)this + 187);
if ( v13 && *(_DWORD *)(v13 + 1028) == 749 )
return EditorUI::deselectObject((GameObject **)this);
}
return result;
}