// // cocos2d::extension::AssetsManager::uncompress from 0x5a0030 to 0x5a019a (362 bytes) // // 1 xrefs: // > cocos2d::extension::assetsManagerDownloadAndUncompress @ 0x5a02c8 // // 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::extension::AssetsManager::uncompress(cocos2d::extension::AssetsManager *this) { const char *v1; // r1 cocos2d *v2; // r0 cocos2d *v3; // r4 void *v4; // r1 void *v5; // r1 void *v6; // r1 void *v7; // r1 unsigned int v8; // r11 int v9; // r4 void *v10; // r1 FILE *v11; // r10 _BYTE *v12; // r3 signed int CurrentFile; // r0 char *v15; // [sp+14h] [bp-2280h] cocos2d *v17; // [sp+2Ch] [bp-2268h] BYREF const char *v18; // [sp+30h] [bp-2264h] BYREF unsigned int v19; // [sp+34h] [bp-2260h] BYREF int v20; // [sp+3Ch] [bp-2258h] BYREF char v21[512]; // [sp+8Ch] [bp-2208h] BYREF _BYTE v22[8180]; // [sp+28Ch] [bp-2008h] BYREF v15 = (char *)this + 4; std::operator+((int)&v17, (int)this + 4, "cocos2dx-update-temp-package.zip"); v2 = (cocos2d *)cocos2d::unzOpen(v17, v1); v3 = v2; if ( !v2 ) goto LABEL_13; if ( cocos2d::unzGetGlobalInfo(v2, &v19) ) { LABEL_10: cocos2d::unzClose(v3, v4); LABEL_13: v9 = 0; goto LABEL_24; } v8 = 0; while ( v8 < v19 ) { if ( cocos2d::unzGetCurrentFileInfo(v3, &v20, v21, 512, 0, 0, 0, 0) ) goto LABEL_10; std::operator+((int)&v18, (int)v15, v21); if ( v21[strlen(v21) - 1] != 47 ) { if ( !cocos2d::unzOpenCurrentFile(v3, v5) ) { v11 = fopen(v18, "wb"); if ( v11 ) { v12 = v22; while ( 1 ) { CurrentFile = cocos2d::unzReadCurrentFile(v3, v22, &stru_1FFC.st_value, (unsigned int)v12); v10 = (void *)CurrentFile; if ( CurrentFile < 0 ) break; if ( !CurrentFile ) { fclose(v11); goto LABEL_6; } fwrite(v22, CurrentFile, 1u, v11); } } cocos2d::unzCloseCurrentFile(v3, v10); } LABEL_12: cocos2d::unzClose(v3, v6); sub_774008(&v18); goto LABEL_13; } if ( !cocos2d::extension::AssetsManager::createDirectory(this, v18) ) goto LABEL_12; LABEL_6: cocos2d::unzCloseCurrentFile(v3, v6); if ( ++v8 < v19 && cocos2d::unzGoToNextFile(v3, v7) ) goto LABEL_12; sub_774008(&v18); } v9 = 1; LABEL_24: sub_774008(&v17); return v9; }
GD Web Decomp Icon

GD Web Decomp

Raw Source