//
// sub_9375A4 from 0x9375a4 to 0x937652 (174 bytes)
//
// 8 xrefs:
// > WebPEncodeRGB @ 0x937670
// > WebPEncodeBGR @ 0x937694
// > WebPEncodeRGBA @ 0x9376b8
// > WebPEncodeBGRA @ 0x9376dc
// > WebPEncodeLosslessRGB @ 0x937700
// > WebPEncodeLosslessBGR @ 0x937728
// > WebPEncodeLosslessRGBA @ 0x937750
// > WebPEncodeLosslessBGRA @ 0x937778
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:04:58 +0000
//
int __fastcall sub_9375A4(int a1, int a2, int a3, int a4, int (__fastcall *a5)(_DWORD *, int, int), int a6, _DWORD *a7)
{
int v7; // s0
int result; // r0
int v13; // r3
_DWORD v14[4]; // [sp+4h] [bp-12Ch] BYREF
_DWORD v15[28]; // [sp+14h] [bp-11Ch] BYREF
_DWORD v16[43]; // [sp+84h] [bp-ACh] BYREF
if ( !WebPConfigInitInternal(v15, 0, v7, 521) || !WebPPictureInitInternal(v16, 521) )
return 0;
v13 = a6;
v16[2] = a2;
if ( a6 )
v13 = 1;
v16[18] = WebPMemoryWrite;
v15[0] = v13;
v16[0] = v13;
v16[3] = a3;
v16[19] = v14;
WebPMemoryWriterInit(v14);
if ( a5(v16, a1, a4) && WebPEncode(v15, v16) )
{
WebPPictureFree((int)v16);
result = v14[1];
*a7 = v14[0];
}
else
{
WebPPictureFree((int)v16);
WebPMemoryWriterClear((int)v14);
*a7 = 0;
return 0;
}
return result;
}