//
// EditorUI::moveObjectCall from 0xc024a8 to 0xc0273c (660 bytes)
//
// 4 xrefs:
// > EditorUI::handleEditorAction @ 0xbd73cc
// > EditorUI::handleEditorAction @ 0xbd800c
// > EditorUI::moveObjectCall @ 0xc0276c
// > ??> @ 0xafcd8
//
// 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::moveObjectCall(__int64 a1, int a2)
{
cocos2d::CCDirector *v4; // x0
__int64 v5; // x0
__int64 v6; // x0
EditorSFXManager *v7; // x0
EditorSFXManager *v8; // x0
UndoObject *v9; // x0
__int64 v10; // x22
unsigned int v12; // w20
unsigned int v13; // w1
__int64 v14; // x23
__int64 v15; // x0
__int64 v16; // x22
void (__fastcall *v17)(__int64, __int64 *); // x23
__int64 v18; // x0
EditorSFXManager *v19; // x0
EditorSFXManager *v20; // x0
EditorSFXManager *v21; // x0
EditorSFXManager *v22; // x0
EditorSFXManager *v23; // x0
_BYTE v24[8]; // [xsp+58h] [xbp+58h] BYREF
__int64 v25; // [xsp+60h] [xbp+60h] BYREF
v4 = *(cocos2d::CCDirector **)(a1 + 1496);
if ( v4 || (v4 = (cocos2d::CCDirector *)cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 896)), (_DWORD)v4) )
{
v5 = cocos2d::CCDirector::sharedDirector(v4);
v6 = *(unsigned __int8 *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 192LL))(v5) + 133);
if ( !(_DWORD)v6 )
{
v15 = *(_QWORD *)(a1 + 1440) + 14704LL;
*(_DWORD *)(v15 + 12) = *(_DWORD *)(*(_QWORD *)(a1 + 1440) + 14716LL) + 1;
v6 = EditorBuildStats::noteAction(v15);
}
v7 = (EditorSFXManager *)EditorSFXManager::sharedState((EditorSFXManager *)v6);
EditorSFXManager::playAction(v7, 150);
v8 = (EditorSFXManager *)(unsigned int)(a2 - 1);
switch ( a2 )
{
case 1:
case 2:
case 3:
case 4:
case 13:
case 14:
case 15:
case 16:
case 25:
case 26:
case 27:
case 28:
v22 = (EditorSFXManager *)EditorSFXManager::sharedState(v8);
EditorSFXManager::playAction(v22, 151);
break;
case 5:
case 6:
case 7:
case 8:
v21 = (EditorSFXManager *)EditorSFXManager::sharedState(v8);
EditorSFXManager::playAction(v21, 152);
break;
case 9:
case 10:
case 11:
case 12:
v20 = (EditorSFXManager *)EditorSFXManager::sharedState(v8);
EditorSFXManager::playAction(v20, 153);
break;
case 17:
case 18:
case 19:
case 20:
case 21:
case 22:
case 23:
case 24:
case 29:
case 30:
case 31:
case 32:
v19 = (EditorSFXManager *)EditorSFXManager::sharedState(v8);
EditorSFXManager::playAction(v19, 155);
break;
case 33:
case 34:
case 35:
case 36:
v23 = (EditorSFXManager *)EditorSFXManager::sharedState(v8);
EditorSFXManager::playAction(v23, 276);
break;
default:
break;
}
EditorUI::moveForCommand(a1, a2, (cocos2d::CCPoint *)v24);
if ( (unsigned int)cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 896)) )
{
v12 = 0;
EditorUI::createUndoObject(a1, 5, 0);
while ( v12 < (unsigned int)cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 896)) )
{
v13 = v12++;
v14 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 896), v13);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, (const cocos2d::CCPoint *)v24);
EditorUI::moveObject(a1, v14);
}
}
else
{
v9 = (UndoObject *)UndoObject::create(*(GameObjectCopy **)(a1 + 1496), 5);
LevelEditorLayer::addToUndoList(*(cocos2d::CCArray ***)(a1 + 1440), v9, 0);
v10 = *(_QWORD *)(a1 + 1496);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, (const cocos2d::CCPoint *)v24);
EditorUI::moveObject(a1, v10);
}
if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 792) + 352LL))(*(_QWORD *)(a1 + 792)) )
{
v16 = *(_QWORD *)(a1 + 792);
v17 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v16 + 184LL);
v18 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v16 + 192LL))(v16);
cocos2d::CCPoint::operator+(&v25, v18);
v17(v16, &v25);
GJTransformControl::refreshControl(*(GJTransformControl **)(a1 + 792));
}
if ( (*(unsigned __int8 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 760) + 352LL))(*(_QWORD *)(a1 + 760)) )
{
*(_BYTE *)(a1 + 776) = 1;
EditorUI::activateRotationControl((GJRotationControl **)a1, nullptr);
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 1352LL))(a1);
EditorUI::updateButtons((EditorUI *)a1);
}
return _stack_chk_guard;
}