//
// cocos2d::unzLocateFile from 0xb2d99c to 0xb2daf0 (340 bytes)
//
// 2 xrefs:
// > cocos2d::CCFileUtils::getFileDataFromZip @ 0xb04230
// > ??> @ 0x43620
//
// 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 cocos2d::unzLocateFile(cocos2d *this, char *a2, const char *a3)
{
unsigned int v5; // w22
__int64 v6; // x28
__int64 v7; // x27
__int64 v8; // x26
void *v9; // x1
unsigned int i; // w3
__int64 result; // x0
void *v12; // x1
unsigned int v13; // [xsp+68h] [xbp+68h]
_BYTE v14[136]; // [xsp+78h] [xbp+78h] BYREF
_BYTE v15[264]; // [xsp+100h] [xbp+100h] BYREF
v5 = (unsigned int)a3;
if ( !this || strlen(a2) > 0xFF )
return 4294967194LL;
if ( !*((_QWORD *)this + 18) )
return 4294967196LL;
v6 = *((_QWORD *)this + 16);
v7 = *((_QWORD *)this + 17);
memcpy(v14, (char *)this + 176, sizeof(v14));
v8 = *((_QWORD *)this + 39);
for ( i = cocos2d::unzGoToFirstFile(this, v9); !i; i = cocos2d::unzGoToNextFile(this, v12) )
{
i = cocos2d::unzGetCurrentFileInfo64((__int64)this, nullptr, (__int64)v15, 0x100u, 0, 0, 0, 0);
if ( i )
break;
result = cocos2d::unzStringFileNameCompare((cocos2d *)v15, a2, (const char *)v5);
if ( !(_DWORD)result )
return result;
}
*((_QWORD *)this + 16) = v6;
*((_QWORD *)this + 17) = v7;
v13 = i;
memcpy((char *)this + 176, v14, 0x88u);
*((_QWORD *)this + 39) = v8;
return v13;
}