//
// sub_100416590 from 0x100416590 to 0x1004165fe (110 bytes)
//
// 4 xrefs:
// > sub_10040EAF0 @ 0x10040eb97
// > GJSmartTemplate::resetScannedPrefabs @ 0x1004106e6
// > sub_100416590 @ 0x1004165a5
// > sub_100416590 @ 0x1004165b1
//
// 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:30:11 +0000
//
void __fastcall sub_100416590(__int64 a1, __int64 a2)
{
if ( a2 )
{
sub_100416590(a1, *(_QWORD *)a2);
sub_100416590(a1, *(_QWORD *)(a2 + 8));
if ( (*(_BYTE *)(a2 + 88) & 1) != 0 )
{
operator delete(*(void **)(a2 + 104));
if ( (*(_BYTE *)(a2 + 64) & 1) == 0 )
{
LABEL_4:
if ( (*(_BYTE *)(a2 + 32) & 1) == 0 )
{
LABEL_6:
operator delete((void *)a2);
return;
}
LABEL_5:
operator delete(*(void **)(a2 + 48));
goto LABEL_6;
}
}
else if ( (*(_BYTE *)(a2 + 64) & 1) == 0 )
{
goto LABEL_4;
}
operator delete(*(void **)(a2 + 80));
if ( (*(_BYTE *)(a2 + 32) & 1) == 0 )
goto LABEL_6;
goto LABEL_5;
}
}