//
// sub_7305C4 from 0x7305c4 to 0x730642 (126 bytes)
//
// 1 xrefs:
// > sub_722E08 @ 0x723530
//
// 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
//
int __fastcall sub_7305C4(int a1, int a2)
{
_DWORD *v3; // r2
int v4; // r8
int result; // r0
_DWORD *v6; // r7
int v7; // r4
char *v8; // r2
int i; // r3
int v10; // r9
int v11; // r6
__int16 v12; // t1
int v13; // r6
v3 = *(_DWORD **)a1;
if ( !*(_DWORD *)a1 )
return 0;
v4 = *(_DWORD *)(a1 + 16);
result = 0;
do
{
v6 = (_DWORD *)*v3;
v7 = 0;
if ( !*v3 )
v7 = *(_DWORD *)(a1 + 12);
v8 = (char *)v3 + 2 * v4 + 4;
for ( i = v4; v7 < i; --i )
{
v12 = *((_WORD *)v8 - 1);
v8 -= 2;
LOWORD(v10) = v12;
v13 = v12 & 0x8000;
if ( (v12 & 0x4000) != 0 )
{
v10 = (unsigned __int8)v10;
if ( !v13 )
goto LABEL_7;
}
else
{
v10 = *(unsigned __int8 *)(a2 + (v10 & 0x3FFF));
if ( !v13 )
{
LABEL_7:
v11 = (unsigned __int16)word_A00CA0[v10];
goto LABEL_8;
}
}
v11 = (unsigned __int16)word_A00CA0[255 - v10];
LABEL_8:
result += v11;
}
v3 = v6;
}
while ( v6 );
return result;
}