//
// LevelEditorLayer::validGroup from 0x10035a68c to 0x10035a740 (180 bytes)
//
// 5 xrefs:
// > LevelEditorLayer::objectsInRect @ 0x10035ab74
// > LevelEditorLayer::objectAtPosition @ 0x10035adfc
// > LevelEditorLayer::objectsAtPosition @ 0x10035b428
// > EditorUI::selectAll @ 0x1003ee110
// > EditorUI::selectAllWithDirection @ 0x1003ee2f4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall LevelEditorLayer::validGroup(LevelEditorLayer *a1, GameObject *a2, bool a3)
{
int m_editorLayer; // w10
int v4; // w9
int m_currentLayer; // w11
std::__vector_base::pointer begin; // x8
int v9; // w11
int v10; // w8
unsigned __int64 v11; // x10
m_editorLayer = (unsigned __int16)a2->m_editorLayer;
if ( a2->m_editorLayer2 )
LOWORD(v4) = a2->m_editorLayer2;
else
LOWORD(v4) = -1;
m_currentLayer = (unsigned __int16)a1->m_currentLayer;
LODWORD(begin) = m_currentLayer == 0xFFFF || m_currentLayer == m_editorLayer || m_currentLayer == (unsigned __int16)v4;
if ( a3 )
{
v9 = (__int16)v4;
if ( (__int16)v4 >= 9999 )
v4 = 9999;
else
v4 = (__int16)v4;
if ( v4 < 0 )
v4 = -1;
if ( (_DWORD)begin )
{
v10 = (__int16)m_editorLayer;
if ( (__int16)m_editorLayer >= 9999 )
v10 = 9999;
v11 = v10 & (unsigned int)~(v10 >> 31);
begin = a1->m_lockedLayers.__begin_;
LOBYTE(begin) = ((*(_QWORD *)&begin[(v11 >> 3) & 0x7F8] >> v11) & 1) == 0
&& (v9 < 0 || ((*(_QWORD *)&begin[((unsigned int)v4 >> 3) & 0x1FF8LL] >> v4) & 1LL) == 0);
}
}
return (char)begin;
}