//
// _Init_thread_footer from 0x140677af0 to 0x140677b59 (105 bytes)
//
// 9 xrefs:
// > GameToolbox::gen_random @ 0x140070a32
// > sub_14007FD40 @ 0x14007fde5
// > sub_140080E00 @ 0x140080ed4
// > sub_14008C7D0 @ 0x14008c8be
// > IDNameInput::useRank @ 0x1403c7672
// > LevelSettingsObject::sanitizeIDName @ 0x14040c3f9
// > LevelSettingsObject::getIDNames @ 0x14040dc7a
// > ??> @ 0x140932720
// > ??> @ 0x14093272c
//
// 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 11:36:00 +0000
//
void __fastcall Init_thread_footer(_DWORD *a1)
{
__int64 v2; // rdx
AcquireSRWLockExclusive(&SRWLock);
v2 = (unsigned int)TlsIndex;
*a1 = ++dword_1408FDFA4;
*(_DWORD *)(*((_QWORD *)NtCurrentTeb()->ThreadLocalStoragePointer + v2) + 4LL) = dword_1408FDFA4;
ReleaseSRWLockExclusive(&SRWLock);
WakeAllConditionVariable(&ConditionVariable);
}