//
// sub_C99868 from 0xc99868 to 0xc998e4 (124 bytes)
//
// 1 xrefs:
// > WebPEncode @ 0xcb5af0
//
// 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
//
__int64 __fastcall sub_C99868(__int64 a1)
{
__int64 v2; // x0
__int64 v3; // x0
__int64 v4; // x0
unsigned int v5; // w21
__int64 v6; // x0
v2 = *(unsigned int *)(a1 + 23580);
if ( (int)v2 <= 0 )
{
v5 = 1;
}
else
{
v3 = WebPGetWorkerInterface(v2);
v4 = (*(__int64 (__fastcall **)(__int64))(v3 + 16))(a1 + 560);
v5 = v4;
v6 = WebPGetWorkerInterface(v4);
(*(void (__fastcall **)(__int64))(v6 + 40))(a1 + 560);
}
WebPSafeFree(*(void **)(a1 + 544));
*(_QWORD *)(a1 + 544) = 0;
*(_DWORD *)(a1 + 552) = 0;
*(_DWORD *)(a1 + 540) = 0;
return v5;
}