//
// sub_6FE6D4 from 0x6fe6d4 to 0x6fe766 (146 bytes)
//
// 5 xrefs:
// > sub_6F6C10 @ 0x6f6c18
// > sub_6F6C2C @ 0x6f6dba
// > sub_6F6C2C @ 0x6f6e0e
// > WebPIDelete @ 0x6f8c66
// > sub_6FF874 @ 0x6ffb9c
//
// 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
//
void __fastcall sub_6FE6D4(int a1)
{
int v2; // r3
int v3; // r5
int v4; // r4
void *v5; // r0
if ( a1 )
{
WebPSafeFree(*(void **)(a1 + 160));
WebPSafeFree(*(void **)(a1 + 172));
sub_734B4C(*(_DWORD *)(a1 + 168));
sub_7346B0(a1 + 124);
sub_7346B0(a1 + 136);
memset((void *)(a1 + 120), 0, 0x38u);
WebPSafeFree(*(void **)(a1 + 16));
v2 = *(_DWORD *)(a1 + 176);
v3 = 0;
*(_DWORD *)(a1 + 16) = 0;
if ( v2 > 0 )
{
v4 = a1;
do
{
++v3;
WebPSafeFree(*(void **)(v4 + 196));
*(_DWORD *)(v4 + 196) = 0;
v4 += 20;
}
while ( v3 < *(_DWORD *)(a1 + 176) );
}
v5 = *(void **)(a1 + 264);
*(_DWORD *)(a1 + 176) = 0;
*(_DWORD *)(a1 + 260) = 0;
WebPSafeFree(v5);
*(_DWORD *)(a1 + 264) = 0;
*(_DWORD *)(a1 + 12) = 0;
WebPSafeFree((void *)a1);
}
}