// // GameManager::unloadIcon from 0x3293c8 to 0x329552 (394 bytes) // // 3 xrefs: // > GameManager::unloadIcons @ 0x3295c4 // > GameManager::loadIcon @ 0x3296ec // > GameManager::finishedLoadingIconAsync @ 0x3297ce // // 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 // void GameManager::unloadIcon(GameManager *a1, int a2, int a3, int a4) { int v7; // r2 _DWORD *v8; // r0 int v9; // r2 cocos2d::CCTextureCache *v10; // r0 std::map> *p_m_iconRequests; // r7 int v12; // r0 _DWORD *v13; // r1 int v14; // r11 _DWORD *v15; // r5 _DWORD *v16; // r6 _DWORD *i; // r4 int v18; // r3 _DWORD *v19; // r3 _DWORD *v20; // r0 _DWORD *v21; // r2 _DWORD *v22; // r3 _DWORD *v23; // r3 int v24; // r9 void *v25; // r0 int v26; // [sp+4h] [bp-18h] BYREF int v27; // [sp+8h] [bp-14h] BYREF char v28; // [sp+Ch] [bp-10h] BYREF char *v29; // [sp+10h] [bp-Ch] BYREF v26 = a4; if ( a2 <= 0 ) return; v27 = GameManager::keyForIcon(a1, a2, a3); v8 = (_DWORD *)std::map::operator[](&a1->m_iconLoadCounts.compare.pad, &v27, v7); --*v8; if ( a2 == 1 && *(int *)std::map::operator[](&a1->m_iconLoadCounts.compare.pad, &v27, v9) <= 0 ) *(_DWORD *)std::map::operator[](&a1->m_iconLoadCounts.compare.pad, &v27, v9) = 1; if ( *(int *)std::map::operator[](&a1->m_iconLoadCounts.compare.pad, &v27, v9) <= 0 ) { GameManager::sheetNameForIcon((GameManager *)&v28, (int)a1, a2, a3); sub_775C20(&v29, &v28); sub_774544((int)&v29, ".png"); v10 = cocos2d::CCTextureCache::sharedTextureCache(); cocos2d::CCTextureCache::removeTextureForKey(v10, v29); sub_774008(&v29); sub_774008(&v28); } p_m_iconRequests = &a1->m_iconRequests; v12 = std::map>::operator[](p_m_iconRequests, &v26); v13 = *(_DWORD **)(v12 + 8); v14 = v12 + 4; v15 = (_DWORD *)v12; v16 = (_DWORD *)(v12 + 4); for ( i = v13; ; i = v19 ) { if ( !i ) { i = v16; goto LABEL_26; } v18 = i[4]; if ( v18 < a3 ) { v19 = (_DWORD *)i[3]; i = v16; goto LABEL_24; } if ( a3 >= v18 ) break; v19 = (_DWORD *)i[2]; LABEL_24: v16 = i; } v20 = (_DWORD *)i[2]; v21 = (_DWORD *)i[3]; while ( v20 ) { if ( v20[4] >= a3 ) { v22 = (_DWORD *)v20[2]; } else { v22 = (_DWORD *)v20[3]; v20 = i; } i = v20; v20 = v22; } while ( v21 ) { if ( a3 < v21[4] ) { v23 = (_DWORD *)v21[2]; } else { v23 = (_DWORD *)v21[3]; v21 = v16; } v16 = v21; v21 = v23; } LABEL_26: if ( i == (_DWORD *)v15[3] && v16 == (_DWORD *)v14 ) { std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_erase( (int)v15, v13); v15[3] = v16; v15[2] = 0; v15[4] = v16; v15[5] = 0; } else { while ( i != v16 ) { v24 = sub_761FE0(i); v25 = (void *)sub_7621E4(i, v14); i = (_DWORD *)v24; operator delete(v25); --v15[5]; } } if ( !*(_DWORD *)(std::map>::operator[](p_m_iconRequests, &v26) + 20) ) std::_Rb_tree>,std::_Select1st>>,std::less,std::allocator>>>::erase( p_m_iconRequests, &v26); }
GD Web Decomp Icon

GD Web Decomp

Raw Source