//
// sub_A30C2C from 0xa30c2c to 0xa30cec (192 bytes)
//
// 3 xrefs:
// > OBJ_add_object @ 0xa30f88
// > OBJ_add_object @ 0xa30f90
// > ??> @ 0xa30fcc
//
// 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 12:08:04 +0000
//
int __fastcall sub_A30C2C(int *a1)
{
int v1; // r2
int v3; // r1
int v4; // r0
int result; // r0
int v6; // lr
unsigned __int8 *v7; // r0
unsigned __int8 *v8; // lr
int v9; // r2
int v10; // t1
v1 = a1[1];
switch ( *a1 )
{
case 0:
v6 = *(_DWORD *)(v1 + 12);
v7 = *(unsigned __int8 **)(v1 + 16);
v3 = v6 << 20;
if ( v6 > 0 )
{
v8 = &v7[v6];
v9 = 0;
do
{
v10 = *v7++;
v3 ^= v10 << ((char)v9 % 24);
v9 += 3;
}
while ( v7 != v8 );
}
v4 = 0;
goto LABEL_3;
case 1:
v3 = (int)OPENSSL_LH_strhash(*(unsigned __int8 **)v1);
v4 = *a1;
goto LABEL_3;
case 2:
v3 = (int)OPENSSL_LH_strhash(*(unsigned __int8 **)(v1 + 4));
v4 = *a1;
goto LABEL_3;
case 3:
v3 = *(_DWORD *)(v1 + 8);
v4 = 3;
LABEL_3:
result = v3 & 0x3FFFFFFF | (v4 << 30);
break;
default:
result = 0;
break;
}
return result;
}