//
// sub_F2843C from 0xf2843c to 0xf284e0 (164 bytes)
//
// 1 xrefs:
// > sub_F17328 @ 0xf17b38
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:12:48 +0000
//
__int64 __fastcall sub_F2843C(__int64 a1, __int64 a2)
{
_QWORD *v2; // x4
int v4; // w10
__int64 result; // x0
_QWORD *v6; // x9
int v7; // w6
int v8; // w5
char *v9; // x4
int v10; // w2
int v11; // w2
int v12; // w3
v2 = *(_QWORD **)a1;
if ( !*(_QWORD *)a1 )
return 0;
v4 = *(_DWORD *)(a1 + 28);
result = 0;
do
{
v6 = (_QWORD *)*v2;
v7 = 0;
if ( !*v2 )
v7 = *(_DWORD *)(a1 + 24);
v8 = v4;
v9 = (char *)v2 + 2 * v4;
while ( v7 < v8 )
{
LOWORD(v10) = *((_WORD *)v9 + 3);
v12 = v10 & 0x8000;
if ( (v10 & 0x4000) != 0 )
{
v10 = (unsigned __int8)v10;
if ( !v12 )
goto LABEL_7;
}
else
{
v10 = *(unsigned __int8 *)(a2 + (v10 & 0x3FFF));
if ( !v12 )
{
LABEL_7:
v11 = word_11E2CA0[v10];
goto LABEL_8;
}
}
v11 = word_11E2CA0[255 - v10];
LABEL_8:
--v8;
v9 -= 2;
result += v11;
}
v2 = v6;
}
while ( v6 );
return result;
}