//
// __vcrt_freeptd from 0x180124ddc to 0x180124e29 (77 bytes)
//
// 2 xrefs:
// > __vcrt_thread_detach @ 0x180124b76
// > ??> @ 0x180202738
//
// 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 10:54:54 +0000
//
void __fastcall _vcrt_freeptd(void *Block)
{
DWORD v2; // ecx
void *Value; // rax
v2 = dwTlsIndex;
if ( dwTlsIndex != -1 )
{
if ( !Block )
{
Value = (void *)_vcrt_FlsGetValue();
v2 = dwTlsIndex;
Block = Value;
}
_vcrt_FlsSetValue(v2, nullptr);
if ( Block )
{
if ( Block != &unk_1801F4A70 )
free(Block);
}
}
}