//
// cocos2d::extension::assetsManagerDownloadAndUncompress from 0x7a5cf8 to 0x7a5da2 (170 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:59:57 +0000
//
int __fastcall cocos2d::extension::assetsManagerDownloadAndUncompress(cocos2d::extension *this, void *a2)
{
int v3; // r2
int v4; // r3
int v5; // r5
int v6; // r2
unsigned int v7; // r1
int v8; // r3
char *v9; // r0
char *v10; // r0
int v11; // t1
_DWORD *v12; // r0
_DWORD *v13; // r0
void *v14; // r0
v3 = *((unsigned __int8 *)this + 52);
v4 = *((unsigned __int8 *)this + 16);
v5 = v3 & 1;
if ( (v3 & 1) != 0 )
v6 = *((_DWORD *)this + 14);
else
v6 = v3 >> 1;
v7 = v4 & 1;
if ( (v4 & 1) != 0 )
v8 = *((_DWORD *)this + 5);
else
v8 = v4 >> 1;
if ( v6 != v8 )
goto LABEL_23;
if ( v5 )
v9 = *((char **)this + 15);
else
v9 = (char *)this + 53;
if ( v7 )
v7 = *((_DWORD *)this + 6);
else
v7 = (unsigned int)this + 17;
if ( !v5 )
{
v10 = v9 - 1;
v6 += v7;
while ( v7 != v6 )
{
v11 = (unsigned __int8)*++v10;
v8 = *(unsigned __int8 *)v7;
if ( v11 != v8 )
goto LABEL_23;
++v7;
}
goto LABEL_25;
}
if ( v6 && memcmp(v9, (const void *)v7, v6) )
{
LABEL_23:
if ( !cocos2d::extension::AssetsManager::downLoad(this, v7, (char *)v6, v8) )
goto LABEL_28;
v12 = (_DWORD *)operator new(8u);
*v12 = 1;
v12[1] = this;
cocos2d::extension::AssetsManager::Helper::sendMessage(*((_DWORD *)this + 17), (int)v12);
}
LABEL_25:
if ( cocos2d::extension::AssetsManager::uncompress(this) )
{
v13 = (_DWORD *)operator new(8u);
*v13 = 0;
v13[1] = this;
cocos2d::extension::AssetsManager::Helper::sendMessage(*((_DWORD *)this + 17), (int)v13);
}
else
{
cocos2d::extension::AssetsManager::sendErrorMessage((int)this, 3);
}
LABEL_28:
v14 = *((void **)this + 18);
if ( v14 )
{
operator delete(v14);
*((_DWORD *)this + 18) = 0;
}
return 0;
}