//
// TlsCallback_0 from 0x18001f318 to 0x18001f37e (102 bytes)
//
// 4 xrefs:
// > __dyn_tls_on_demand_init @ 0x18001f389
// > ??> @ 0x1800232a0
// > ??> @ 0x1800232f0
// > ??> @ 0x18004b16c
//
// 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 TlsCallback_0(__int64 a1, int a2)
{
__int64 v2; // rdx
__int64 (__fastcall **i)(); // rbx
if ( a2 == 2 )
{
v2 = *((_QWORD *)NtCurrentTeb()->ThreadLocalStoragePointer + (unsigned int)TlsIndex);
if ( *(_BYTE *)(v2 + 16) != 1 )
{
*(_BYTE *)(v2 + 16) = 1;
for ( i = &off_180023278; i != (__int64 (__fastcall **)())&unk_180023280; ++i )
{
if ( *i )
(*i)();
}
}
}
}