//
// EditorUI::activateScaleControl from 0xc02770 to 0xc0299c (556 bytes)
//
// 5 xrefs:
// > EditorUI::handleEditorAction @ 0xbd7dcc
// > ??> @ 0x5d088
// > EditorUI::createMoveMenu @ 0xbe1630
// > EditorUI::createMoveMenu @ 0xbe16f0
// > ??> @ 0x15422a8
//
// 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:49 +0000
//
__int64 __fastcall EditorUI::activateScaleControl(cocos2d::CCArray **this, cocos2d::CCObject *a2)
{
EditorSFXManager *v4; // x0
EditorSFXManager *v5; // x0
int v6; // w23
int v7; // w22
unsigned int v9; // w0
__int64 v10; // x0
__n128 v11; // q0
__int64 v12; // x24
__int64 v13; // x21
void (__fastcall *v14)(__int64, __int64 *); // x24
__int64 v15; // x21
void (__fastcall *v16)(__int64, float); // x22
float v17; // s0
_BYTE v18[8]; // [xsp+58h] [xbp+58h] BYREF
__int64 v19; // [xsp+60h] [xbp+60h] BYREF
v4 = (EditorSFXManager *)cocos2d::CCArray::count(*(this + 112));
if ( (_DWORD)v4 || (v4 = *(this + 187)) != nullptr )
{
v5 = (EditorSFXManager *)EditorSFXManager::sharedState(v4);
EditorSFXManager::playAction(v5, 189);
EditorUI::deactivateTransformControl((EditorUI *)this);
if ( !(*(unsigned __int8 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 98) + 352LL))(*(this + 98))
|| (v6 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2),
v7 = *((_DWORD *)*(this + 98) + 148),
EditorUI::deactivateScaleControl((EditorUI *)this),
v6 != v7) )
{
if ( !(*(unsigned __int8 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 98) + 352LL))(*(this + 98))
|| *((_BYTE *)this + 776) )
{
v9 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);
EditorUI::updateEditButtonColor((__int64)this, (const char *)v9, 10921638);
*((_BYTE *)this + 776) = 0;
if ( (unsigned int)cocos2d::CCArray::count(*(this + 112)) )
{
EditorUI::getGroupCenter((cocos2d::CCPoint *)&v19, *(this + 112), 0);
v11 = cocos2d::CCPoint::operator=(this + 96, &v19);
}
else
{
v10 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 187) + 192LL))(*(this + 187));
v11 = cocos2d::CCPoint::operator=(this + 96, v10);
}
v12 = (__int64)*(this + 98);
*(_DWORD *)(v12 + 592) = (*(__int64 (__fastcall **)(cocos2d::CCObject *, long double))(*(_QWORD *)a2 + 64LL))(
a2,
*(long double *)&v11);
v13 = (__int64)*(this + 98);
v14 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v13 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, 0.0, 40.0);
cocos2d::CCPoint::operator+(&v19, this + 96);
v14(v13, &v19);
v15 = (__int64)*(this + 98);
v16 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 160LL);
v17 = (*(float (__fastcall **)(_QWORD))(**((_QWORD **)*(this + 180) + 490) + 168LL))(*((_QWORD *)*(this + 180)
+ 490));
v16(v15, 1.0 / v17);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 98) + 344LL))(*(this + 98), 1);
(*((void (__fastcall **)(cocos2d::CCArray **))*this + 169))(this);
}
}
}
return _stack_chk_guard;
}