//
// sub_100438BD0 from 0x100438bd0 to 0x100438c4f (127 bytes)
//
// 2 xrefs:
// > sub_100437F20 @ 0x100437ffe
// > sub_100437F20 @ 0x10043809b
//
// 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
//
int __fastcall sub_100438BD0(pthread_t *a1, __int64 *a2)
{
std::__thread_struct *v2; // r14
_QWORD *v3; // rax
__int64 v4; // rcx
int result; // eax
v2 = (std::__thread_struct *)operator new(8u);
std::__thread_struct::__thread_struct(v2);
v3 = operator new(0x10u);
v4 = *a2;
*v3 = v2;
v3[1] = v4;
result = pthread_create(a1, nullptr, sub_100438CA0, v3);
if ( result )
{
std::__throw_system_error(result, "thread constructor failed");
BUG();
}
return result;
}