//
// sub_10066D5A0 from 0x10066d5a0 to 0x10066d650 (176 bytes)
//
// 2 xrefs:
// > ??> @ 0x10066d563
// > ??> @ 0x10066d584
//
// 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:02 +0000
//
void __fastcall sub_10066D5A0(void ***a1)
{
void **v2; // r14
void **v3; // r15
void **v4; // r12
void *v5; // rdi
if ( !*((_BYTE *)a1 + 8) )
{
v2 = *a1;
v3 = (void **)**a1;
if ( v3 )
{
v4 = (void **)v2[1];
v5 = **a1;
if ( v4 == v3 )
{
LABEL_15:
v2[1] = v3;
operator delete(v5);
return;
}
while ( 1 )
{
if ( (*(_BYTE *)(v4 - 3) & 1) != 0 )
{
operator delete(*(v4 - 1));
if ( (*(_BYTE *)(v4 - 8) & 1) == 0 )
{
LABEL_8:
if ( (*(_BYTE *)(v4 - 11) & 1) != 0 )
goto LABEL_12;
goto LABEL_5;
}
}
else if ( (*(_BYTE *)(v4 - 8) & 1) == 0 )
{
goto LABEL_8;
}
operator delete(*(v4 - 6));
if ( (*(_BYTE *)(v4 - 11) & 1) != 0 )
LABEL_12:
operator delete(*(v4 - 9));
LABEL_5:
v4 -= 12;
if ( v4 == v3 )
{
v5 = **a1;
goto LABEL_15;
}
}
}
}
}