//
// EditorUI::rotateObjects from 0xc009e0 to 0xc00db0 (976 bytes)
//
// 7 xrefs:
// > EditorUI::onCreateObject @ 0x7ca6f8
// > EditorUI::createSmartObjectsFromTemplate @ 0x7cb598
// > EditorUI::transformObject @ 0xc01190
// > EditorUI::transformObjectCall @ 0xc01a28
// > EditorUI::transformObjectCall @ 0xc01b14
// > EditorUI::angleChanged @ 0xc01d74
// > ??> @ 0x5b6c0
//
// 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:48 +0000
//
__int64 __fastcall EditorUI::rotateObjects(
__int64 a1,
cocos2d::CCArray *a2,
cocos2d::CCPoint *a3,
unsigned __int8 a4,
float a5)
{
int v7; // w22
unsigned int v10; // w20
__int64 v11; // x0
_BYTE *v12; // x19
float v13; // s8
float v14; // s0
__int64 v15; // x1
void (__fastcall *v16)(_BYTE *, float); // x26
float v17; // s0
void (__fastcall *v18)(_BYTE *, float); // x26
float v19; // s0
__int64 v20; // x1
float v21; // s0
__int64 v22; // x1
_BYTE *v23; // x0
float v24; // s0
__int64 v25; // x1
_BYTE *v26; // x0
void (__fastcall *v28)(_BYTE *, float); // x26
float v29; // s0
void (__fastcall *v30)(_BYTE *, float); // x26
float v31; // s0
float v32; // s0
__int64 v33; // x1
_BYTE *v34; // x0
void (__fastcall *v35)(_BYTE *, float); // x26
float v36; // s0
__int64 v37; // x0
long double v38; // q0
float v39; // s8
float v40; // s15
float v41; // s14
float v42; // s0
__int64 v43; // x0
long double v44; // q0
__int64 v45; // [xsp+A8h] [xbp+A8h] BYREF
__int64 v46; // [xsp+B0h] [xbp+B0h] BYREF
_BYTE v47[8]; // [xsp+B8h] [xbp+B8h] BYREF
__int64 v48; // [xsp+C0h] [xbp+C0h] BYREF
v7 = a4;
if ( !a4 && (unsigned __int8)cocos2d::CCPoint::equals(a3, (const cocos2d::CCPoint *)&unk_155EAE0) )
{
EditorUI::getGroupCenter((cocos2d::CCPoint *)&v48, a2, 0);
cocos2d::CCPoint::operator=(a3, &v48);
}
v10 = 0;
if ( (unsigned int)cocos2d::CCArray::count(a2) )
{
while ( 1 )
{
v11 = cocos2d::CCArray::objectAtIndex(a2, v10);
v12 = (_BYTE *)v11;
if ( !v7 )
{
v37 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 192LL))(v11);
cocos2d::CCPoint::operator-(&v45, v37, a3, v38);
v39 = sqrtf((float)(*((float *)&v45 + 1) * *((float *)&v45 + 1)) + (float)(*(float *)&v45 * *(float *)&v45));
v40 = atan2f(*((float *)&v45 + 1), *(float *)&v45) - (float)(a5 * 0.017453);
v41 = cosf(v40);
v42 = sinf(v40);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v47, v41, v42);
cocos2d::CCPoint::operator*(v47, v39);
cocos2d::CCPoint::operator+(&v46, a3);
v43 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v12 + 192LL))(v12);
cocos2d::CCPoint::operator-(&v48, &v46, v43, v44);
EditorUI::moveObject(a1, (__int64)v12);
}
v13 = (*(float (__fastcall **)(_BYTE *))(*(_QWORD *)v12 + 384LL))(v12);
v14 = (*(float (__fastcall **)(_BYTE *))(*(_QWORD *)v12 + 400LL))(v12);
v15 = *(_QWORD *)v12;
if ( v13 != v14 )
break;
v30 = *(void (__fastcall **)(_BYTE *, float))(v15 + 360);
v31 = (*(float (__fastcall **)(_BYTE *))(v15 + 368))(v12);
v30(v12, a5 + v31);
v32 = (*(float (__fastcall **)(_BYTE *))(*(_QWORD *)v12 + 368LL))(v12);
v33 = *(_QWORD *)v12;
v34 = v12;
if ( v32 >= 360.0 )
goto LABEL_19;
if ( (*(float (__fastcall **)(_BYTE *))(v33 + 368))(v12) <= -360.0 )
{
v33 = *(_QWORD *)v12;
v34 = v12;
LABEL_19:
v28 = *(void (__fastcall **)(_BYTE *, float))(v33 + 360);
v29 = (*(float (__fastcall **)(_BYTE *))(v33 + 368))(v34);
LABEL_15:
++v10;
v28(v12, (float)((int)v29 % 360));
goto LABEL_11;
}
LABEL_10:
++v10;
LABEL_11:
if ( v10 >= (unsigned int)cocos2d::CCArray::count(a2) )
return _stack_chk_guard;
}
v16 = *(void (__fastcall **)(_BYTE *, float))(v15 + 376);
v17 = (*(float (__fastcall **)(_BYTE *))(v15 + 384))(v12);
v16(v12, a5 + v17);
v18 = *(void (__fastcall **)(_BYTE *, float))(*(_QWORD *)v12 + 392LL);
v19 = (*(float (__fastcall **)(_BYTE *))(*(_QWORD *)v12 + 400LL))(v12);
v18(v12, a5 + v19);
v20 = *(_QWORD *)v12;
v12[840] = 1;
v21 = (*(float (__fastcall **)(_BYTE *))(v20 + 384))(v12);
v22 = *(_QWORD *)v12;
v23 = v12;
if ( v21 < 360.0 )
{
if ( (*(float (__fastcall **)(_BYTE *))(v22 + 384))(v12) > -360.0 )
goto LABEL_8;
v22 = *(_QWORD *)v12;
v23 = v12;
}
v35 = *(void (__fastcall **)(_BYTE *, float))(v22 + 376);
v36 = (*(float (__fastcall **)(_BYTE *))(v22 + 384))(v23);
v35(v12, (float)((int)v36 % 360));
LABEL_8:
v24 = (*(float (__fastcall **)(_BYTE *))(*(_QWORD *)v12 + 400LL))(v12);
v25 = *(_QWORD *)v12;
v26 = v12;
if ( v24 >= 360.0 )
goto LABEL_14;
if ( (*(float (__fastcall **)(_BYTE *))(v25 + 400))(v12) <= -360.0 )
{
v25 = *(_QWORD *)v12;
v26 = v12;
LABEL_14:
v28 = *(void (__fastcall **)(_BYTE *, float))(v25 + 392);
v29 = (*(float (__fastcall **)(_BYTE *))(v25 + 400))(v26);
goto LABEL_15;
}
goto LABEL_10;
}
return _stack_chk_guard;
}