//
// EditorUI::createRockBases from 0x66c550 to 0x66cb24 (1492 bytes)
//
// 3 xrefs:
// > EditorUI::createSmartObjectsFromType @ 0x482d84
// > EditorUI::handleEditorAction @ 0x6f20be
// > EditorCommandsPopup::onCommand @ 0x77a836
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:55:46 +0000
//
cocos2d::CCArray *__fastcall EditorUI::createRockBases(EditorUI *this, cocos2d::CCArray *a2)
{
cocos2d::CCArray *v3; // r0
unsigned int v5; // r8
cocos2d::CCArray *v6; // r9
float *v7; // r5
int v8; // r4
int v9; // r7
float v10; // r2
float v11; // r1
unsigned int v12; // r6
_BOOL4 v13; // r11
int v14; // r3
GameObject *v15; // r7
bool v16; // zf
GameObject *Object; // r7
void (__fastcall *v18)(GameObject *, int); // r11
int v19; // r0
void (__fastcall *v20)(GameObject *, int); // r11
int v21; // r0
void (__fastcall *v22)(GameObject *, int); // r11
int v23; // r0
GameObject *v24; // r4
void (__fastcall *v25)(GameObject *, int); // r6
int v26; // r0
void (__fastcall *v27)(GameObject *, int); // r6
int v28; // r0
void (__fastcall *v29)(GameObject *, int); // r6
int v30; // r0
int v31; // r0
const cocos2d::CCRect *v32; // r0
_BOOL4 v33; // [sp+0h] [bp-84h]
_BOOL4 v34; // [sp+4h] [bp-80h]
cocos2d::CCArray *v35; // [sp+8h] [bp-7Ch]
_BYTE v37[8]; // [sp+24h] [bp-60h] BYREF
_BYTE v38[8]; // [sp+2Ch] [bp-58h] BYREF
_BYTE v39[8]; // [sp+34h] [bp-50h] BYREF
_BYTE v40[8]; // [sp+3Ch] [bp-48h] BYREF
_BYTE v41[8]; // [sp+44h] [bp-40h] BYREF
_BYTE v42[8]; // [sp+4Ch] [bp-38h] BYREF
_BYTE v43[8]; // [sp+54h] [bp-30h] BYREF
_BYTE v44[8]; // [sp+5Ch] [bp-28h] BYREF
_BYTE v45[8]; // [sp+64h] [bp-20h] BYREF
_BYTE v46[16]; // [sp+6Ch] [bp-18h] BYREF
if ( !a2 )
return nullptr;
v3 = (cocos2d::CCArray *)cocos2d::CCArray::count(a2);
if ( !v3 )
return nullptr;
v5 = 0;
v6 = (cocos2d::CCArray *)cocos2d::CCArray::create(v3);
v35 = (cocos2d::CCArray *)cocos2d::CCArray::create(v6);
cocos2d::CCArray::addObjectsFromArray(v6, a2);
while ( v5 < cocos2d::CCArray::count(v6) )
{
v7 = (float *)cocos2d::CCArray::objectAtIndex(v6, v5);
(*(void (__fastcall **)(_BYTE *, float *))(*(_DWORD *)v7 + 680))(v37, v7);
if ( (unsigned int)(*((_DWORD *)v7 + 223) - 1348) <= 3 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v40);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v41);
switch ( *((_DWORD *)v7 + 223) )
{
case 0x544:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 30.0, 0.0);
cocos2d::CCPoint::operator=(v38, v46);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 30.0, -30.0);
cocos2d::CCPoint::operator=(v39, v46);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 0.0, -30.0);
cocos2d::CCPoint::operator=(v40, v46);
v10 = -30.0;
v11 = 0.0;
goto LABEL_9;
case 0x545:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, -30.0, 0.0);
cocos2d::CCPoint::operator=(v38, v46);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, -30.0, -30.0);
cocos2d::CCPoint::operator=(v39, v46);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 0.0, -30.0);
cocos2d::CCPoint::operator=(v40, v46);
v11 = -30.0;
goto LABEL_75;
case 0x546:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 0.0, 30.0);
cocos2d::CCPoint::operator=(v38, v46);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 30.0, 30.0);
cocos2d::CCPoint::operator=(v39, v46);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 30.0, 0.0);
cocos2d::CCPoint::operator=(v40, v46);
v11 = 30.0;
LABEL_75:
v10 = 0.0;
goto LABEL_9;
case 0x547:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 0.0, 30.0);
cocos2d::CCPoint::operator=(v38, v46);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, -30.0, 30.0);
cocos2d::CCPoint::operator=(v39, v46);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, -30.0, 0.0);
cocos2d::CCPoint::operator=(v40, v46);
v11 = 0.0;
v10 = 30.0;
LABEL_9:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, v11, v10);
cocos2d::CCPoint::operator=(v41, v46);
break;
default:
break;
}
v12 = 0;
cocos2d::CCPoint::operator+(v42, v37, v38);
cocos2d::CCPoint::operator+(v43, v37, v39);
cocos2d::CCPoint::operator+(v44, v37, v40);
v8 = 0;
v13 = 0;
v9 = 0;
cocos2d::CCPoint::operator+(v45, v37, v41);
v34 = 0;
v33 = 0;
while ( v12 < cocos2d::CCArray::count(v6) )
{
if ( v12 != v5 )
{
v31 = cocos2d::CCArray::objectAtIndex(v6, v12);
v32 = (const cocos2d::CCRect *)(*(int (__fastcall **)(int))(*(_DWORD *)v31 + 664))(v31);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v46, v32);
if ( !v33 )
v33 = cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v46, (const cocos2d::CCPoint *)v42) != 0;
if ( !v34 )
v34 = cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v46, (const cocos2d::CCPoint *)v43) != 0;
if ( !v13 )
v13 = cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v46, (const cocos2d::CCPoint *)v44) != 0;
if ( !v8 )
v8 = cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v46, (const cocos2d::CCPoint *)v45) != 0;
}
if ( v33 && v34 && v13 || v9 )
{
v9 = 1;
if ( v8 )
break;
}
++v12;
}
}
else
{
v8 = 0;
v9 = 0;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v43, (const cocos2d::CCPoint *)&unk_D2D1E8);
v14 = *((_DWORD *)v7 + 223);
if ( v14 == 1435 )
{
v8 = 0;
v15 = (GameObject *)(&stru_59C + 10);
}
else if ( v14 > 1435 )
{
if ( v14 == 1440 )
{
v8 = 0;
v15 = (GameObject *)(&stru_59C + 15);
}
else if ( v14 > 1440 )
{
if ( v14 == 1510 )
{
v8 = 0;
v15 = (GameObject *)(&stru_5DC + 13);
}
else if ( v14 > 1510 )
{
if ( v14 == 1511 )
{
v8 = 0;
v15 = (GameObject *)(&stru_5DC + 14);
}
else
{
if ( v14 != 1512 )
goto LABEL_70;
v8 = 0;
v15 = (GameObject *)(&stru_5DC + 15);
}
}
else
{
if ( v14 != 1441 )
goto LABEL_70;
v8 = 0;
v15 = (GameObject *)&stru_5AC;
}
}
else if ( v14 == 1437 )
{
v8 = 0;
v15 = (GameObject *)(&stru_59C + 12);
}
else if ( v14 < 1437 )
{
v8 = 0;
v15 = (GameObject *)(&stru_59C + 11);
}
else
{
v8 = 0;
if ( v14 == 1438 )
v15 = (GameObject *)(&stru_59C + 13);
else
v15 = (GameObject *)(&stru_59C + 14);
}
}
else if ( v14 == 1351 )
{
if ( v9 )
{
v8 = 0;
v15 = (GameObject *)(&stru_53C + 15);
}
else
{
v16 = v8 == 0;
v15 = (GameObject *)(&stru_56C + 2);
v8 = 1393;
if ( v16 )
v8 = 0;
}
}
else if ( v14 >= 1352 )
{
if ( v14 == 1432 )
{
v8 = 0;
v15 = (GameObject *)(&stru_59C + 7);
}
else if ( v14 > 1432 )
{
v8 = 0;
if ( v14 == 1433 )
v15 = (GameObject *)(&stru_59C + 8);
else
v15 = (GameObject *)(&stru_59C + 9);
}
else
{
if ( v14 != 1431 )
goto LABEL_70;
v8 = 0;
v15 = (GameObject *)(&stru_59C + 6);
}
}
else if ( v14 == 1349 )
{
if ( v9 )
{
v8 = 0;
v15 = (GameObject *)(&stru_53C + 13);
}
else
{
v15 = (GameObject *)&stru_56C;
if ( v8 )
v8 = 1392;
else
v8 = 0;
}
}
else if ( v14 > 1349 )
{
if ( v9 )
{
v8 = 0;
v15 = (GameObject *)(&stru_53C + 14);
}
else
{
v16 = v8 == 0;
v15 = (GameObject *)(&stru_56C + 1);
v8 = 1394;
if ( v16 )
v8 = 0;
}
}
else
{
if ( v14 != 1348 )
goto LABEL_70;
if ( v9 )
{
v8 = 0;
v15 = (GameObject *)(&stru_53C + 12);
}
else
{
if ( v8 )
{
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, 0.0, -30.0);
v8 = 1391;
cocos2d::CCPoint::operator=(v43, v46);
}
v15 = (GameObject *)(&stru_55C + 15);
}
}
(*(void (__fastcall **)(_BYTE *, float *))(*(_DWORD *)v7 + 680))(v46, v7);
Object = EditorUI::createObject((int)this, v15, (const cocos2d::CCPoint *)v46);
v18 = *(void (__fastcall **)(GameObject *, int))(*(_DWORD *)Object + 180);
v19 = (*(int (__fastcall **)(float *))(*(_DWORD *)v7 + 184))(v7);
v18(Object, v19);
v20 = *(void (__fastcall **)(GameObject *, int))(*(_DWORD *)Object + 620);
v21 = (*(int (__fastcall **)(float *))(*(_DWORD *)v7 + 712))(v7);
v20(Object, v21);
v22 = *(void (__fastcall **)(GameObject *, int))(*(_DWORD *)Object + 624);
v23 = (*(int (__fastcall **)(float *))(*(_DWORD *)v7 + 716))(v7);
v22(Object, v23);
GameObject::updateCustomScaleX(Object, v7[252]);
GameObject::updateCustomScaleY(Object, v7[253]);
*((_WORD *)Object + 520) = *((_WORD *)v7 + 519) + 2;
cocos2d::CCArray::addObject(v35, Object);
if ( v8 )
{
(*(void (__fastcall **)(_BYTE *, float *))(*(_DWORD *)v7 + 680))(v44, v7);
offsetForKey((cocos2d::CCPoint *)v45);
cocos2d::CCPoint::operator+(v46, v44, v45);
cocos2d::CCPoint::operator=(v44, v46);
cocos2d::CCPoint::operator+(v46, v44, v43);
cocos2d::CCPoint::operator=(v44, v46);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v46, (const cocos2d::CCPoint *)v44);
v24 = EditorUI::createObject((int)this, (GameObject *)v8, (const cocos2d::CCPoint *)v46);
v25 = *(void (__fastcall **)(GameObject *, int))(*(_DWORD *)v24 + 180);
v26 = (*(int (__fastcall **)(float *))(*(_DWORD *)v7 + 184))(v7);
v25(v24, v26);
v27 = *(void (__fastcall **)(GameObject *, int))(*(_DWORD *)v24 + 620);
v28 = (*(int (__fastcall **)(float *))(*(_DWORD *)v7 + 712))(v7);
v27(v24, v28);
v29 = *(void (__fastcall **)(GameObject *, int))(*(_DWORD *)v24 + 624);
v30 = (*(int (__fastcall **)(float *))(*(_DWORD *)v7 + 716))(v7);
v29(v24, v30);
GameObject::updateCustomScaleX(v24, v7[252]);
GameObject::updateCustomScaleY(v24, v7[253]);
*((_WORD *)v24 + 520) = *((_WORD *)v7 + 519) + 2;
cocos2d::CCArray::addObject(v35, v24);
}
LABEL_70:
++v5;
}
return v35;
}