//
// sub_CA344 from 0xca344 to 0xca38c (72 bytes)
//
// 5 xrefs:
// > sub_CE994 @ 0xceb8a
// > sub_CEC4A @ 0xcedde
// > sub_CEC4A @ 0xcedf6
// > sub_CEC4A @ 0xcee78
// > sub_CEF24 @ 0xcef54
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:41:55 +0000
//
int __fastcall sub_CA344(_DWORD *a1, _DWORD *a2)
{
int v2; // r2
int v3; // r12
int v4; // r5
int v5; // r4
v2 = a1[5];
if ( v2 < 0 )
return 0;
v3 = a1[4];
if ( v3 <= v2 )
return 0;
if ( a2 )
{
v4 = 0;
v5 = *(_DWORD *)(*a1 + 4);
while ( v4 < v5 )
{
*(_DWORD *)(a1[2] + 4 * v4) = *(_DWORD *)(a1[1] + 4 * v4) + 4 * v2;
++v4;
}
*a2 = a1[2];
}
return v3 - v2;
}