//
// sub_CA66EC from 0xca66ec to 0xca6724 (56 bytes)
//
// 3 xrefs:
// > sub_C998E4 @ 0xc99ce4
// > sub_CAEEBC @ 0xcaf030
// > sub_CAF1C4 @ 0xcaf7e0
//
// 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_CA66EC(_QWORD *a1, int *a2)
{
_DWORD *v2; // x2
int *v3; // x4
int v4; // t1
_BYTE *v5; // x1
__int64 result; // x0
v2 = (_DWORD *)a1[9];
v3 = a2 + 4;
do
{
v4 = *a2++;
*v2 = v4;
v2 = (_DWORD *)((char *)v2 + *(int *)(a1[6] + 56LL));
}
while ( a2 != v3 );
v5 = (_BYTE *)a1[7];
result = *v5 & 0xFC;
*v5 &= 0xFCu;
return result;
}