//
// EditorUI::createRockBases from 0x1401fb1f0 to 0x1401fbc89 (2713 bytes)
//
// 7 xrefs:
// > EditorCommandsPopup::onCommand @ 0x14017dcdc
// > EditorUI::createSmartObjectsFromType @ 0x1401b7b6b
// > EditorUI::handleEditorAction @ 0x1401c35c7
// > ??> @ 0x1408a398c
// > ??> @ 0x1408a39d8
// > ??> @ 0x14091abf4
// > ??> @ 0x14091ac00
//
// This function is hookable on this platform (idp: pc, 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 11:28:11 +0000
//
cocos2d::CCArray *__fastcall EditorUI::createRockBases(__int64 a1, cocos2d::CCArray *a2)
{
__int64 v3; // rcx
cocos2d::CCArray *v4; // r12
__int64 v5; // rcx
cocos2d::CCArray *v6; // r13
unsigned int v7; // r15d
char v8; // r13
bool v9; // r14
bool v10; // di
bool v11; // si
bool v12; // bl
__int64 v13; // rax
__int64 v14; // rax
__int64 v15; // rax
float v16; // xmm2_4
cocos2d::CCPoint *v17; // rcx
__int64 v18; // rax
__int64 v19; // rax
__int64 v20; // rax
float v21; // xmm1_4
__int64 v22; // rax
__int64 v23; // rax
__int64 v24; // rax
__int64 v25; // rax
__int64 v26; // rax
__int64 v27; // rax
__int64 v28; // rax
unsigned int v29; // r15d
struct cocos2d::CCObject *v30; // rax
const struct cocos2d::CCRect *v31; // rax
int v32; // esi
struct cocos2d::CCObject *v33; // r14
unsigned int v34; // edi
__int64 v35; // rax
const struct cocos2d::CCPoint *v36; // rax
__int64 Object; // rdi
__int64 v38; // rbx
__int64 v39; // rbx
unsigned __int8 v40; // al
__int64 v41; // rbx
unsigned __int8 v42; // al
float v43; // xmm0_4
__int64 v44; // rax
float v45; // xmm1_4
float v46; // xmm0_4
__int64 v47; // rax
float v48; // xmm1_4
cocos2d::CCPoint *v49; // rax
const struct cocos2d::CCPoint *v50; // rax
__int64 v51; // rdi
__int64 v52; // rbx
__int64 v53; // rbx
unsigned __int8 v54; // al
__int64 v55; // rbx
unsigned __int8 v56; // al
float v57; // xmm0_4
__int64 v58; // rax
float v59; // xmm1_4
float v60; // xmm0_4
__int64 v61; // rax
float v62; // xmm1_4
_BYTE v64[8]; // [rsp+20h] [rbp-E0h] BYREF
_BYTE v65[8]; // [rsp+28h] [rbp-D8h] BYREF
_BYTE v66[8]; // [rsp+30h] [rbp-D0h] BYREF
_BYTE v67[8]; // [rsp+38h] [rbp-C8h] BYREF
struct cocos2d::CCObject *v68; // [rsp+40h] [rbp-C0h]
cocos2d::CCArray *v69; // [rsp+48h] [rbp-B8h]
_BYTE v70[8]; // [rsp+50h] [rbp-B0h] BYREF
_BYTE v71[16]; // [rsp+58h] [rbp-A8h] BYREF
_BYTE v72[8]; // [rsp+68h] [rbp-98h] BYREF
_BYTE v73[8]; // [rsp+70h] [rbp-90h] BYREF
_BYTE v74[8]; // [rsp+78h] [rbp-88h] BYREF
_BYTE v75[8]; // [rsp+80h] [rbp-80h] BYREF
_BYTE v76[8]; // [rsp+88h] [rbp-78h] BYREF
_BYTE v77[8]; // [rsp+90h] [rbp-70h] BYREF
_BYTE v78[8]; // [rsp+98h] [rbp-68h] BYREF
_BYTE v79[8]; // [rsp+A0h] [rbp-60h] BYREF
_BYTE v80[8]; // [rsp+A8h] [rbp-58h] BYREF
char v81; // [rsp+B0h] [rbp-50h] BYREF
_BYTE v82[8]; // [rsp+B8h] [rbp-48h] BYREF
_BYTE v83[8]; // [rsp+C0h] [rbp-40h] BYREF
char v84; // [rsp+C8h] [rbp-38h] BYREF
_BYTE v85[8]; // [rsp+D0h] [rbp-30h] BYREF
_BYTE v86[8]; // [rsp+D8h] [rbp-28h] BYREF
_BYTE v87[8]; // [rsp+E0h] [rbp-20h] BYREF
char v88; // [rsp+E8h] [rbp-18h] BYREF
_BYTE v89[8]; // [rsp+F0h] [rbp-10h] BYREF
_BYTE v90[8]; // [rsp+F8h] [rbp-8h] BYREF
_BYTE v91[8]; // [rsp+100h] [rbp+0h] BYREF
char v92; // [rsp+108h] [rbp+8h] BYREF
_BYTE v93[8]; // [rsp+110h] [rbp+10h] BYREF
_BYTE v94[8]; // [rsp+118h] [rbp+18h] BYREF
_BYTE v95[8]; // [rsp+120h] [rbp+20h] BYREF
_BYTE v96[8]; // [rsp+128h] [rbp+28h] BYREF
_BYTE v97[16]; // [rsp+130h] [rbp+30h] BYREF
unsigned int v99; // [rsp+1D8h] [rbp+D8h]
char v100; // [rsp+1E0h] [rbp+E0h] BYREF
char v101; // [rsp+1E8h] [rbp+E8h] BYREF
if ( !a2 || !cocos2d::CCArray::count(a2) )
return nullptr;
v4 = (cocos2d::CCArray *)cocos2d::CCArray::create(v3);
v6 = (cocos2d::CCArray *)cocos2d::CCArray::create(v5);
v69 = v6;
cocos2d::CCArray::addObjectsFromArray(v4, a2);
v7 = 0;
v99 = 0;
if ( cocos2d::CCArray::count(v4) )
{
while ( 1 )
{
v68 = cocos2d::CCArray::objectAtIndex(v4, v7);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v68 + 1208LL))(v68, v67);
v8 = 0;
v9 = 0;
v10 = 0;
v11 = 0;
v12 = 0;
if ( (unsigned int)(*((_DWORD *)v68 + 259) - 1348) <= 3 )
break;
LABEL_33:
v32 = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v70, (const struct cocos2d::CCPoint *)&unk_14090A788);
v33 = v68;
switch ( *((_DWORD *)v68 + 259) )
{
case 0x544:
if ( v8 )
{
v34 = 1352;
}
else
{
v34 = 1387;
if ( v12 )
{
v32 = 1391;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v93, 0.0, -30.0);
cocos2d::CCPoint::operator=(v70, v35);
}
}
goto LABEL_64;
case 0x545:
if ( v8 )
{
v34 = 1353;
}
else
{
v34 = 1388;
if ( v12 )
v32 = 1392;
}
goto LABEL_64;
case 0x546:
if ( v8 )
{
v34 = 1354;
}
else
{
v34 = 1389;
if ( v12 )
v32 = 1394;
}
goto LABEL_64;
case 0x547:
if ( v8 )
{
v34 = 1355;
}
else
{
v34 = 1390;
if ( v12 )
v32 = 1393;
}
goto LABEL_64;
case 0x597:
v34 = 1442;
goto LABEL_64;
case 0x598:
v34 = 1443;
goto LABEL_64;
case 0x599:
v34 = 1444;
goto LABEL_64;
case 0x59A:
v34 = 1445;
goto LABEL_64;
case 0x59B:
v34 = 1446;
goto LABEL_64;
case 0x59C:
v34 = 1447;
goto LABEL_64;
case 0x59D:
v34 = 1448;
goto LABEL_64;
case 0x59E:
v34 = 1449;
goto LABEL_64;
case 0x59F:
v34 = 1450;
goto LABEL_64;
case 0x5A0:
v34 = 1451;
goto LABEL_64;
case 0x5A1:
v34 = 1452;
goto LABEL_64;
case 0x5E6:
v34 = 1513;
goto LABEL_64;
case 0x5E7:
v34 = 1514;
goto LABEL_64;
case 0x5E8:
v34 = 1515;
LABEL_64:
v36 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v33 + 1208LL))(
v33,
v94);
Object = EditorUI::createObject(a1, v34, v36);
v38 = *(_QWORD *)Object;
(*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v33 + 360LL))(v33);
(*(void (__fastcall **)(__int64))(v38 + 352))(Object);
v39 = *(_QWORD *)Object;
v40 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v33 + 1272LL))(v33);
(*(void (__fastcall **)(__int64, _QWORD))(v39 + 1088))(Object, v40);
v41 = *(_QWORD *)Object;
v42 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v33 + 1280LL))(v33);
(*(void (__fastcall **)(__int64, _QWORD))(v41 + 1096))(Object, v42);
v43 = roundf(*((float *)v33 + 290) * 1000.0);
*(_DWORD *)(Object + 64) = 0;
v44 = *(_QWORD *)Object;
v45 = (float)(int)v43 / 1000.0;
*(float *)(Object + 1160) = v45;
*(float *)(Object + 996) = v45;
(*(void (__fastcall **)(__int64))(v44 + 1288))(Object);
*(_BYTE *)(Object + 848) = 1;
*(_BYTE *)(Object + 872) = 1;
v46 = roundf(*((float *)v33 + 291) * 1000.0);
*(_DWORD *)(Object + 68) = 0;
v47 = *(_QWORD *)Object;
v48 = (float)(int)v46 / 1000.0;
*(float *)(Object + 1164) = v48;
*(float *)(Object + 1000) = v48;
(*(void (__fastcall **)(__int64))(v47 + 1296))(Object);
v6 = v69;
*(_BYTE *)(Object + 848) = 1;
*(_BYTE *)(Object + 872) = 1;
*(_WORD *)(Object + 1212) = *((_WORD *)v33 + 605) + 2;
cocos2d::CCArray::addObject(v6, (struct cocos2d::CCObject *)Object);
if ( v32 > 0 )
{
(*(void (__fastcall **)(struct cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v33 + 1208LL))(v33, v66);
v49 = offsetForKey((cocos2d::CCPoint *)v95, v32);
cocos2d::CCPoint::operator+(v66, v76, v49);
cocos2d::CCPoint::operator=(v66, v76);
cocos2d::CCPoint::operator+(v66, v77, v70);
cocos2d::CCPoint::operator=(v66, v77);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v96, (const struct cocos2d::CCPoint *)v66);
v51 = EditorUI::createObject(a1, v32, v50);
v52 = *(_QWORD *)v51;
(*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v33 + 360LL))(v33);
(*(void (__fastcall **)(__int64))(v52 + 352))(v51);
v53 = *(_QWORD *)v51;
v54 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v33 + 1272LL))(v33);
(*(void (__fastcall **)(__int64, _QWORD))(v53 + 1088))(v51, v54);
v55 = *(_QWORD *)v51;
v56 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v33 + 1280LL))(v33);
(*(void (__fastcall **)(__int64, _QWORD))(v55 + 1096))(v51, v56);
v57 = roundf(*((float *)v33 + 290) * 1000.0);
*(_DWORD *)(v51 + 64) = 0;
v58 = *(_QWORD *)v51;
v59 = (float)(int)v57 / 1000.0;
*(float *)(v51 + 1160) = v59;
*(float *)(v51 + 996) = v59;
(*(void (__fastcall **)(__int64))(v58 + 1288))(v51);
*(_BYTE *)(v51 + 848) = 1;
*(_BYTE *)(v51 + 872) = 1;
v60 = roundf(*((float *)v33 + 291) * 1000.0);
*(_DWORD *)(v51 + 68) = 0;
v61 = *(_QWORD *)v51;
v62 = (float)(int)v60 / 1000.0;
*(float *)(v51 + 1164) = v62;
*(float *)(v51 + 1000) = v62;
(*(void (__fastcall **)(__int64))(v61 + 1296))(v51);
*(_BYTE *)(v51 + 848) = 1;
*(_BYTE *)(v51 + 872) = 1;
*(_WORD *)(v51 + 1212) = *((_WORD *)v33 + 605) + 2;
cocos2d::CCArray::addObject(v6, (struct cocos2d::CCObject *)v51);
}
break;
default:
v6 = v69;
break;
}
v99 = ++v7;
if ( v7 >= cocos2d::CCArray::count(v4) )
return v6;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v100);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v101);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v64);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v65);
if ( *((_DWORD *)v68 + 259) != 1348 )
{
switch ( *((_DWORD *)v68 + 259) )
{
case 0x545:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v85, -30.0, 0.0);
cocos2d::CCPoint::operator=(&v100, v22);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, -30.0, -30.0);
cocos2d::CCPoint::operator=(&v101, v23);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v87, 0.0, -30.0);
cocos2d::CCPoint::operator=(v64, v24);
v16 = 0.0;
v17 = (cocos2d::CCPoint *)&v88;
v21 = -30.0;
break;
case 0x546:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, 0.0, 30.0);
cocos2d::CCPoint::operator=(&v100, v18);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v82, 30.0, 30.0);
cocos2d::CCPoint::operator=(&v101, v19);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v83, 30.0, 0.0);
cocos2d::CCPoint::operator=(v64, v20);
v16 = 0.0;
v17 = (cocos2d::CCPoint *)&v84;
v21 = 30.0;
break;
case 0x547:
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v78, 0.0, 30.0);
cocos2d::CCPoint::operator=(&v100, v13);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v79, -30.0, 30.0);
cocos2d::CCPoint::operator=(&v101, v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v80, -30.0, 0.0);
cocos2d::CCPoint::operator=(v64, v15);
v16 = 30.0;
v17 = (cocos2d::CCPoint *)&v81;
goto LABEL_13;
default:
LABEL_15:
cocos2d::CCPoint::operator+(v67, v72, &v100);
cocos2d::CCPoint::operator+(v67, v73, &v101);
cocos2d::CCPoint::operator+(v67, v74, v64);
cocos2d::CCPoint::operator+(v67, v75, v65);
v29 = 0;
if ( cocos2d::CCArray::count(v4) )
{
while ( 1 )
{
if ( v29 != v99 )
{
v30 = cocos2d::CCArray::objectAtIndex(v4, v29);
v31 = (const struct cocos2d::CCRect *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v30 + 1184LL))(v30);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v71, v31);
if ( !v9 )
v9 = cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v71, (const struct cocos2d::CCPoint *)v72);
if ( !v10 )
v10 = cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v71, (const struct cocos2d::CCPoint *)v73);
if ( !v11 )
v11 = cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v71, (const struct cocos2d::CCPoint *)v74);
if ( !v12 )
v12 = cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v71, (const struct cocos2d::CCPoint *)v75);
}
if ( v9 && v10 && v11 )
break;
if ( v8 )
goto LABEL_30;
LABEL_31:
if ( ++v29 >= cocos2d::CCArray::count(v4) )
goto LABEL_32;
}
v8 = 1;
LABEL_30:
if ( v12 )
goto LABEL_32;
goto LABEL_31;
}
LABEL_32:
v7 = v99;
goto LABEL_33;
}
LABEL_14:
cocos2d::CCPoint::CCPoint(v17, v21, v16);
cocos2d::CCPoint::operator=(v65, v28);
goto LABEL_15;
}
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v89, 30.0, 0.0);
cocos2d::CCPoint::operator=(&v100, v25);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v90, 30.0, -30.0);
cocos2d::CCPoint::operator=(&v101, v26);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v91, 0.0, -30.0);
cocos2d::CCPoint::operator=(v64, v27);
v16 = -30.0;
v17 = (cocos2d::CCPoint *)&v92;
LABEL_13:
v21 = 0.0;
goto LABEL_14;
}
return v6;
}