//
// sub_66794 from 0x66794 to 0x667f4 (96 bytes)
//
// 2 xrefs:
// > sub_6662C @ 0x666d4
// > sub_66804 @ 0x66838
//
// 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_66794(__int64 a1)
{
__int64 result; // x0
_BYTE v3[4]; // [xsp+Ch] [xbp-4h] BYREF
if ( (unsigned int)(*(_DWORD *)(a1 + 40) - 1) > 4 || !*(_QWORD *)(a1 + 368) )
return 0;
result = sub_668CC(a1, 8, v3);
if ( (_DWORD)result )
return result;
if ( !*(_DWORD *)(a1 + 384) )
return 0;
sub_6688C();
*(_DWORD *)(a1 + 384) = 0;
return 0;
}