//
// GJBaseGameLayer::groupStickyObjects from 0x10011c210 to 0x10011c325 (277 bytes)
//
// 2 xrefs:
// > EditorUI::onGroupSticky @ 0x100008bf0
// > GJBaseGameLayer::assignNewStickyGroups @ 0x10011c4df
//
// 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 12:24:36 +0000
//
__int64 __fastcall GJBaseGameLayer::groupStickyObjects(__int64 a1, __int64 a2)
{
unsigned int v2; // eax
__int64 v3; // r15
unsigned int v4; // r13d
unsigned int v5; // r12d
signed int v6; // eax
unsigned int v7; // r12d
__int64 v8; // rax
int v9; // ecx
v2 = sub_1007FEF90(a2);
v3 = sub_1007FEC20(v2);
if ( !(unsigned int)sub_1007FEF90(a2) )
goto LABEL_9;
v4 = 0;
v5 = 0;
do
{
v6 = *(_DWORD *)(sub_1007FEFE0(a2, v5) + 872);
if ( v4 )
{
if ( v6 > 0 && v6 != v4 )
{
GJBaseGameLayer::ungroupStickyObjects(a1, a2);
goto LABEL_9;
}
}
else
{
v4 = v6;
}
++v5;
}
while ( v5 < (unsigned int)sub_1007FEF90(a2) );
if ( !v4 )
{
LABEL_9:
v4 = *(_DWORD *)(a1 + 3888) + 1;
*(_DWORD *)(a1 + 3888) = v4;
}
if ( (unsigned int)sub_1007FEF90(a2) )
{
v7 = 0;
do
{
v8 = sub_1007FEFE0(a2, v7);
v9 = *(_DWORD *)(v8 + 1028);
if ( v9 != 747 && v9 != 749 )
{
*(_DWORD *)(v8 + 872) = v4;
sub_1007FEBF0(v3, v8);
}
++v7;
}
while ( v7 < (unsigned int)sub_1007FEF90(a2) );
}
return cocos2d::CCDictionary::setObject_1(*(_QWORD *)(a1 + 3880), v3, v4);
}