//
// _Init_thread_header from 0x1800df6c4 to 0x1800df73c (120 bytes)
//
// 8 xrefs:
// > cocos2d::CCCallFuncN::getClassTypeInfo @ 0x1800301e9
// > cocos2d::CCCallFuncND::getClassTypeInfo @ 0x180030269
// > cocos2d::CCCallFuncO::getClassTypeInfo @ 0x1800302e9
// > cocos2d::CCFileUtils::getClassTypeInfo @ 0x18006fcf4
// > cocos2d::CCImage::initWithString @ 0x18007d00b
// > cocos2d::CCIMEDispatcher::sharedDispatcher @ 0x1800b4df2
// > cocos2d::CCDirector::getClassTypeInfo @ 0x1800be564
// > ??> @ 0x1801bb010
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall Init_thread_header(_DWORD *a1)
{
AcquireSRWLockExclusive(&SRWLock);
while ( 1 )
{
if ( !*a1 )
{
*a1 = -1;
goto LABEL_7;
}
if ( *a1 != -1 )
break;
SleepConditionVariableSRW(&ConditionVariable, &SRWLock, 0xFFFFFFFF, 0);
}
*(_DWORD *)(*((_QWORD *)NtCurrentTeb()->ThreadLocalStoragePointer + (unsigned int)TlsIndex) + 4LL) = dword_1801A434C;
LABEL_7:
ReleaseSRWLockExclusive(&SRWLock);
}