//
// cocos2d::unzLocateFile from 0x5f1a58 to 0x5f1b28 (208 bytes)
//
// 1 xrefs:
// > cocos2d::CCFileUtils::getFileDataFromZip @ 0x5de676
//
// 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
//
int __fastcall cocos2d::unzLocateFile(cocos2d *this, char *a2, const char *a3, int a4)
{
__int64 v7; // r8
void *v8; // r1
int File; // r3
int result; // r0
void *v11; // r1
__int64 v12; // [sp+10h] [bp-178h]
__int64 v13; // [sp+18h] [bp-170h]
int v14; // [sp+24h] [bp-164h]
_BYTE v15[88]; // [sp+28h] [bp-160h] BYREF
_BYTE v16[260]; // [sp+80h] [bp-108h] BYREF
if ( !this || strlen(a2) > 0xFF )
return -102;
if ( !*((_QWORD *)this + 12) )
return -100;
v7 = *((_QWORD *)this + 10);
v12 = *((_QWORD *)this + 11);
memcpy(v15, (char *)this + 128, sizeof(v15));
v13 = *((_QWORD *)this + 27);
File = cocos2d::unzGoToFirstFile(this, v8);
while ( !File )
{
File = cocos2d::unzGetCurrentFileInfo64((int)this, nullptr, (int)v16, 0x100u, 0, 0, 0, 0);
if ( !File )
{
result = cocos2d::unzStringFileNameCompare((cocos2d *)v16, a2, a3, 0);
if ( !result )
return result;
File = cocos2d::unzGoToNextFile(this, v11);
}
}
v14 = File;
*((_QWORD *)this + 10) = v7;
*((_QWORD *)this + 11) = v12;
memcpy((char *)this + 128, v15, 0x58u);
*((_QWORD *)this + 27) = v13;
return v14;
}