//
// cocos2d::CCSpriteFrame::getTexture from 0x100343d10 to 0x100343d84 (116 bytes)
//
// 11 xrefs:
// > cocos2d::CCSprite::initWithSpriteFrame @ 0x100273fe3
// > cocos2d::CCSprite::setDisplayFrame @ 0x10027636c
// > cocos2d::CCSprite::isFrameDisplayed @ 0x100276449
// > cocos2d::CCSpriteFrameCache::removeSpriteFramesFromTexture @ 0x100308fa8
// > cocos2d::extension::CCScale9Sprite::initWithSpriteFrame_1 @ 0x1003e297d
// > cocos2d::extension::CCScale9Sprite::setSpriteFrame @ 0x1003e32aa
// > CCSpriteWithHue::createWithSpriteFrame @ 0x1006c2fed
// > CCSpriteWithHue::initWithSpriteFrame @ 0x1006c3383
// > CCSpriteGrayscale::createWithSpriteFrame @ 0x1006c41ed
// > cocos2d::CCParticleSystemQuad::setDisplayFrame @ 0x1006daaf0
// > DeathMarkerLayer::init @ 0x1008bc3f6
//
// This function is hookable on this platform (idp: pc, 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 12:28:44 +0000
//
__int64 __fastcall cocos2d::CCSpriteFrame::getTexture(__int64 a1)
{
__int64 result; // rax
unsigned int v2; // eax
__int64 v3; // rax
__int64 v4; // rbx
result = *(_QWORD *)(a1 + 128);
if ( result )
return result;
v2 = *(unsigned __int8 *)(a1 + 136);
if ( (v2 & 1) != 0 )
{
if ( *(_QWORD *)(a1 + 144) )
goto LABEL_4;
return 0;
}
if ( !(v2 >> 1) )
return 0;
LABEL_4:
v3 = cocos2d::CCTextureCache::sharedTextureCache(a1);
if ( (*(_BYTE *)(a1 + 136) & 1) != 0 )
v4 = *(_QWORD *)(a1 + 152);
else
v4 = a1 + 137;
return cocos2d::CCTextureCache::addImage(v3, v4, 0);
}