//
// sub_10066C140 from 0x10066c140 to 0x10066c19a (90 bytes)
//
// 2 xrefs:
// > ??> @ 0x1006557f2
// > ??> @ 0x10066c12d
//
// 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:35:01 +0000
//
void __fastcall sub_10066C140(__int64 a1)
{
__int64 v2; // r14
__int64 v3; // rax
void *v4; // rdi
__int64 v5; // rcx
v2 = *(_QWORD *)(a1 + 8);
v3 = *(_QWORD *)(a1 + 16);
if ( v3 != v2 )
{
do
{
v5 = v3 - 40;
*(_QWORD *)(a1 + 16) = v3 - 40;
if ( (*(_BYTE *)(v3 - 24) & 1) != 0 )
{
operator delete(*(void **)(v3 - 8));
v5 = *(_QWORD *)(a1 + 16);
}
v3 = v5;
}
while ( v5 != v2 );
}
v4 = *(void **)a1;
if ( *(_QWORD *)a1 )
operator delete(v4);
}