//
// cocos2d::CCFileUtils::getFileDataFromZip from 0xb041d4 to 0xb042e4 (272 bytes)
//
// 3 xrefs:
// > ??> @ 0x4fcc8
// > ??> @ 0x1217ab8
// > ??> @ 0x1217f78
//
// 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 __int8 *cocos2d::CCFileUtils::getFileDataFromZip(
cocos2d::CCFileUtils *a1,
const char *a2,
const char *a3,
unsigned __int64 *a4)
{
cocos2d *v5; // x0
int v6; // w3
cocos2d *v7; // x20
void *v8; // x1
void *v9; // x21
unsigned int v10; // w3
void *v11; // x1
_BYTE v14[56]; // [xsp+58h] [xbp+58h] BYREF
unsigned __int64 v15; // [xsp+90h] [xbp+90h]
_BYTE v16[264]; // [xsp+E0h] [xbp+E0h] BYREF
*a4 = 0;
if ( !a2 )
return nullptr;
if ( !a3 )
return nullptr;
if ( !*a2 )
return nullptr;
v5 = (cocos2d *)cocos2d::unzOpen((cocos2d *)a2, (const char *)*(unsigned __int8 *)a2);
v7 = v5;
if ( !v5 )
return nullptr;
if ( (unsigned int)cocos2d::unzLocateFile(v5, (char *)a3, (const char *)&dword_0 + 1, v6)
|| (unsigned int)cocos2d::unzGetCurrentFileInfo(v7, v14, v16, 260, 0, 0, 0, 0)
|| (unsigned int)cocos2d::unzOpenCurrentFile(v7, v8) )
{
v9 = nullptr;
}
else
{
v9 = (void *)operator new[](v15);
cocos2d::unzReadCurrentFile(v7, v9, (void *)(unsigned int)v15, v10);
*a4 = v15;
cocos2d::unzCloseCurrentFile(v7, v11);
}
cocos2d::unzClose(v7, v8);
return (unsigned __int8 *)v9;
}