//
// EditorUI::createOutlines from 0x9cc72c to 0x9cd228 (2812 bytes)
//
// 2 xrefs:
// > EditorUI::createSmartObjectsFromType @ 0x6c13f4
// > ??> @ 0x497b8
//
// 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
//
cocos2d::CCArray *EditorUI::createOutlines(EditorUI *a1, cocos2d::CCArray *a2)
{
cocos2d::CCArray *v3; // x0
cocos2d::CCArray *v4; // x23
unsigned int v5; // w20
cocos2d::CCArray *v6; // x24
__int64 v7; // x28
const cocos2d::CCPoint *v8; // x0
int v9; // w0
__int64 v11; // x2
GameObject *Object; // x19
void (__fastcall *setRotation)(GameObject *__hidden, float); // x27
__int64 v14; // x1
unsigned __int8 v15; // w0
void (__fastcall *setFlipY)(GameObject *__hidden, bool); // x25
int v17; // w0
GameObject *v18; // x19
void (__fastcall *v19)(GameObject *__hidden, float); // x21
void (__fastcall *v20)(GameObject *__hidden, bool); // x21
int v21; // w0
void (__fastcall *v22)(GameObject *__hidden, bool); // x21
int v23; // w0
int v24; // w25
int v25; // w22
__int64 v26; // x1
__int64 v27; // x1
cocos2d::CCPoint *v28; // x22
cocos2d::CCArray *v29[2]; // [xsp+0h] [xbp+0h] BYREF
cocos2d::CCArray *v30; // [xsp+68h] [xbp+68h]
cocos2d::CCPoint *v31; // [xsp+70h] [xbp+70h]
void (__fastcall *setFlipX)(GameObject *, __int64); // [xsp+78h] [xbp+78h]
char v33; // [xsp+88h] [xbp+88h] BYREF
cocos2d::CCPoint v34; // [xsp+90h] [xbp+90h] BYREF
cocos2d::CCPoint v35; // 0:s0.4,4:s1.4
cocos2d::CCPoint v36; // 0:s0.4,4:s1.4
cocos2d::CCPoint v37; // 0:s0.4,4:s1.4
cocos2d::CCPoint v38; // 0:s0.4,4:s1.4
cocos2d::CCPoint v39; // 0:s0.4,4:s1.4
cocos2d::CCPoint v40; // 0:s0.4,4:s1.4
cocos2d::CCPoint v41; // 0:s0.4,4:s1.4
cocos2d::CCPoint v42; // 0:s0.4,4:s1.4
cocos2d::CCPoint v43; // 0:s0.4,4:s1.4
cocos2d::CCPoint v44; // 0:s0.4,4:s1.4
v30 = a2;
if ( !a2 )
return nullptr;
v3 = (cocos2d::CCArray *)cocos2d::CCArray::count(a2);
if ( !(_DWORD)v3 )
return nullptr;
v4 = (cocos2d::CCArray *)cocos2d::CCArray::create(v3);
v31 = (cocos2d::CCPoint *)&v33;
v5 = 0;
v6 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)&v33);
cocos2d::CCArray::addObjectsFromArray(v4, v30);
while ( v5 < (unsigned int)cocos2d::CCArray::count(v4) )
{
v7 = cocos2d::CCArray::objectAtIndex(v4, v5);
v8 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 192LL))(v7);
cocos2d::CCPoint::CCPoint(v31, v8);
v9 = *(_DWORD *)(v7 + 1012);
if ( v9 == 1629 )
{
v24 = 0;
v25 = 0;
v26 = 1661;
goto LABEL_71;
}
if ( v9 <= 1629 )
{
if ( v9 == 1395 )
{
v24 = 0;
v25 = 0;
v26 = 1367;
}
else if ( v9 > 1395 )
{
if ( v9 == 1441 )
{
v24 = 0;
v25 = 0;
v26 = 1460;
}
else if ( v9 <= 1441 )
{
if ( v9 == 1437 )
{
v24 = 0;
v25 = 0;
v26 = 1456;
}
else if ( v9 <= 1437 )
{
if ( v9 == 1435 )
{
v24 = 0;
v25 = 0;
v26 = 1454;
}
else if ( v9 <= 1435 )
{
if ( v9 != 1434 )
goto LABEL_75;
v24 = 0;
v25 = 0;
v26 = 1453;
}
else
{
v24 = 0;
v25 = 0;
v26 = 1455;
}
}
else if ( v9 == 1439 )
{
v24 = 0;
v25 = 0;
v26 = 1458;
}
else
{
v24 = 0;
v25 = 0;
if ( v9 <= 1439 )
v26 = 1457;
else
v26 = 1459;
}
}
else if ( v9 == 1624 )
{
v24 = 0;
v25 = 0;
v26 = 1656;
}
else if ( v9 <= 1624 )
{
if ( v9 == 1622 )
{
v24 = 0;
v25 = 0;
v26 = 1654;
}
else if ( v9 <= 1622 )
{
if ( v9 != 1621 )
goto LABEL_75;
v24 = 0;
v25 = 0;
v26 = 1653;
}
else
{
v24 = 0;
v25 = 0;
v26 = 1655;
}
}
else if ( v9 == 1626 )
{
v24 = 0;
v25 = 0;
v26 = 1658;
}
else if ( v9 < 1626 )
{
v24 = 0;
v25 = 0;
v26 = 1657;
}
else
{
v24 = 0;
v25 = 0;
if ( v9 == 1627 )
v26 = 1659;
else
v26 = 1660;
}
}
else if ( v9 == 1359 )
{
v24 = 0;
v25 = 0;
v26 = 1371;
}
else if ( v9 > 1359 )
{
if ( v9 == 1363 )
{
v24 = 0;
v25 = 0;
v26 = 1375;
}
else if ( v9 <= 1363 )
{
if ( v9 == 1361 )
{
v24 = 0;
v25 = 0;
v26 = 1373;
}
else
{
v24 = 0;
v25 = 0;
if ( v9 <= 1361 )
v26 = 1372;
else
v26 = 1374;
}
}
else if ( v9 == 1365 )
{
v24 = 0;
v25 = 0;
v26 = 1377;
}
else if ( v9 < 1365 )
{
v24 = 0;
v25 = 0;
v26 = 1376;
}
else
{
if ( v9 != 1366 )
goto LABEL_75;
v24 = 0;
v25 = 0;
v26 = 1378;
}
}
else if ( v9 == 1351 )
{
v24 = 0;
v25 = 1379;
v26 = 1383;
}
else if ( v9 <= 1351 )
{
if ( v9 == 1349 )
{
v24 = 0;
v25 = 1380;
v26 = 1385;
}
else if ( v9 <= 1349 )
{
if ( v9 != 1348 )
goto LABEL_75;
v24 = 0;
v25 = 1382;
v26 = 1386;
}
else
{
v24 = 0;
v25 = 1381;
v26 = 1384;
}
}
else if ( v9 == 1357 )
{
v24 = 0;
v25 = 0;
v26 = 1369;
}
else if ( v9 <= 1357 )
{
if ( v9 != 1356 )
goto LABEL_75;
v24 = 0;
v25 = 0;
v26 = 1368;
}
else
{
v24 = 0;
v25 = 0;
v26 = 1370;
}
goto LABEL_71;
}
if ( v9 == 1646 )
{
v24 = 0;
v25 = 0;
v26 = 1678;
goto LABEL_71;
}
if ( v9 > 1646 )
{
if ( v9 > 2841 )
{
if ( v9 == 2845 )
goto LABEL_112;
if ( v9 <= 2845 )
{
if ( v9 != 2843 )
{
v24 = 0;
v25 = 0;
v26 = 2852;
goto LABEL_71;
}
LABEL_112:
v24 = 1;
v25 = 0;
v26 = 2852;
goto LABEL_71;
}
if ( v9 != 2847 )
{
if ( v9 < 2847 || v9 == 2848 )
{
v24 = 0;
v25 = 0;
v26 = 2855;
goto LABEL_71;
}
if ( v9 != 2849 )
goto LABEL_75;
}
v24 = 1;
v25 = 0;
v26 = 2855;
}
else if ( v9 >= 2838 )
{
v28 = v31;
cocos2d::CCPoint::CCPoint(&v34, v31);
if ( EditorUI::getNeighbor(a1, 2838, v37, (GJSmartDirection)&v34, (cocos2d::CCArray *)((char *)&dword_0 + 1)) )
{
cocos2d::CCPoint::CCPoint(&v34, v28);
if ( EditorUI::getNeighbor(
a1,
2838,
v38,
(GJSmartDirection)((unsigned int)v29 + 144),
(cocos2d::CCArray *)((char *)&dword_0 + 2)) )
{
cocos2d::CCPoint::CCPoint(&v34, v28);
if ( EditorUI::getNeighbor(
a1,
2838,
v39,
(GJSmartDirection)((unsigned int)v29 + 144),
(cocos2d::CCArray *)((char *)&dword_0 + 3)) )
{
cocos2d::CCPoint::CCPoint(&v34, v28);
if ( EditorUI::getNeighbor(
a1,
2838,
v40,
(GJSmartDirection)((unsigned int)v29 + 144),
(cocos2d::CCArray *)&byte_4) )
{
cocos2d::CCPoint::CCPoint(&v34, v28);
if ( EditorUI::getNeighbor(
a1,
2838,
v41,
(GJSmartDirection)((unsigned int)v29 + 144),
(cocos2d::CCArray *)&byte_5) )
{
cocos2d::CCPoint::CCPoint(&v34, v28);
if ( EditorUI::getNeighbor(
a1,
2838,
v42,
(GJSmartDirection)((unsigned int)v29 + 144),
(cocos2d::CCArray *)&byte_6) )
{
cocos2d::CCPoint::CCPoint(&v34, v28);
if ( EditorUI::getNeighbor(
a1,
2838,
v43,
(GJSmartDirection)((unsigned int)v29 + 144),
(cocos2d::CCArray *)&byte_7) )
{
cocos2d::CCPoint::CCPoint(&v34, v28);
if ( EditorUI::getNeighbor(
a1,
2838,
v44,
(GJSmartDirection)((unsigned int)v29 + 144),
(cocos2d::CCArray *)byte_8) )
{
goto LABEL_75;
}
v24 = 1;
v25 = 0;
v26 = 2863;
}
else
{
v24 = 0;
v25 = 0;
v26 = 2863;
}
}
else
{
v24 = 0;
v25 = 0;
v26 = 2861;
}
}
else
{
v24 = 1;
v25 = 0;
v26 = 2861;
}
}
else
{
v24 = 1;
v25 = 0;
v26 = 2854;
}
}
else
{
v24 = 0;
v25 = 0;
v26 = 2854;
}
}
else
{
v24 = 0;
v25 = 0;
v26 = 2856;
}
}
else
{
v24 = 0;
v25 = 0;
v26 = 2853;
}
}
else if ( v9 == 1649 )
{
v24 = 0;
v25 = 0;
v26 = 1681;
}
else if ( v9 <= 1649 )
{
v24 = 0;
v25 = 0;
if ( v9 == 1647 )
v26 = 1679;
else
v26 = 1680;
}
else if ( v9 == 1651 )
{
v24 = 0;
v25 = 0;
v26 = 1683;
}
else if ( v9 < 1651 )
{
v24 = 0;
v25 = 0;
v26 = 1682;
}
else
{
if ( v9 != 1652 )
goto LABEL_75;
v24 = 0;
v25 = 0;
v26 = 1684;
}
}
else if ( v9 == 1637 )
{
v24 = 0;
v25 = 0;
v26 = 1669;
}
else if ( v9 <= 1637 )
{
if ( v9 == 1633 )
{
v24 = 0;
v25 = 0;
v26 = 1665;
}
else if ( v9 <= 1633 )
{
if ( v9 == 1631 )
{
v24 = 0;
v25 = 0;
v26 = 1663;
}
else
{
v24 = 0;
v25 = 0;
if ( v9 <= 1631 )
v26 = 1662;
else
v26 = 1664;
}
}
else if ( v9 == 1635 )
{
v24 = 0;
v25 = 0;
v26 = 1667;
}
else
{
v24 = 0;
v25 = 0;
if ( v9 <= 1635 )
v26 = 1666;
else
v26 = 1668;
}
}
else if ( v9 == 1641 )
{
v24 = 0;
v25 = 0;
v26 = 1673;
}
else if ( v9 <= 1641 )
{
if ( v9 == 1639 )
{
v24 = 0;
v25 = 0;
v26 = 1671;
}
else
{
v24 = 0;
v25 = 0;
if ( v9 <= 1639 )
v26 = 1670;
else
v26 = 1672;
}
}
else if ( v9 == 1643 )
{
v24 = 0;
v25 = 0;
v26 = 1675;
}
else if ( v9 < 1643 )
{
v24 = 0;
v25 = 0;
v26 = 1674;
}
else
{
v24 = 0;
v25 = 0;
if ( v9 == 1644 )
v26 = 1676;
else
v26 = 1677;
}
LABEL_71:
v11 = *(_QWORD *)v7;
setFlipX = (void (__fastcall *)(GameObject *, __int64))v26;
v35.x = (*(float (__fastcall **)(__int64))(v11 + 1344))(v7);
Object = EditorUI::createObject(a1, (int)setFlipX, v35);
setRotation = Object->setRotation;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 352LL))(v7);
((void (__fastcall *)(GameObject *))setRotation)(Object);
v14 = *(_QWORD *)v7;
setFlipX = (void (__fastcall *)(GameObject *, __int64))Object->setFlipX;
if ( v24 )
{
v15 = (*(__int64 (__fastcall **)(__int64))(v14 + 1408))(v7);
setFlipX(Object, v15 ^ 1u);
}
else
{
v27 = (*(unsigned __int8 (__fastcall **)(__int64))(v14 + 1408))(v7);
setFlipX(Object, v27);
}
setFlipY = Object->setFlipY;
v17 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 1416LL))(v7);
setFlipY(Object, v17);
GameObject::updateCustomScaleX(Object, *(float *)(v7 + 1136));
GameObject::updateCustomScaleY(Object, *(float *)(v7 + 1140));
Object->m_editorLayer2 = *(_WORD *)(v7 + 1186) + 3;
cocos2d::CCArray::addObject(v6, Object);
if ( v25 )
{
v36.x = (*(float (__fastcall **)(__int64))(*(_QWORD *)v7 + 1344LL))(v7);
v18 = EditorUI::createObject(a1, v25, v36);
v19 = v18->setRotation;
(*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 352LL))(v7);
((void (__fastcall *)(GameObject *))v19)(v18);
v20 = v18->setFlipX;
v21 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 1408LL))(v7);
v20(v18, v21);
v22 = v18->setFlipY;
v23 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 1416LL))(v7);
v22(v18, v23);
GameObject::updateCustomScaleX(v18, *(float *)(v7 + 1136));
GameObject::updateCustomScaleY(v18, *(float *)(v7 + 1140));
v18->m_editorLayer2 = *(_WORD *)(v7 + 1186) + 3;
cocos2d::CCArray::addObject(v6, v18);
}
LABEL_75:
++v5;
}
return v6;
}