//
// cocos2d::CCTextureCache::removeTextureForKey from 0xb34308 to 0xb343e4 (220 bytes)
//
// 33 xrefs:
// > GameManager::finishedLoadingBGAsync @ 0x5e7fe0
// > GameManager::loadFont @ 0x5ebb98
// > GameManager::loadDeathEffect @ 0x5ebcf8
// > GameManager::unloadBackground @ 0x5ebdc8
// > GameManager::loadBackground @ 0x5ebeac
// > GameManager::loadMiddleground @ 0x5ebfac
// > GameManager::loadMiddleground @ 0x5ebfd0
// > GameManager::finishedLoadingMGAsync @ 0x5ec18c
// > GameManager::finishedLoadingMGAsync @ 0x5ec198
// > GameManager::loadGround @ 0x5ec338
// > GameManager::loadGround @ 0x5ec374
// > GameManager::finishedLoadingGAsync @ 0x5ec4e8
// > GameManager::finishedLoadingGAsync @ 0x5ec4f4
// > GameManager::unloadIcon @ 0x5fcad4
// > TutorialPopup::~TutorialPopup @ 0x600530
// > GJMoreGamesLayer::~GJMoreGamesLayer @ 0x7d92b4
// > TutorialLayer::removeTutorialTexture @ 0x7da5b8
// > GJPromoPopup::onExit @ 0x8c3a1c
// > GauntletSelectLayer::onExit @ 0x91d494
// > GJShopLayer::onExit @ 0x92aa34
// > SecretLayer3::onExit @ 0x93a89c
// > SecretLayer2::onExit @ 0x93abc4
// > SecretLayer4::onExit @ 0x94b66c
// > WorldSelectLayer::onExit @ 0x95e2dc
// > GJBigSprite::unloadSprite @ 0x97f450
// > MapSelectLayer::onExit @ 0x980bb0
// > LevelAreaLayer::onExit @ 0xa314e0
// > LevelAreaInnerLayer::onExit @ 0xa31530
// > SecretRewardsLayer::onExit @ 0xa6b0cc
// > GJPathsLayer::onExit @ 0xa6cf10
// > SecretLayer5::onExit @ 0xa8ff20
// > cocos2d::CCDirector::removeStatsLabel @ 0xad7760
// > ??> @ 0xc48a8
//
// 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 cocos2d::CCTextureCache::removeTextureForKey(cocos2d::CCTextureCache *a1, const char *a2)
{
cocos2d::CCFileUtils *v3; // x0
char *v4; // x0
unsigned int *v5; // x2
int v6; // w1
const char *v8; // [xsp+50h] [xbp+50h] BYREF
if ( a2 )
{
v3 = cocos2d::CCFileUtils::sharedFileUtils();
((void (__fastcall *)(const char **__return_ptr, cocos2d::CCFileUtils *, const char *, _QWORD))v3->createCCArrayWithContentsOfFile)(
&v8,
v3,
a2,
0);
cocos2d::CCDictionary::removeObjectForKey((__int64)a1->m_pTextures, &v8);
v4 = (char *)(v8 - 24);
if ( v8 - 24 != (const char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v5 = (unsigned int *)(v8 - 8);
do
v6 = __ldaxr(v5);
while ( __stlxr(v6 - 1, v5) );
}
else
{
v6 = *((_DWORD *)v8 - 2);
*((_DWORD *)v8 - 2) = v6 - 1;
}
if ( v6 <= 0 )
operator delete(v4);
}
}
}