//
// ButtonSprite::updateBGImage from 0x100093280 to 0x10009338e (270 bytes)
//
// 98 xrefs:
// > EditorUI::init @ 0x10000b52c
// > EditorUI::init @ 0x10000b570
// > EditorUI::init @ 0x10000b5e5
// > EditorUI::toggleSwipe @ 0x10000bdbc
// > EditorUI::toggleFreeMove @ 0x10000beac
// > EditorUI::toggleSnap @ 0x10000bf53
// > EditorUI::toggleEnableRotate @ 0x10000bfc5
// > EditorUI::toggleEnableRotate @ 0x10000c06a
// > EditorUI::updateDeleteButtons @ 0x1000320f6
// > EditorUI::updateDeleteButtons @ 0x100032119
// > EditorUI::updateDeleteButtons @ 0x10003213c
// > EditorUI::updateDeleteButtons @ 0x10003215f
// > AccountLayer::onBackup @ 0x1000cc696
// > AccountHelpLayer::onUnlink @ 0x1000cea3f
// > AccountHelpLayer::verifyUnlink @ 0x1000ceec8
// > CustomizeObjectLayer::onSelectMode @ 0x1001f751e
// > CustomizeObjectLayer::onSelectMode @ 0x1001f7544
// > CustomizeObjectLayer::onSelectMode @ 0x1001f756f
// > CustomizeObjectLayer::highlightSelected @ 0x1001f8cca
// > CustomizeObjectLayer::highlightSelected @ 0x1001f8cf6
// > SongSelectNode::onSongMode @ 0x100219674
// > SongSelectNode::onSongMode @ 0x10021968f
// > MessagesProfilePage::onDeleteSelected @ 0x10022e73b
// > GJUserCell::onUnblockUser @ 0x100256648
// > GJUserCell::onCancelFriendRequest @ 0x1002567a0
// > GJUserCell::onRemoveFriend @ 0x100256a14
// > GJRequestCell::onDeleteRequest @ 0x100257940
// > GJMessageCell::onDeleteMessage @ 0x1002586b3
// > HSVLiveOverlay::createHSVWidget @ 0x10026af2f
// > LevelSettingsLayer::init @ 0x10026c7f4
// > LevelSettingsLayer::init @ 0x10026c817
// > LevelSettingsLayer::onGameplayMode @ 0x10026e043
// > LevelSettingsLayer::onGameplayMode @ 0x10026e074
// > LevelSettingsLayer::updateGameplayModeButtons @ 0x10026e0f8
// > LevelSettingsLayer::updateGameplayModeButtons @ 0x10026e129
// > LevelSettingsLayer::onGArt @ 0x10026e213
// > SelectArtLayer::updateSelectedCustom @ 0x10026f353
// > SelectArtLayer::onSelectCustom @ 0x100270583
// > ShareLevelLayer::selectRating @ 0x100281569
// > RateStarsLayer::selectRating @ 0x10028c4b9
// > FriendRequestPopup::onBlock @ 0x1002a61ea
// > GJMessagePopup::onBlock @ 0x1002a80c1
// > GJMessagePopup::onRemove @ 0x1002a8236
// > GJWriteMessagePopup::onClearBody @ 0x1002aa12c
// > LevelInfoLayer::confirmOwnerDelete @ 0x1002c1ff0
// > SetupShaderEffectPopup::setupShaderTrigger @ 0x1002cffc3
// > SetupShaderEffectPopup::onZLayer @ 0x1002d0453
// > SetupShaderEffectPopup::updateZLayerButtons @ 0x1002d0553
// > SetGroupIDLayer::init @ 0x100313ccb
// > SetGroupIDLayer::onZLayer @ 0x100315476
// > SetGroupIDLayer::updateZLayerButtons @ 0x100316196
// > SetGroupIDLayer::onPaste @ 0x1003167c6
// > SetupPulsePopup::onSelectTargetMode @ 0x1003adb5c
// > SetupPulsePopup::onSelectTargetMode @ 0x1003adb77
// > SetupPulsePopup::onSelectPulseMode @ 0x1003aded2
// > SetupPulsePopup::onSelectPulseMode @ 0x1003adef5
// > FollowRewardPage::onSpecialItem @ 0x100420d6f
// > CreateParticlePopup::onMode @ 0x100473413
// > CreateParticlePopup::onMode @ 0x100473439
// > CreateParticlePopup::onMode @ 0x100473469
// > CreateParticlePopup::onPage @ 0x100473640
// > LevelBrowserLayer::onDeleteSelected @ 0x10048d032
// > MPLobbyLayer::onBtn1 @ 0x100493e07
// > SetupAudioTriggerPopup::onProxMode @ 0x1004b79b3
// > SetupAreaMoveTriggerPopup::onMode @ 0x1004d498f
// > SetupSequenceTriggerPopup::onSelect @ 0x1004ded9c
// > SetupSequenceTriggerPopup::onSelect @ 0x1004dedce
// > GJRateLevelLayer::selectRating @ 0x1005065e9
// > GJRateLevelLayer::onCustomButton @ 0x1005068b8
// > LeaderboardsLayer::toggleTabButtons @ 0x100513b73
// > ColorSelectLiveOverlay::onSelectTab @ 0x100569f60
// > SetupGradientPopup::init @ 0x1005f2993
// > SetupGradientPopup::onZLayer @ 0x1005f2fa3
// > SetupGradientPopup::updateZLayerButtons @ 0x1005f3043
// > MusicBrowser::setupList @ 0x10060f82d
// > MusicBrowser::setupList @ 0x10060f857
// > GJSpecialColorSelect::onSelectColor @ 0x100626b5a
// > GJSpecialColorSelect::onSelectColor @ 0x100626b91
// > GJSpecialColorSelect::highlightSelected @ 0x100626c9a
// > GJSpecialColorSelect::highlightSelected @ 0x100626cd1
// > MoreSearchLayer::onSongMode @ 0x10062eb0a
// > MoreSearchLayer::onSongMode @ 0x10062eb25
// > CharacterColorPage::updateColorMode @ 0x10065e298
// > CharacterColorPage::updateColorMode @ 0x10065e346
// > CharacterColorPage::updateColorMode @ 0x10065e3f4
// > FRequestProfilePage::onDeleteSelected @ 0x100790beb
// > InfoLayer::init @ 0x1007afb2f
// > InfoLayer::init @ 0x1007afc38
// > InfoLayer::init @ 0x1007afc83
// > InfoLayer::init @ 0x1007afc9e
// > InfoLayer::toggleCommentMode @ 0x1007b10ab
// > InfoLayer::toggleCommentMode @ 0x1007b10c6
// > InfoLayer::updateCommentModeButtons @ 0x1007b1223
// > InfoLayer::updateCommentModeButtons @ 0x1007b123e
// > InfoLayer::commentUploadFinished @ 0x1007b2eb7
// > InfoLayer::commentUploadFinished @ 0x1007b2ed2
// > ProfilePage::onFriend @ 0x1007bde47
// > ProfilePage::onBlockUser @ 0x1007be188
//
// 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 ButtonSprite::updateBGImage(ButtonSprite *a1, const char *a2)
{
cocos2d::extension::CCScale9Sprite *m_BGSprite; // rdi
cocos2d::extension::CCScale9Sprite *v4; // r14
std::array *longStorage; // rsi
cocos2d::CCSprite *m_subBGSprite; // rbx
cocos2d::CCTextureCache *v7; // rax
cocos2d::CCTexture2D *v8; // rax
_BYTE v9[40]; // [rsp+8h] [rbp-28h] BYREF
cocos2d::CCRect v10; // 0:xmm0_8.8,8:xmm1_8.8
m_BGSprite = a1->m_BGSprite;
if ( m_BGSprite )
{
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *))m_BGSprite->removeMeAndCleanup)(m_BGSprite);
v10.origin = 0;
v10.size = 0;
sub_10028CC00(v9, 0.0, 0.0, 40.0, 40.0);
v4 = cocos2d::extension::CCScale9Sprite::create_2(a2, v10);
a1->m_BGSprite = v4;
sub_10028CBF0(v9, 16.0, 16.0);
((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, _BYTE *))v4->setContentSize)(v4, v9);
((void (__fastcall *)(ButtonSprite *, cocos2d::extension::CCScale9Sprite *, _QWORD))a1->addChild_0)(
a1,
a1->m_BGSprite,
0);
if ( a1->m_mode == 1 )
{
if ( (a1->m_caption.m_data.m_short.sizex2 & 1) != 0 )
longStorage = (std::array *)a1->m_caption.m_data.m_long.longStorage;
else
longStorage = &a1->m_caption.m_data.m_short.shortStorage;
ButtonSprite::setString(a1, longStorage->__elems_);
}
else
{
ButtonSprite::updateSpriteBGSize(a1);
}
}
else
{
m_subBGSprite = a1->m_subBGSprite;
if ( m_subBGSprite )
{
v7 = cocos2d::CCTextureCache::sharedTextureCache();
v8 = cocos2d::CCTextureCache::addImage(v7, a2, 0);
((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCTexture2D *))m_subBGSprite->setTexture)(m_subBGSprite, v8);
}
}
}