//
// SetGroupIDLayer::onAddGroupParent from 0x1002ffbd0 to 0x1002ffc6a (154 bytes)
//
// 1 xrefs:
// > SetGroupIDLayer::init @ 0x1002fdb58
//
// 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:28:32 +0000
//
__int64 __fastcall SetGroupIDLayer::onAddGroupParent(__int64 a1)
{
__int64 result; // rax
__int64 v3; // rdi
__int64 v4; // rsi
__int64 v5; // rdx
int v6; // eax
double v7; // xmm0_8
__int64 v8; // rax
__int64 v9; // rax
v3 = *(_QWORD *)(a1 + 672);
if ( v3 )
{
v4 = *(unsigned int *)(a1 + 764);
if ( !(unsigned __int8)GameObject::belongsToGroup(v3, v4) )
{
v3 = *(_QWORD *)(a1 + 672);
v4 = *(unsigned int *)(a1 + 764);
v6 = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 1600LL))(v3, v4);
if ( !v6 )
return SetGroupIDLayer::updateGroupIDButtons(a1);
if ( v6 == 1 )
{
*(_QWORD *)&v7 = GameManager::sharedState(v3, v4, v5).u64[0];
v3 = *(_QWORD *)(v8 + 552);
v4 = *(_QWORD *)(a1 + 672);
(*(void (__fastcall **)(__int64, __int64, _QWORD, _QWORD, double))(*(_QWORD *)v3 + 1352LL))(
v3,
v4,
*(unsigned int *)(a1 + 764),
0,
v7);
}
}
GameManager::sharedState(v3, v4, v5);
GJBaseGameLayer::promoteGroupParent(*(_QWORD *)(v9 + 552), *(_QWORD *)(a1 + 672), *(_DWORD *)(a1 + 764));
return SetGroupIDLayer::updateGroupIDButtons(a1);
}
return result;
}