//
// sub_1004D2E74 from 0x1004d2e74 to 0x1004d2ee8 (116 bytes)
//
// 1 xrefs:
// > sub_1004D298C @ 0x1004d2e6c
//
// 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 __fastcall sub_1004D2E74(_QWORD *a1, __int64 a2)
{
pthread_mutex_t *v4; // x21
_QWORD *v5; // x8
__int64 result; // x0
v4 = (pthread_mutex_t *)a1[45];
sub_1004B5C70(v4);
v5 = *(_QWORD **)(a2 + 264);
v5[3] = a1 + 42;
v5 += 3;
v5[1] = a1[43];
v5[2] = a2;
a1[43] = v5;
*(_QWORD *)v5[1] = v5;
sub_1004B5CA0(v4);
result = a1[37];
if ( result )
return sub_1004B5DD4(result);
return result;
}