//
// sub_100561B80 from 0x100561b80 to 0x100561c58 (216 bytes)
//
// 2 xrefs:
// > sub_100561C60 @ 0x100561c65
// > sub_100561C70 @ 0x100561c79
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_100561B80(__int64 a1)
{
void *v2; // rdi
*(_QWORD *)a1 = off_100962810;
if ( (*(_BYTE *)(a1 + 496) & 1) != 0 )
{
operator delete(*(void **)(a1 + 512));
if ( (*(_BYTE *)(a1 + 472) & 1) == 0 )
{
LABEL_3:
if ( (*(_BYTE *)(a1 + 448) & 1) == 0 )
goto LABEL_4;
goto LABEL_11;
}
}
else if ( (*(_BYTE *)(a1 + 472) & 1) == 0 )
{
goto LABEL_3;
}
operator delete(*(void **)(a1 + 488));
if ( (*(_BYTE *)(a1 + 448) & 1) == 0 )
{
LABEL_4:
if ( (*(_BYTE *)(a1 + 424) & 1) == 0 )
goto LABEL_5;
goto LABEL_12;
}
LABEL_11:
operator delete(*(void **)(a1 + 464));
if ( (*(_BYTE *)(a1 + 424) & 1) == 0 )
{
LABEL_5:
if ( (*(_BYTE *)(a1 + 400) & 1) == 0 )
goto LABEL_6;
LABEL_13:
operator delete(*(void **)(a1 + 416));
v2 = *(void **)(a1 + 320);
if ( !v2 )
return cocos2d::CCNode::dCCNode(a1);
goto LABEL_7;
}
LABEL_12:
operator delete(*(void **)(a1 + 440));
if ( (*(_BYTE *)(a1 + 400) & 1) != 0 )
goto LABEL_13;
LABEL_6:
v2 = *(void **)(a1 + 320);
if ( v2 )
{
LABEL_7:
*(_QWORD *)(a1 + 328) = v2;
operator delete(v2);
}
return cocos2d::CCNode::dCCNode(a1);
}