//
// LevelEditorLayer::validGroup from 0x1403f4350 to 0x1403f440c (188 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::objectsInRect @ 0x1403f20c5
// > ??> @ 0x140925490
//
// 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
//
bool __fastcall LevelEditorLayer::validGroup(__int64 a1, __int64 a2, char a3)
{
int v3; // r9d
int v4; // eax
int v6; // ecx
bool result; // al
int v8; // r8d
unsigned __int64 v9; // rdx
__int64 v10; // r9
int v11; // eax
int v12; // eax
v3 = *(__int16 *)(a2 + 1212);
v4 = *(__int16 *)(a1 + 14866);
if ( !*(_WORD *)(a2 + 1212) )
v3 = -1;
if ( (_WORD)v4 == 0xFFFF || (v6 = *(__int16 *)(a2 + 1210), v4 == v6) || v4 == v3 )
{
result = 1;
v6 = *(__int16 *)(a2 + 1210);
}
else
{
result = 0;
}
if ( a3 )
{
v8 = 9999;
v9 = 9999;
if ( v6 < 9999 )
v9 = (unsigned int)v6;
if ( (v9 & 0x80000000) != 0LL )
v9 = 0;
if ( v3 < 9999 )
v8 = v3;
if ( v8 < -1 )
v8 = -1;
result = result
&& (v10 = *(_QWORD *)(a1 + 15208), v11 = *(_DWORD *)(v10 + 4 * (v9 >> 5)), !_bittest(&v11, v9 & 0x1F))
&& (v8 == -1 || (v12 = *(_DWORD *)(v10 + 4 * ((unsigned __int64)v8 >> 5)), !_bittest(&v12, v8 & 0x1F)));
}
return result;
}