//
// sub_1003C8130 from 0x1003c8130 to 0x1003c81c2 (146 bytes)
//
// 1 xrefs:
// > ??> @ 0x10092e918
//
// 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_1003C8130(__int64 a1)
{
__int64 v2; // rbx
void (__fastcall ***v3)(_QWORD, __int64); // rdi
__int64 v4; // rax
__int64 result; // rax
v2 = a1 - 336;
v3 = *(void (__fastcall ****)(_QWORD, __int64))(a1 + 288);
if ( v3 )
(**v3)(v3, v2);
*(_QWORD *)(a1 + 288) = 0;
v4 = *(_QWORD *)(a1 + 240);
if ( v4 )
*(_QWORD *)(v4 + 688) = 0;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(a1 - 336) + 1056LL))(v2, 0);
result = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(a1 - 336) + 1072LL))(v2, 0);
if ( !*(_BYTE *)(a1 + 304) )
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v2 + 512LL))(v2, 1);
return result;
}