//
// _Init_thread_header from 0x18012097c to 0x1801209e3 (103 bytes)
//
// 22 xrefs:
// > sub_180110290 @ 0x180110829
// > sub_180110290 @ 0x180110879
// > sub_180110290 @ 0x1801108c9
// > sub_180110290 @ 0x180110919
// > sub_180110290 @ 0x180110969
// > sub_180110290 @ 0x1801109b9
// > sub_180110290 @ 0x180110a09
// > sub_180110290 @ 0x180110a59
// > sub_180110290 @ 0x180110aa9
// > sub_180110290 @ 0x180110af9
// > sub_180110290 @ 0x180110b49
// > sub_180110290 @ 0x180110b99
// > sub_180110290 @ 0x180110be9
// > sub_180110290 @ 0x180110c39
// > sub_180110290 @ 0x180110c89
// > sub_180110290 @ 0x180110cd9
// > sub_180110290 @ 0x180110d29
// > sub_180110290 @ 0x180110d79
// > sub_180110290 @ 0x180110dc9
// > sub_180110290 @ 0x180110e19
// > ??> @ 0x180202540
// > ??> @ 0x18020254c
//
// 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:52 +0000
//
void __fastcall Init_thread_header(_DWORD *a1)
{
EnterCriticalSection(&stru_1801F49F0);
while ( 1 )
{
if ( !*a1 )
{
*a1 = -1;
goto LABEL_7;
}
if ( *a1 != -1 )
break;
Init_thread_wait(0x64u);
}
*(_DWORD *)(*((_QWORD *)NtCurrentTeb()->ThreadLocalStoragePointer + (unsigned int)TlsIndex) + 4LL) = dword_1801B1724;
LABEL_7:
LeaveCriticalSection(&stru_1801F49F0);
}