//
// sub_CA940 from 0xca940 to 0xca9c0 (128 bytes)
//
// 2 xrefs:
// > sub_C79C0 @ 0xc7a90
// > sub_CA7BC @ 0xca838
//
// 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_CA940(__int64 *a1)
{
__int64 v2; // x0
__int64 v3; // x1
unsigned int v4; // w20
__int64 v5; // x1
__int64 v6; // x8
__int64 v7; // x1
__int64 v8; // x2
_BYTE v10[16]; // [xsp+0h] [xbp-20h] BYREF
v2 = sub_CD07C(v10);
v3 = a1[67];
if ( !v3 || (v2 = sub_7CACC(a1[21], v3), (v4 = v2) == 0) )
{
v5 = a1[66];
a1[67] = 0;
a1[66] = 0;
if ( v5 )
{
sub_CD30C(v2);
sub_E2D74(*(_QWORD *)(*(_QWORD *)v6 + 432LL), v7, v8, 5974, 1);
}
v4 = 0;
}
sub_51F94((__int64)v10);
return v4;
}