//
// cocos2d::unzCloseCurrentFile from 0xd9f3a8 to 0xd9f440 (152 bytes)
//
// 7 xrefs:
// > cocos2d::extension::AssetsManager::uncompress @ 0xd09eb8
// > cocos2d::extension::AssetsManager::uncompress @ 0xd09ef4
// > cocos2d::CCFileUtils::getFileDataFromZip @ 0xd74830
// > cocos2d::ZipFile::getFileData @ 0xd9b380
// > cocos2d::unzClose @ 0xd9f45c
// > cocos2d::unzOpenCurrentFile3 @ 0xd9f4e4
// > ??> @ 0x4f240
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:08:28 +0000
//
__int64 __fastcall cocos2d::unzCloseCurrentFile(cocos2d *this, void *a2)
{
__int64 v2; // x19
unsigned int v3; // w21
__int64 v5; // x0
if ( !this )
return 4294967194LL;
v2 = *((_QWORD *)this + 40);
if ( !v2 )
return 4294967194LL;
v3 = 0;
if ( !*(_QWORD *)(v2 + 192) && !*(_DWORD *)(v2 + 312) )
{
if ( *(_QWORD *)(v2 + 168) == *(_QWORD *)(v2 + 176) )
v3 = 0;
else
v3 = -105;
}
if ( *(_QWORD *)v2 )
free(*(void **)v2);
v5 = *(_QWORD *)(v2 + 128);
*(_QWORD *)v2 = 0;
if ( v5 == 8 )
inflateEnd(v2 + 8);
free((void *)v2);
*((_QWORD *)this + 40) = 0;
return v3;
}