//
// GJBaseGameLayer::remapGroupParent from 0x10011adc0 to 0x10011af8c (460 bytes)
//
// 1 xrefs:
// > EditorUI::replaceGroupID @ 0x1000161cf
//
// 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
//
void __fastcall GJBaseGameLayer::remapGroupParent(__int64 a1, __int64 a2, int a3, int a4)
{
__int64 v4; // rbx
__int64 v7; // rax
__int64 v8; // r13
__int64 v9; // rax
__int64 v10; // r13
int v11; // r14d
char v12; // bl
int v13; // eax
bool v14; // zf
_DWORD *v15; // r14
__int64 v16; // rdi
__int64 v17; // r14
if ( a3 != a4 )
{
v4 = a2;
if ( a2 )
{
if ( a3 > 0 && a4 > 0 )
{
v7 = cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 3688));
if ( v7 )
{
v8 = v7;
if ( (unsigned __int8)sub_1007FF080(v7, a2) )
{
sub_1007FF140(v8, a2, 1);
if ( !(unsigned int)sub_1007FEF90(v8) )
cocos2d::CCDictionary::removeObjectForKey_1(*(_QWORD *)(a1 + 3688), (unsigned int)a3);
v9 = cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 3696));
if ( v9 )
{
v10 = v9;
v11 = sub_1007FEF90(v9);
if ( v11 - 1 < 0 )
goto LABEL_16;
v12 = 0;
do
{
while ( 1 )
{
v13 = *(_DWORD *)(sub_1007FEFE0(v10, (unsigned int)--v11) + 56);
if ( v13 == a3 )
break;
v12 |= v13 == a4;
if ( v11 <= 0 )
goto LABEL_15;
}
sub_1007FF150(v10, (unsigned int)v11, 1);
}
while ( v11 > 0 );
LABEL_15:
v14 = (v12 & 1) == 0;
v4 = a2;
if ( v14 )
{
LABEL_16:
v15 = operator new(0x40u);
cocos2d::CCObject::CCObject(v15);
*(_QWORD *)v15 = off_100ABB920;
v15[14] = a4;
cocos2d::CCObject::autorelease(v15);
sub_1007FEBF0(v10, v15);
}
}
v16 = *(_QWORD *)(a1 + 3688);
v17 = cocos2d::CCDictionary::objectForKey_1(v16);
if ( !v17 )
{
v17 = sub_1007FE900(v16);
cocos2d::CCDictionary::setObject_1(*(_QWORD *)(a1 + 3688), v17, (unsigned int)a4);
}
if ( !(unsigned __int8)sub_1007FF080(v17, v4) )
sub_1007FEBF0(v17, v4);
}
}
}
}
}
}