//
// sub_100668C60 from 0x100668c60 to 0x100668cf9 (153 bytes)
//
// 2 xrefs:
// > sub_100668D00 @ 0x100668d05
// > sub_100668D10 @ 0x100668d19
//
// 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:34:59 +0000
//
__int64 *__fastcall sub_100668C60(__int64 a1)
{
__int64 v2; // r14
__int64 v3; // r15
void *v4; // rdi
*(_QWORD *)a1 = off_100B83350;
v2 = *(_QWORD *)(a1 + 88);
if ( v2 )
{
v3 = *(_QWORD *)(a1 + 96);
v4 = *(void **)(a1 + 88);
if ( v3 == v2 )
{
LABEL_11:
*(_QWORD *)(a1 + 96) = v2;
operator delete(v4);
goto LABEL_12;
}
while ( 1 )
{
if ( (*(_BYTE *)(v3 - 24) & 1) != 0 )
{
operator delete(*(void **)(v3 - 8));
if ( (*(_BYTE *)(v3 - 48) & 1) != 0 )
LABEL_9:
operator delete(*(void **)(v3 - 32));
}
else if ( (*(_BYTE *)(v3 - 48) & 1) != 0 )
{
goto LABEL_9;
}
v3 -= 56;
if ( v3 == v2 )
{
v4 = *(void **)(a1 + 88);
goto LABEL_11;
}
}
}
LABEL_12:
if ( (*(_BYTE *)(a1 + 64) & 1) != 0 )
operator delete(*(void **)(a1 + 80));
return sub_10047FF60(a1);
}