//
// EditorUI::createRockBases from 0xb08a3c to 0xb09314 (2264 bytes)
//
// 4 xrefs:
// > EditorUI::createSmartObjectsFromType @ 0x7c36e4
// > EditorUI::handleEditorAction @ 0xbd7614
// > EditorCommandsPopup::onCommand @ 0xcbc150
// > ??> @ 0xa5da8
//
// 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:01:25 +0000
//
cocos2d::CCArray *__fastcall EditorUI::createRockBases(EditorUI *this, cocos2d::CCArray *a2)
{
cocos2d::CCArray *v2; // x0
cocos2d::CCArray *v3; // x21
unsigned int v4; // w20
float *v5; // x19
_BOOL4 v7; // w25
int v8; // w22
int v9; // w24
unsigned int v10; // w22
float *Object; // x22
void (__fastcall *v12)(float *); // x25
void (__fastcall *v13)(float *, _QWORD); // x25
unsigned int v14; // w0
void (__fastcall *v15)(float *, _QWORD); // x25
unsigned int v16; // w0
float *v17; // x22
void (__fastcall *v18)(float *); // x23
void (__fastcall *v19)(float *, _QWORD); // x23
unsigned int v20; // w0
void (__fastcall *v21)(float *, _QWORD); // x23
unsigned int v22; // w0
unsigned int v23; // w28
_BOOL4 v24; // w26
_BOOL4 v25; // w24
_BOOL4 v26; // w23
__int64 v27; // x0
const cocos2d::CCRect *v28; // x0
cocos2d::CCArray *v30; // [xsp+98h] [xbp+98h]
_BYTE v32[8]; // [xsp+B0h] [xbp+B0h] BYREF
_BYTE v33[8]; // [xsp+B8h] [xbp+B8h] BYREF
_BYTE v34[8]; // [xsp+C0h] [xbp+C0h] BYREF
_BYTE v35[8]; // [xsp+C8h] [xbp+C8h] BYREF
_BYTE v36[8]; // [xsp+D0h] [xbp+D0h] BYREF
__int64 v37; // [xsp+D8h] [xbp+D8h] BYREF
__int64 v38; // [xsp+E0h] [xbp+E0h] BYREF
__int64 v39; // [xsp+E8h] [xbp+E8h] BYREF
__int64 v40; // [xsp+F0h] [xbp+F0h] BYREF
_QWORD v41[2]; // [xsp+F8h] [xbp+F8h] BYREF
if ( !a2 )
return nullptr;
v2 = (cocos2d::CCArray *)cocos2d::CCArray::count(a2);
if ( !(_DWORD)v2 )
return nullptr;
v3 = (cocos2d::CCArray *)cocos2d::CCArray::create(v2);
v4 = 0;
v30 = (cocos2d::CCArray *)cocos2d::CCArray::create((cocos2d::CCArray *)v32);
cocos2d::CCArray::addObjectsFromArray(v3, a2);
if ( (unsigned int)cocos2d::CCArray::count(v3) )
{
while ( 1 )
{
v5 = (float *)cocos2d::CCArray::objectAtIndex(v3, v4);
(*(void (__fastcall **)(float *))(*(_QWORD *)v5 + 1360LL))(v5);
if ( (unsigned int)(*((_DWORD *)v5 + 257) - 1348) <= 3 )
break;
v7 = 0;
v8 = 0;
LABEL_8:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v38, (const cocos2d::CCPoint *)&unk_155E0B0);
switch ( *((_DWORD *)v5 + 257) )
{
case 0x544:
if ( v8 )
{
v9 = 0;
v10 = 1352;
}
else if ( v7 )
{
v9 = 1391;
v10 = 1387;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 0.0, -30.0);
cocos2d::CCPoint::operator=(&v38, v41);
}
else
{
v9 = 0;
v10 = 1387;
}
goto LABEL_10;
case 0x545:
if ( v8 )
{
v9 = 0;
v10 = 1353;
}
else
{
if ( v7 )
v9 = 1392;
else
v9 = 0;
v10 = 1388;
}
goto LABEL_10;
case 0x546:
if ( v8 )
{
v9 = 0;
v10 = 1354;
}
else
{
if ( v7 )
v9 = 1394;
else
v9 = 0;
v10 = 1389;
}
goto LABEL_10;
case 0x547:
if ( v8 )
{
v9 = 0;
v10 = 1355;
}
else
{
if ( v7 )
v9 = 1393;
else
v9 = 0;
v10 = 1390;
}
goto LABEL_10;
case 0x597:
v9 = 0;
v10 = 1442;
goto LABEL_10;
case 0x598:
v9 = 0;
v10 = 1443;
goto LABEL_10;
case 0x599:
v9 = 0;
v10 = 1444;
goto LABEL_10;
case 0x59A:
v9 = 0;
v10 = 1445;
goto LABEL_10;
case 0x59B:
v9 = 0;
v10 = 1446;
goto LABEL_10;
case 0x59C:
v9 = 0;
v10 = 1447;
goto LABEL_10;
case 0x59D:
v9 = 0;
v10 = 1448;
goto LABEL_10;
case 0x59E:
v9 = 0;
v10 = 1449;
goto LABEL_10;
case 0x59F:
v9 = 0;
v10 = 1450;
goto LABEL_10;
case 0x5A0:
v9 = 0;
v10 = 1451;
goto LABEL_10;
case 0x5A1:
v9 = 0;
v10 = 1452;
goto LABEL_10;
case 0x5E6:
v9 = 0;
v10 = 1513;
goto LABEL_10;
case 0x5E7:
v9 = 0;
v10 = 1514;
goto LABEL_10;
case 0x5E8:
v9 = 0;
v10 = 1515;
LABEL_10:
(*(void (__fastcall **)(_QWORD *__return_ptr, float *))(*(_QWORD *)v5 + 1360LL))(v41, v5);
Object = EditorUI::createObject((__int64)this, v10, (const cocos2d::CCPoint *)v41);
v12 = *(void (__fastcall **)(float *))(*(_QWORD *)Object + 360LL);
(*(void (__fastcall **)(float *))(*(_QWORD *)v5 + 368LL))(v5);
v12(Object);
v13 = *(void (__fastcall **)(float *, _QWORD))(*(_QWORD *)Object + 1240LL);
v14 = (*(__int64 (__fastcall **)(float *))(*(_QWORD *)v5 + 1424LL))(v5);
v13(Object, v14);
v15 = *(void (__fastcall **)(float *, _QWORD))(*(_QWORD *)Object + 1248LL);
v16 = (*(__int64 (__fastcall **)(float *))(*(_QWORD *)v5 + 1432LL))(v5);
v15(Object, v16);
GameObject::updateCustomScaleX((GameObject *)Object, v5[288]);
GameObject::updateCustomScaleY((GameObject *)Object, v5[289]);
*((_WORD *)Object + 602) = *((_WORD *)v5 + 601) + 2;
cocos2d::CCArray::addObject(v30, (cocos2d::CCObject *)Object);
if ( v9 )
{
(*(void (__fastcall **)(__int64 *__return_ptr, float *))(*(_QWORD *)v5 + 1360LL))(&v39, v5);
offsetForKey(&v40, v9);
cocos2d::CCPoint::operator+(v41, &v39);
cocos2d::CCPoint::operator=(&v39, v41);
cocos2d::CCPoint::operator+(v41, &v39);
cocos2d::CCPoint::operator=(&v39, v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, (const cocos2d::CCPoint *)&v39);
v17 = EditorUI::createObject((__int64)this, v9, (const cocos2d::CCPoint *)v41);
v18 = *(void (__fastcall **)(float *))(*(_QWORD *)v17 + 360LL);
(*(void (__fastcall **)(float *))(*(_QWORD *)v5 + 368LL))(v5);
v18(v17);
v19 = *(void (__fastcall **)(float *, _QWORD))(*(_QWORD *)v17 + 1240LL);
v20 = (*(__int64 (__fastcall **)(float *))(*(_QWORD *)v5 + 1424LL))(v5);
v19(v17, v20);
v21 = *(void (__fastcall **)(float *, _QWORD))(*(_QWORD *)v17 + 1248LL);
v22 = (*(__int64 (__fastcall **)(float *))(*(_QWORD *)v5 + 1432LL))(v5);
v21(v17, v22);
GameObject::updateCustomScaleX((GameObject *)v17, v5[288]);
GameObject::updateCustomScaleY((GameObject *)v17, v5[289]);
*((_WORD *)v17 + 602) = *((_WORD *)v5 + 601) + 2;
cocos2d::CCArray::addObject(v30, (cocos2d::CCObject *)v17);
}
break;
default:
break;
}
if ( ++v4 >= (unsigned int)cocos2d::CCArray::count(v3) )
return v30;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v34);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v36);
switch ( *((_DWORD *)v5 + 257) )
{
case 0x544:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 30.0, 0.0);
cocos2d::CCPoint::operator=(v33, v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 30.0, -30.0);
cocos2d::CCPoint::operator=(v34, v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 0.0, -30.0);
cocos2d::CCPoint::operator=(v35, v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 0.0, -30.0);
cocos2d::CCPoint::operator=(v36, v41);
break;
case 0x545:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, -30.0, 0.0);
cocos2d::CCPoint::operator=(v33, v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, -30.0, -30.0);
cocos2d::CCPoint::operator=(v34, v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 0.0, -30.0);
cocos2d::CCPoint::operator=(v35, v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, -30.0, 0.0);
cocos2d::CCPoint::operator=(v36, v41);
break;
case 0x546:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 0.0, 30.0);
cocos2d::CCPoint::operator=(v33, v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 30.0, 30.0);
cocos2d::CCPoint::operator=(v34, v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 30.0, 0.0);
cocos2d::CCPoint::operator=(v35, v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 30.0, 0.0);
cocos2d::CCPoint::operator=(v36, v41);
break;
case 0x547:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 0.0, 30.0);
cocos2d::CCPoint::operator=(v33, v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, -30.0, 30.0);
cocos2d::CCPoint::operator=(v34, v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, -30.0, 0.0);
cocos2d::CCPoint::operator=(v35, v41);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41, 0.0, 30.0);
cocos2d::CCPoint::operator=(v36, v41);
break;
default:
break;
}
cocos2d::CCPoint::operator+(&v37, v32);
v23 = 0;
v7 = 0;
v24 = 0;
v25 = 0;
cocos2d::CCPoint::operator+(&v38, v32);
v26 = 0;
v8 = 0;
cocos2d::CCPoint::operator+(&v39, v32);
cocos2d::CCPoint::operator+(&v40, v32);
while ( 1 )
{
if ( v23 >= (unsigned int)cocos2d::CCArray::count(v3) )
goto LABEL_8;
if ( v23 == v4 )
{
LABEL_22:
if ( !v25 || !v26 )
goto LABEL_32;
goto LABEL_23;
}
v27 = cocos2d::CCArray::objectAtIndex(v3, v23);
v28 = (const cocos2d::CCRect *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v27 + 1328LL))(v27);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v41, v28);
if ( v26 )
{
if ( v25 )
goto LABEL_20;
}
else
{
v26 = (unsigned __int8)cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v41, (const cocos2d::CCPoint *)&v37) != 0;
if ( v25 )
{
LABEL_20:
if ( v24 )
goto LABEL_21;
goto LABEL_30;
}
}
v25 = (unsigned __int8)cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v41, (const cocos2d::CCPoint *)&v38) != 0;
if ( v24 )
{
LABEL_21:
if ( v7 )
goto LABEL_22;
goto LABEL_31;
}
LABEL_30:
v24 = (unsigned __int8)cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v41, (const cocos2d::CCPoint *)&v39) != 0;
if ( v7 )
goto LABEL_22;
LABEL_31:
v7 = (unsigned __int8)cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v41, (const cocos2d::CCPoint *)&v40) != 0;
if ( !v25 || !v26 )
goto LABEL_32;
LABEL_23:
if ( v24 )
{
v8 = 1;
if ( v7 )
goto LABEL_34;
goto LABEL_25;
}
LABEL_32:
if ( v8 && v7 )
{
LABEL_34:
v7 = 1;
v8 = 1;
goto LABEL_8;
}
LABEL_25:
++v23;
}
}
return v30;
}