//
// sub_100315B20 from 0x100315b20 to 0x100315b8d (109 bytes)
//
// 6 xrefs:
// > ??> @ 0x100315aed
// > ??> @ 0x100315b0e
// > ??> @ 0x100969233
// > ??> @ 0x1009815da
// > ??> @ 0x100981620
// > ??> @ 0x1009959ba
//
// 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:28:40 +0000
//
void __fastcall sub_100315B20(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 )
{
do
{
if ( (*(_BYTE *)(v4 - 3) & 1) != 0 )
operator delete(*(v4 - 1));
v4 -= 3;
}
while ( v4 != v3 );
v5 = **a1;
}
v2[1] = v3;
operator delete(v5);
}
}
}