// // cocos2d::VolatileTexture::reloadAllTextures from 0xda69bc to 0xda6d2c (880 bytes) // // 2 xrefs: // > cocos2d::CCTextureCache::reloadAllTextures @ 0xda6d2c // > @ 0xe7640 // // 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:32 +0000 // __int64 __fastcall cocos2d::VolatileTexture::reloadAllTextures(cocos2d::VolatileTexture *this) { __int64 v1; // x0 __int64 *v2; // x19 __int64 *v3; // x19 __int64 v4; // x27 __int64 v5; // x1 const char *v6; // x2 const char *v8; // x1 unsigned int v9; // w24 size_t v10; // x0 unsigned __int64 v11; // x1 char *v12; // x28 cocos2d::CCTexture2D *v13; // x7 cocos2d::CCTexture2D *v14; // x28 cocos2d::CCTexture2D *v15; // x0 unsigned int v16; // w28 const char *v17; // x1 cocos2d::CCImage *v18; // x28 __int64 (__fastcall **v19)(cocos2d::CCCopying *__hidden, cocos2d::CCZone *); // x0 __int64 v20; // x0 __int64 v21; // x1 __int64 *v22; // x26 cocos2d::CCTexture2D *v23; // x0 char *v24; // [xsp+68h] [xbp+68h] cocos2d::CCTexture2D *v25; // [xsp+68h] [xbp+68h] unsigned int v26; // [xsp+68h] [xbp+68h] int v27[2]; // [xsp+78h] [xbp+78h] BYREF __int64 v28; // [xsp+80h] [xbp+80h] BYREF unsigned __int64 v29; // [xsp+88h] [xbp+88h] cocos2d::CCTexture2D *v30; // [xsp+90h] [xbp+90h] v1 = qword_1562350; cocos2d::VolatileTexture::isReloading = 1; if ( (__int64 *)qword_1562350 == &cocos2d::VolatileTexture::textures ) goto LABEL_11; do { v2 = *(__int64 **)(v1 + 8); cocos2d::CCTexture2D::releaseGLTexture(**(cocos2d::CCTexture2D ***)(v1 + 16)); v1 = (__int64)v2; } while ( v2 != &cocos2d::VolatileTexture::textures ); v3 = (__int64 *)v2[1]; if ( v3 == (__int64 *)v1 ) goto LABEL_11; do { v4 = v3[2]; v3 = (__int64 *)v3[1]; switch ( *(_DWORD *)(v4 + 16) ) { case 1: v8 = (const char *)(v4 + 49); if ( (*(_BYTE *)(v4 + 48) & 1) != 0 ) v8 = *(const char **)(v4 + 64); v24 = (char *)v8; v28 = 0; v9 = 0; v29 = 0; v30 = nullptr; v10 = strlen(v8); std::string::__init(&v28, v24, v10); break; case 2: cocos2d::CCTexture2D::initWithData( *(_QWORD *)v4, *(_QWORD *)(v4 + 24), *(_DWORD *)(v4 + 40), (unsigned int)*(float *)(v4 + 32), (unsigned int)*(float *)(v4 + 36), (float *)(v4 + 32)); goto LABEL_10; case 3: v5 = v4 + 137; if ( (*(_BYTE *)(v4 + 136) & 1) != 0 ) v5 = *(_QWORD *)(v4 + 152); v6 = (const char *)(v4 + 113); if ( (*(_BYTE *)(v4 + 112) & 1) != 0 ) v6 = *(const char **)(v4 + 128); cocos2d::CCTexture2D::initWithString( *(cocos2d::CCTexture2D **)v4, v5, v6, (float *)(v4 + 92), *(_DWORD *)(v4 + 100), *(_DWORD *)(v4 + 104), *(float *)(v4 + 160)); goto LABEL_10; case 4: cocos2d::CCTexture2D::initWithImage(*(cocos2d::CCTexture2D **)v4, *(cocos2d::CCImage **)(v4 + 8)); goto LABEL_10; default: goto LABEL_10; } while ( (v28 & 1) != 0 ) { v11 = v29; if ( v9 >= v29 ) { v13 = v30; goto LABEL_24; } v12 = (char *)v30 + v9; LABEL_17: ++v9; *v12 = tolower((unsigned __int8)*v12); } v11 = (unsigned __int8)v28 >> 1; if ( v9 < v11 ) { v12 = (char *)&v28 + v9 + 1; goto LABEL_17; } v13 = (cocos2d::CCTexture2D *)((char *)&v28 + 1); LABEL_24: if ( v11 <= 3 || (v14 = (cocos2d::CCTexture2D *)((char *)v13 + v11), v25 = v13, v15 = (cocos2d::CCTexture2D *)std::__search( (__int64)v13, (__int64)v13 + v11, ".pvr", (unsigned __int8 *)"", (unsigned __int8 (__fastcall *)(__int64, _QWORD))std::char_traits::eq), v14 == v15) || v15 - v25 == -1 ) { v18 = (cocos2d::CCImage *)operator new(0x50u); v19 = cocos2d::CCImage::CCImage(v18); *(_QWORD *)v27 = 0; v20 = cocos2d::CCFileUtils::sharedFileUtils((cocos2d::CCFileUtils *)v19); v21 = v4 + 49; if ( (*(_BYTE *)(v4 + 48) & 1) != 0 ) v21 = *(_QWORD *)(v4 + 64); v22 = (__int64 *)(*(__int64 (__fastcall **)(__int64, __int64, char *, int *))(*(_QWORD *)v20 + 32LL))( v20, v21, "rb", v27); v23 = (cocos2d::CCTexture2D *)(unsigned __int8)cocos2d::CCImage::initWithImageData( v18, v22, v27[0], *(_DWORD *)(v4 + 72), 0, 0, 8); if ( (_BYTE)v23 ) { v26 = cocos2d::CCTexture2D::defaultAlphaPixelFormat(v23); cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(*(unsigned int *)(v4 + 40)); cocos2d::CCTexture2D::initWithImage(*(cocos2d::CCTexture2D **)v4, v18); cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(v26); if ( !v22 ) { LABEL_37: cocos2d::CCObject::release(v18); goto LABEL_30; } } else if ( !v22 ) { goto LABEL_37; } operator delete[](v22); goto LABEL_37; } v16 = cocos2d::CCTexture2D::defaultAlphaPixelFormat(v15); cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(*(unsigned int *)(v4 + 40)); v17 = (const char *)(v4 + 49); if ( (*(_BYTE *)(v4 + 48) & 1) != 0 ) v17 = *(const char **)(v4 + 64); cocos2d::CCTexture2D::initWithPVRFile(*(cocos2d::CCTexture2D **)v4, v17); cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(v16); LABEL_30: if ( (v28 & 1) != 0 ) operator delete(v30); LABEL_10: cocos2d::CCTexture2D::setTexParameters(*(unsigned int **)v4, v4 + 76); } while ( v3 != &cocos2d::VolatileTexture::textures ); LABEL_11: cocos2d::VolatileTexture::isReloading = 0; return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source