//
// cocos2d::unzLocateFile from 0x1800a4f10 to 0x1800a5188 (632 bytes)
//
// 6 xrefs:
// > cocos2d::CCFileUtils::getFileDataFromZip @ 0x180072173
// > ??> @ 0x1801485c8
// > ??> @ 0x1801485d8
// > ??> @ 0x1801485f8
// > ??> @ 0x18014cf68
// > ??> @ 0x1801c1b30
//
// This function is hookable on this platform (idp: pc, 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 11:22:15 +0000
//
__int64 __fastcall cocos2d::unzLocateFile(cocos2d *this, char *Str2, const char *a3)
{
int v3; // ebp
void *v6; // rdx
__int64 result; // rax
__int64 v8; // rbx
__int64 v9; // r14
__int64 v10; // r15
int v11; // eax
int v12; // eax
char *v13; // r10
char v14; // al
char v15; // r9
char v16; // r8
__int64 v17; // [rsp+50h] [rbp-1A8h]
__int128 v18; // [rsp+58h] [rbp-1A0h]
__int128 v19; // [rsp+68h] [rbp-190h]
__int128 v20; // [rsp+78h] [rbp-180h]
__int128 v21; // [rsp+88h] [rbp-170h]
__int128 v22; // [rsp+98h] [rbp-160h]
char Str1[272]; // [rsp+B0h] [rbp-148h] BYREF
v3 = (int)a3;
if ( !this || strlen(Str2) >= 0x100 )
return 4294967194LL;
if ( !*((_QWORD *)this + 18) )
return 4294967196LL;
v8 = *((_QWORD *)this + 33);
v18 = *((_OWORD *)this + 11);
v9 = *((_QWORD *)this + 16);
v19 = *((_OWORD *)this + 12);
v10 = *((_QWORD *)this + 17);
v20 = *((_OWORD *)this + 13);
v21 = *((_OWORD *)this + 14);
v22 = *((_OWORD *)this + 15);
v17 = *((_QWORD *)this + 32);
for ( result = cocos2d::unzGoToFirstFile(this, v6);
!(_DWORD)result;
result = cocos2d::unzGoToNextFile64(this, nullptr, nullptr, nullptr) )
{
result = sub_1800A3990((__int64)this, 0, nullptr, (__int64)Str1, 0x100u, 0, 0, 0, 0);
if ( (_DWORD)result )
break;
v11 = 2;
if ( v3 )
v11 = v3;
if ( v11 == 1 )
{
v12 = strcmp(Str1, Str2);
}
else
{
v13 = Str2;
while ( 1 )
{
v14 = v13[Str1 - Str2];
v15 = *v13++;
if ( v14 >= 97 && v14 <= 122 )
v14 -= 32;
v16 = v15 - 32;
if ( (unsigned __int8)(v15 - 97) > 0x19u )
v16 = v15;
if ( !v14 )
break;
if ( !v16 )
goto LABEL_21;
if ( v14 < v16 )
{
v12 = -1;
goto LABEL_24;
}
if ( v14 > v16 )
{
LABEL_21:
v12 = 1;
goto LABEL_24;
}
}
v12 = -(v16 != 0);
}
LABEL_24:
if ( !v12 )
return 0;
}
*((_QWORD *)this + 16) = v9;
*((_QWORD *)this + 17) = v10;
*((_OWORD *)this + 11) = v18;
*((_QWORD *)this + 33) = v8;
*((_OWORD *)this + 12) = v19;
*((_OWORD *)this + 13) = v20;
*((_OWORD *)this + 14) = v21;
*((_OWORD *)this + 15) = v22;
*((_QWORD *)this + 32) = v17;
return result;
}