//
// GJBaseGameLayer::tryGetGroupParent from 0x590b60 to 0x590ba6 (70 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:05 +0000
//
int __fastcall GJBaseGameLayer::tryGetGroupParent(cocos2d::CCDictionary **this, int a2)
{
int GroupParent; // r4
cocos2d::CCObject *Group; // r0
_DWORD *v6; // r2
int v7; // r3
int *v8; // r2
int *v9; // r3
int v10; // r1
int v11; // t1
GroupParent = GJBaseGameLayer::getGroupParent(this, a2);
if ( !GroupParent )
{
Group = GJBaseGameLayer::getGroup((GJBaseGameLayer *)this, a2);
if ( Group )
{
v6 = *((_DWORD **)Group + 13);
if ( *v6 )
{
v7 = *v6 + 0x40000000;
v8 = (int *)v6[3];
v9 = &v8[v7 - 1];
while ( v8 <= v9 )
{
v11 = *v8++;
v10 = v11;
if ( !v11 || *(_BYTE *)(v10 + 1006) )
return v10;
}
}
}
}
return GroupParent;
}