//
// sub_1000E7D30 from 0x1000e7d30 to 0x1000e7dab (123 bytes)
//
// 4 xrefs:
// > ??> @ 0x1000d56cc
// > ??> @ 0x1000e7cd4
// > ??> @ 0x1000e7d0c
// > ??> @ 0x1000e7d20
//
// 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:21:05 +0000
//
void __fastcall sub_1000E7D30(__int64 *a1)
{
__int64 v1; // rbx
std::__thread_struct *v2; // r14
v1 = *a1;
*a1 = 0;
if ( v1 )
{
if ( (*(_BYTE *)(v1 + 32) & 1) != 0 )
{
operator delete(*(void **)(v1 + 48));
if ( (*(_BYTE *)(v1 + 8) & 1) == 0 )
{
LABEL_4:
v2 = *(std::__thread_struct **)v1;
*(_QWORD *)v1 = 0;
if ( !v2 )
{
LABEL_6:
operator delete((void *)v1);
return;
}
LABEL_5:
std::__thread_struct::~__thread_struct(v2);
operator delete(v2);
goto LABEL_6;
}
}
else if ( (*(_BYTE *)(v1 + 8) & 1) == 0 )
{
goto LABEL_4;
}
operator delete(*(void **)(v1 + 24));
v2 = *(std::__thread_struct **)v1;
*(_QWORD *)v1 = 0;
if ( !v2 )
goto LABEL_6;
goto LABEL_5;
}
}