//
// GJShopLayer::onExit from 0x10014be1c to 0x10014bf98 (380 bytes)
//
// 1 xrefs:
// > ??> @ 0x100798b68
//
// 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 __fastcall GJShopLayer::onExit(GJShopLayer *a1)
{
cocos2d::CCSpriteFrameCache *v2; // x20
std::size_t size; // x21
void **v4; // x22
const void *p_m_sheetName; // x1
void **v6; // x1
cocos2d::CCTextureCache *v7; // x20
std::size_t v8; // x21
void **v9; // x22
const void *capacitym1; // x1
void **v11; // x1
void *__p[2]; // [xsp+0h] [xbp-50h] BYREF
char v13; // [xsp+17h] [xbp-39h]
cocos2d::CCLayer::onExit(a1);
v2 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
if ( a1->m_sheetName.m_data.m_short.shortStorage.__elems_[22] >= 0 )
size = (unsigned __int8)a1->m_sheetName.m_data.m_short.shortStorage.__elems_[22];
else
size = a1->m_sheetName.m_data.m_long.size;
sub_100048E98((__int64)__p, size + 6);
if ( v13 >= 0 )
v4 = __p;
else
v4 = (void **)__p[0];
if ( size )
{
if ( a1->m_sheetName.m_data.m_short.shortStorage.__elems_[22] >= 0 )
p_m_sheetName = &a1->m_sheetName;
else
p_m_sheetName = (const void *)a1->m_sheetName.m_data.m_long.capacitym1;
memmove(v4, p_m_sheetName, size);
}
strcpy((char *)v4 + size, ".plist");
if ( v13 >= 0 )
v6 = __p;
else
v6 = (void **)__p[0];
cocos2d::CCSpriteFrameCache::removeSpriteFramesFromFile(v2, (const char *)v6);
if ( v13 < 0 )
operator delete(__p[0]);
v7 = cocos2d::CCTextureCache::sharedTextureCache();
if ( a1->m_sheetName.m_data.m_short.shortStorage.__elems_[22] >= 0 )
v8 = (unsigned __int8)a1->m_sheetName.m_data.m_short.shortStorage.__elems_[22];
else
v8 = a1->m_sheetName.m_data.m_long.size;
sub_100048E98((__int64)__p, v8 + 4);
if ( v13 >= 0 )
v9 = __p;
else
v9 = (void **)__p[0];
if ( v8 )
{
if ( a1->m_sheetName.m_data.m_short.shortStorage.__elems_[22] >= 0 )
capacitym1 = &a1->m_sheetName;
else
capacitym1 = (const void *)a1->m_sheetName.m_data.m_long.capacitym1;
memmove(v9, capacitym1, v8);
}
strcpy((char *)v9 + v8, ".png");
if ( v13 >= 0 )
v11 = __p;
else
v11 = (void **)__p[0];
cocos2d::CCTextureCache::removeTextureForKey(v7, (const char *)v11);
if ( v13 < 0 )
operator delete(__p[0]);
}