//
// WebPPictureCopy from 0xcabea8 to 0xcabfe4 (316 bytes)
//
// 1 xrefs:
// > ??> @ 0xb31d8
//
// 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 WebPPictureCopy(void **a1, void **a2)
{
void *v4; // x2
if ( !a1 || !a2 )
return 0;
if ( a1 != a2 )
{
memcpy(a2, a1, 0x100u);
sub_CA72D8((__int64)a2);
if ( (unsigned int)WebPPictureAlloc((__int64)a2) )
{
if ( *(_DWORD *)a1 )
{
WebPCopyPlane(a1[9], 4 * *((_DWORD *)a1 + 20), a2[9]);
}
else
{
WebPCopyPlane(a1[2], *((_DWORD *)a1 + 10), a2[2]);
WebPCopyPlane(a1[3], *((_DWORD *)a1 + 11), a2[3]);
WebPCopyPlane(a1[4], *((_DWORD *)a1 + 11), a2[4]);
v4 = a2[6];
if ( v4 )
{
WebPCopyPlane(a1[6], *((_DWORD *)a1 + 14), v4);
return 1;
}
}
return 1;
}
return 0;
}
return 1;
}