//
// sub_1004BD3D0 from 0x1004bd3d0 to 0x1004bd420 (80 bytes)
//
// 5 xrefs:
// > sub_10043E934 @ 0x10043e9a4
// > sub_1004CEE58 @ 0x1004cf150
// > sub_1004CEE58 @ 0x1004cf164
// > sub_1004CEE58 @ 0x1004cf178
// > sub_1004CEE58 @ 0x1004cf188
//
// 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_1004BD3D0(__int64 a1)
{
__int64 result; // x0
result = *(_QWORD *)(a1 + 8);
if ( result )
{
result = sub_1004A73B8(result, 0, 0, 4u);
if ( !(_DWORD)result )
{
result = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 8) + 16LL))(*(_QWORD *)(a1 + 8));
if ( !(_DWORD)result )
*(_QWORD *)(a1 + 8) = 0;
}
}
return result;
}