//
// sub_C366C from 0xc366c to 0xc36f0 (132 bytes)
//
// 1 xrefs:
// > sub_7755C @ 0x7780c
//
// 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_C366C(_QWORD *a1, int a2)
{
__int64 v3; // x20
__int64 v4; // x0
__int64 result; // x0
if ( a2 == -1 )
v3 = 0;
else
v3 = sub_C27A0();
v4 = a1[72];
if ( v3 == v4 )
return 0;
if ( !v4 || (result = sub_C2944(v4, (__int64)a1), !(_DWORD)result) )
{
if ( !v3 || (result = sub_C2918(v3, a1), !(_DWORD)result) )
{
a1[72] = v3;
return 0;
}
}
return result;
}