//
// GJBaseGameLayer::triggerAdvancedFollowEditCommand from 0x9c6af8 to 0x9c6d84 (652 bytes)
//
// 2 xrefs:
// > EffectGameObject::triggerObject @ 0x8986b8
// > ??> @ 0xe26f0
//
// 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 12:58:33 +0000
//
__int64 __fastcall GJBaseGameLayer::triggerAdvancedFollowEditCommand(
GJBaseGameLayer *this,
AdvancedFollowEditObject *a2)
{
int v3; // w1
int v6; // w19
__int64 v7; // x0
__int64 v8; // x2
int i; // w3
int *v10; // x25
int *v11; // x24
int v12; // w26
_QWORD *v13; // x28
int v14; // w22
int v15; // w21
unsigned int v16; // w19
int v17; // w21
cocos2d::CCObject *Group; // x2
cocos2d::CCObject *v19; // x0
cocos2d::CCObject *v20; // x0
unsigned int *v21; // x1
__int64 *v22; // x3
__int64 *j; // x5
__int64 v24; // x2
__int64 v25; // x4
__int64 k; // x0
int SpecialKey; // [xsp+74h] [xbp+74h] BYREF
v3 = *((_DWORD *)a2 + 257);
if ( v3 == 3660 )
{
if ( *((_BYTE *)a2 + 1676) )
{
v10 = *((int **)this + 207);
v11 = *((int **)this + 206);
v12 = *((_DWORD *)a2 + 366);
if ( v11 != v10 )
{
v13 = (_QWORD *)((char *)this + 3840);
do
{
if ( v11[4] == v12 )
{
SpecialKey = GJBaseGameLayer::getSpecialKey(
this,
v11[2],
*(_BYTE *)(*(_QWORD *)v11 + 1832LL),
*(_BYTE *)(*(_QWORD *)v11 + 1833LL));
if ( std::__hash_table>,std::__unordered_map_hasher>,std::hash,true>,std::__unordered_map_equal>,std::equal_to,true>,std::allocator>>>::find(
v13,
&SpecialKey) )
{
v14 = *(_DWORD *)std::unordered_map>::operator[]((__int64)v13, &SpecialKey);
if ( v14 <= 0 )
v15 = 1;
else
v15 = 2;
}
else
{
v14 = 0;
v15 = 1;
}
v16 = v14 - 1;
v17 = v15 + v14 - 1;
do
{
if ( v14 > 0 )
Group = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 479), v16);
else
Group = GJBaseGameLayer::getGroup(this, v11[2]);
++v16;
GJBaseGameLayer::modifyGroupPhysics(this, (__int64)a2, (__int64)Group);
}
while ( v16 != v17 );
}
v11 += 8;
}
while ( v10 != v11 );
}
}
else
{
v19 = GJBaseGameLayer::getGroup(this, *((_DWORD *)a2 + 366));
GJBaseGameLayer::modifyGroupPhysics(this, (__int64)a2, (__int64)v19);
}
}
else if ( v3 == 3661 )
{
v6 = *((_DWORD *)a2 + 367);
if ( *((_BYTE *)a2 + 1684) )
{
v6 = -1;
}
else if ( *((_BYTE *)a2 + 1685) )
{
v6 = -2;
}
else if ( *((_BYTE *)a2 + 1686) )
{
v6 = -3;
}
else if ( !v6 )
{
return _stack_chk_guard;
}
if ( *((_BYTE *)a2 + 1676) )
{
v7 = *((_QWORD *)this + 206);
v8 = *((_QWORD *)this + 207);
for ( i = *((_DWORD *)a2 + 366); v8 != v7; v7 += 32 )
{
if ( *(_DWORD *)(v7 + 16) == i )
*(_DWORD *)(v7 + 12) = v6;
}
}
else
{
v20 = GJBaseGameLayer::getGroup(this, *((_DWORD *)a2 + 366));
if ( v20 )
{
v21 = *((unsigned int **)v20 + 7);
if ( *v21 )
{
v22 = *((__int64 **)v21 + 2);
for ( j = &v22[*v21 - 1]; j >= v22; ++v22 )
{
v24 = *v22;
if ( !*v22 )
break;
if ( *(_DWORD *)(v24 + 1028) == 3016 )
{
v25 = *((_QWORD *)this + 207);
for ( k = *((_QWORD *)this + 206); v25 != k; k += 32 )
{
if ( v24 == *(_QWORD *)k )
*(_DWORD *)(k + 12) = v6;
}
}
}
}
}
}
}
return _stack_chk_guard;
}