//
// EditorUI::transformObjects from 0x70fb6c to 0x70fe1a (686 bytes)
//
// 4 xrefs:
// > GJTransformControl::applyFreeRotation @ 0x6eee9c
// > EditorUI::transformObjectsActive @ 0x70fe90
// > EditorUI::transformObjectsReset @ 0x70ffde
// > EditorUI::updateTransformControl @ 0x710204
//
// 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:57:43 +0000
//
int __fastcall EditorUI::transformObjects(
int a1,
cocos2d::CCArray *a2,
cocos2d::CCPoint *a3,
int a4,
int a5,
int a6,
int a7,
int a8,
int a9)
{
unsigned int v13; // r8
int v14; // r11
const cocos2d::CCPoint *v15; // r0
int v16; // r0
float *v17; // r5
float *v18; // r0
float *v19; // r7
float v20; // s17
float v21; // s16
float v22; // r0
float v23; // s19
float v24; // s18
float v25; // r7
float v26; // r6
float v27; // s18
float v28; // s16
int v29; // r0
void (__fastcall *v31)(int, unsigned int *); // [sp+0h] [bp-4Ch]
int v32; // [sp+Ch] [bp-40h]
_BYTE v33[8]; // [sp+14h] [bp-38h] BYREF
_BYTE v34[8]; // [sp+1Ch] [bp-30h] BYREF
_BYTE v35[8]; // [sp+24h] [bp-28h] BYREF
unsigned int v36[6]; // [sp+2Ch] [bp-20h] BYREF
if ( cocos2d::CCPoint::equals(a3, (const cocos2d::CCPoint *)&unk_D2DBE0) )
{
EditorUI::getGroupCenter((EditorUI *)v36, (cocos2d::CCArray *)a1, a2, 0);
cocos2d::CCPoint::operator=(a3, v36);
}
v13 = 0;
v14 = (*(int (__fastcall **)(_DWORD))(**(_DWORD **)(*(_DWORD *)(a1 + 944) + 2436) + 84))(*(_DWORD *)(*(_DWORD *)(a1 + 944) + 2436));
v15 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(*(_DWORD *)(a1 + 944) + 2436) + 96))(*(_DWORD *)(*(_DWORD *)(a1 + 944) + 2436));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, v15);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(*(_DWORD *)(a1 + 944) + 2436) + 80))(
*(_DWORD *)(*(_DWORD *)(a1 + 944) + 2436),
1065353216);
(*(void (__fastcall **)(_DWORD, void *))(**(_DWORD **)(*(_DWORD *)(a1 + 944) + 2436) + 92))(
*(_DWORD *)(*(_DWORD *)(a1 + 944) + 2436),
&unk_D2DBE0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCPoint *))(**(_DWORD **)(a1 + 600) + 92))(*(_DWORD *)(a1 + 600), a3);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 600) + 64))(*(_DWORD *)(a1 + 600), a4);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 600) + 72))(*(_DWORD *)(a1 + 600), a5);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 600) + 188))(*(_DWORD *)(a1 + 600), a6);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 600) + 196))(*(_DWORD *)(a1 + 600), a7);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 600) + 132))(*(_DWORD *)(a1 + 600), a8);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 600) + 140))(*(_DWORD *)(a1 + 600), a9);
(*(void (__fastcall **)(unsigned int *))(**(_DWORD **)(a1 + 600) + 412))(v36);
while ( v13 < cocos2d::CCArray::count(a2) )
{
v16 = cocos2d::CCArray::objectAtIndex(a2, v13++);
v17 = (float *)v16;
v36[0] = *(_DWORD *)(v16 + 780);
v18 = (float *)std::unordered_map::operator[](a1 + 344, v36);
v32 = *(_DWORD *)(a1 + 604);
v31 = *(void (__fastcall **)(int, unsigned int *))(*(_DWORD *)v32 + 92);
v19 = v18;
cocos2d::CCPoint::operator-(v36, v18, a3);
v31(v32, v36);
(*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(a1 + 604) + 64))(*(_DWORD *)(a1 + 604), v19[2] * v17[283]);
(*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(a1 + 604) + 72))(*(_DWORD *)(a1 + 604), v19[3] * v17[284]);
(*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(a1 + 604) + 188))(
*(_DWORD *)(a1 + 604),
*((_DWORD *)v19 + 4));
(*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(a1 + 604) + 196))(
*(_DWORD *)(a1 + 604),
*((_DWORD *)v19 + 5));
(*(void (__fastcall **)(unsigned int *))(**(_DWORD **)(a1 + 604) + 412))(v36);
v20 = *(float *)&v36[1];
v21 = *(float *)v36;
v22 = sqrtf((float)(v20 * v20) + (float)(v21 * v21));
v23 = *(float *)&v36[3];
v24 = *(float *)&v36[2];
v25 = v22;
v26 = sqrtf((float)(v23 * v23) + (float)(v24 * v24));
v27 = atan2f(v23, v24);
v28 = atan2f(v20, v21);
GameObject::updateCustomScaleX((GameObject *)v17, v25);
GameObject::updateCustomScaleY((GameObject *)v17, v26);
(*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v17 + 188))(v17, -(float)((float)(v27 * 57.296) - 90.0));
(*(void (__fastcall **)(float *, _DWORD))(*(_DWORD *)v17 + 196))(v17, -(float)(57.296 * v28));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v34, *(float *)&v36[4], *(float *)&v36[5]);
v29 = (*(int (__fastcall **)(float *))(*(_DWORD *)v17 + 96))(v17);
cocos2d::CCPoint::operator-(v35, v34, v29);
EditorUI::moveObject(a1, (GameObject *)v17, (int)v35);
}
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(*(_DWORD *)(a1 + 944) + 2436) + 80))(
*(_DWORD *)(*(_DWORD *)(a1 + 944) + 2436),
v14);
return (*(int (__fastcall **)(_DWORD, _BYTE *))(**(_DWORD **)(*(_DWORD *)(a1 + 944) + 2436) + 92))(
*(_DWORD *)(*(_DWORD *)(a1 + 944) + 2436),
v33);
}