// // sub_1002DBBE0 from 0x1002dbbe0 to 0x1002dbd38 (344 bytes) // // 1 xrefs: // > cocos2d::CCTexturePVR::initWithContentsOfFile @ 0x10041582c // // 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 11:02:45 +0000 // __int64 __fastcall sub_1002DBBE0(__int64 a1, void **a2) { __int64 v4; // x0 __int64 v5; // x0 bool v6; // zf __int64 v7; // x20 size_t v8; // x21 Bytef *v9; // x0 int v10; // w22 uLongf v12; // [xsp+0h] [xbp-30h] BYREF __int64 v13; // [xsp+8h] [xbp-28h] BYREF v13 = 0; v4 = cocos2d::CCFileUtils::sharedFileUtils(); v5 = (*(__int64 (__fastcall **)(__int64, __int64, const char *, __int64 *))(*(_QWORD *)v4 + 32LL))(v4, a1, "rb", &v13); if ( v5 ) v6 = v13 == 0; else v6 = 1; if ( v6 ) return 0xFFFFFFFFLL; v7 = v5; if ( *(_BYTE *)v5 != 67 || *(_BYTE *)(v5 + 1) != 67 ) goto LABEL_20; if ( *(_BYTE *)(v5 + 2) == 90 && *(_BYTE *)(v5 + 3) == 33 ) { if ( bswap32(*(unsigned __int16 *)(v5 + 6)) >> 16 >= 3 || *(_WORD *)(v5 + 4) ) goto LABEL_20; } else { if ( *(_BYTE *)(v5 + 2) != 90 || *(_BYTE *)(v5 + 3) != 112 || *(_WORD *)(v5 + 6) || *(_WORD *)(v5 + 4) ) goto LABEL_20; sub_1002DBD38(v5 + 12, (unsigned __int64)(v13 + 0x3FFFFFFF4LL) >> 2); } v8 = bswap32(*(_DWORD *)(v7 + 12)); v9 = (Bytef *)malloc(v8); *a2 = v9; if ( !v9 ) { LABEL_20: operator delete[]((void *)v7); return 0xFFFFFFFFLL; } v12 = v8; v10 = uncompress(v9, &v12, (const Bytef *)(v7 + 16), v13 - 16); operator delete[]((void *)v7); if ( v10 ) { free(*a2); *a2 = nullptr; return 0xFFFFFFFFLL; } return v8; }
GD Web Decomp Icon

GD Web Decomp

Raw Source