//
// sub_10024124C from 0x10024124c to 0x1002412d8 (140 bytes)
//
// 2 xrefs:
// > sub_1002409B4 @ 0x100240a48
// > sub_1002409B4 @ 0x100240ab8
//
// 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 sub_10024124C(pthread_t *a1, __int64 *a2)
{
std::__thread_struct *v4; // x20
_QWORD *v5; // x0
__int64 v6; // x8
int v7; // w0
_QWORD *v8; // [xsp+8h] [xbp-28h] BYREF
v4 = (std::__thread_struct *)operator new(8u);
std::__thread_struct::__thread_struct(v4);
v5 = operator new(0x10u);
v6 = *a2;
*v5 = v4;
v5[1] = v6;
v8 = v5;
v7 = pthread_create(a1, nullptr, (void *(__cdecl *)(void *))sub_10024130C, v5);
if ( v7 )
{
std::__throw_system_error(v7, "thread constructor failed");
__break(1u);
}
else
{
v8 = nullptr;
sub_100241520(&v8);
}
}