//
// __acrt_get_begin_thread_init_policy from 0x180138da0 to 0x180138df1 (81 bytes)
//
// 2 xrefs:
// > unknown_libname_61 @ 0x1801309ad
// > ??> @ 0x180203728
//
// 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
//
__int64 _acrt_get_begin_thread_init_policy()
{
unsigned __int32 v0; // ebx
int v2; // [rsp+30h] [rbp+8h] BYREF
v0 = dword_1801F5588;
if ( !dword_1801F5588 )
{
v2 = 0;
v0 = 1;
if ( (NtCurrentPeb()->ProcessParameters->Flags & 0x80000000) == 0 )
{
_acrt_AppPolicyGetThreadInitializationTypeInternal((__int64)&v2);
if ( v2 == 1 )
v0 = 2;
}
_InterlockedExchange(&dword_1801F5588, v0);
}
return v0;
}