//
// LevelEditorLayer::tryUpdateSpeedObject from 0x1403f5820 to 0x1403f59b8 (408 bytes)
//
// 4 xrefs:
// > LevelEditorLayer::addSpecial @ 0x1403f4f0b
// > LevelEditorLayer::removeSpecial @ 0x1403f54a3
// > SetGroupIDLayer::onToggleGuide @ 0x140590b96
// > ??> @ 0x140925514
//
// This function is hookable on this platform (idp: pc, 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 11:31:49 +0000
//
__int64 __fastcall LevelEditorLayer::tryUpdateSpeedObject(__int64 a1, __int64 a2, char a3)
{
bool v5; // bp
int v6; // ecx
bool v7; // zf
unsigned __int8 v8; // bl
__int64 v9; // rsi
cocos2d::CCArray *v10; // rcx
__int64 v11; // rsi
bool v12; // al
v5 = !*(_BYTE *)(a2 + 1784) || a3;
v6 = *(_DWORD *)(a2 + 1036);
if ( v6 > 1934 )
{
if ( v6 == 1935 || v6 == 2900 || v6 == 2902 || v6 == 3022 )
goto LABEL_21;
v7 = v6 == 3027;
goto LABEL_19;
}
if ( v6 == 1934 )
{
LABEL_21:
v8 = 1;
goto LABEL_22;
}
if ( v6 > 203 )
{
if ( v6 != 1334 )
{
v7 = v6 == 1917;
goto LABEL_19;
}
goto LABEL_21;
}
if ( v6 == 203 || v6 == 200 || v6 == 201 )
goto LABEL_21;
v7 = v6 == 202;
LABEL_19:
if ( v7 )
goto LABEL_21;
v8 = 0;
LABEL_22:
if ( v6 == 660 || v6 == 13 || v6 == 47 || v6 == 111 || v6 == 1331 || v6 == 1933 )
{
v9 = *(_QWORD *)(a1 + 14944);
v10 = *(cocos2d::CCArray **)(v9 + 584);
if ( v5 )
{
cocos2d::CCArray::removeObject(v10, (struct cocos2d::CCObject *)a2, 1);
}
else if ( !cocos2d::CCArray::containsObject(v10, (struct cocos2d::CCObject *)a2) )
{
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v9 + 584), (struct cocos2d::CCObject *)a2);
}
}
if ( !v8 )
{
if ( !(*(unsigned __int8 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1528LL))(a2) || !*(_BYTE *)(a2 + 1796) )
return v8;
v8 = 1;
}
v11 = *(_QWORD *)(a1 + 14944);
v12 = cocos2d::CCArray::containsObject(*(cocos2d::CCArray **)(v11 + 592), (struct cocos2d::CCObject *)a2);
if ( v5 )
{
if ( v12 )
{
cocos2d::CCArray::removeObject(*(cocos2d::CCArray **)(v11 + 592), (struct cocos2d::CCObject *)a2, 1);
*(_BYTE *)(v11 + 633) = 1;
}
}
else if ( !v12 )
{
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v11 + 592), (struct cocos2d::CCObject *)a2);
*(_BYTE *)(v11 + 633) = 1;
EffectGameObject::updateSpeedModType(a2);
}
return v8;
}