//
// sub_F2836C from 0xf2836c to 0xf2843c (208 bytes)
//
// 1 xrefs:
// > sub_F17328 @ 0xf177dc
//
// 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_F2836C(__int64 a1, __int64 a2, __int64 a3, int a4)
{
_QWORD *v4; // x24
_QWORD *v9; // x25
int v10; // w22
int v11; // w19
char *i; // x20
unsigned int v13; // w3
__int64 v14; // x1
__int64 v15; // x2
__int64 v16; // x0
v4 = *(_QWORD **)a1;
if ( *(_QWORD *)a1 )
{
do
{
v9 = (_QWORD *)*v4;
v10 = 0;
if ( !*v4 )
v10 = *(_DWORD *)(a1 + 24);
v11 = *(_DWORD *)(a1 + 28);
for ( i = (char *)v4 + 2 * v11; ; i -= 2 )
{
v16 = a2;
if ( v10 >= v11 )
break;
v13 = *((unsigned __int16 *)i + 3);
v14 = v13 >> 15;
v15 = (unsigned __int8)v13;
if ( (v13 & 0x4000) == 0 )
{
v15 = *(unsigned __int8 *)(a3 + (v13 & 0x3FFF));
v16 = a2;
v14 = v13 >> 15;
}
--v11;
sub_F2C970(v16, v14, v15);
}
if ( a4 )
WebPSafeFree(v4);
v4 = v9;
}
while ( v9 );
}
if ( a4 )
*(_QWORD *)a1 = 0;
return 1;
}