//
// cocos2d::unzGetLocalExtrafield from 0xb2dff0 to 0xb2e0a8 (184 bytes)
//
// 1 xrefs:
// > ??> @ 0x85db8
//
// 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
//
unsigned __int64 __fastcall cocos2d::unzGetLocalExtrafield(cocos2d *this, void *a2, void *a3)
{
unsigned int v3; // w20
__int64 v5; // x19
unsigned __int64 result; // x0
v3 = (unsigned int)a3;
if ( !this )
return 4294967194LL;
v5 = *((_QWORD *)this + 40);
if ( !v5 )
return 4294967194LL;
result = *(unsigned int *)(v5 + 144) - *(_QWORD *)(v5 + 152);
if ( a2 )
{
if ( result < (unsigned int)a3 )
v3 = *(_DWORD *)(v5 + 144) - *(_DWORD *)(v5 + 152);
result = 0;
if ( v3 )
{
if ( cocos2d::call_zseek64(v5 + 200)
|| v3 != (*(__int64 (__fastcall **)(_QWORD, _QWORD, void *, _QWORD))(v5 + 208))(
*(_QWORD *)(v5 + 256),
*(_QWORD *)(v5 + 288),
a2,
v3) )
{
return 0xFFFFFFFFLL;
}
else
{
return v3;
}
}
}
return result;
}