//
// ButtonSprite::updateBGImage from 0x68bed0 to 0x68c00c (316 bytes)
//
// 147 xrefs:
// > GJMessageCell::onDeleteMessage @ 0x73b948
// > GJNotificationCell::onMute @ 0x73f374
// > EditorUI::toggleSwipe @ 0x7c01f4
// > EditorUI::toggleSwipe @ 0x7c022c
// > EditorUI::toggleFreeMove @ 0x7c0274
// > EditorUI::toggleFreeMove @ 0x7c02ac
// > EditorUI::toggleSnap @ 0x7c0310
// > EditorUI::toggleSnap @ 0x7c0338
// > EditorUI::toggleEnableRotate @ 0x7c8a78
// > EditorUI::toggleEnableRotate @ 0x7c8a98
// > EditorUI::resetUI @ 0x7ce438
// > EditorUI::resetUI @ 0x7ce454
// > EditorUI::resetUI @ 0x7ce470
// > EditorUI::resetUI @ 0x7ce48c
// > EditorUI::toggleMode @ 0x7ce5b4
// > MoreSearchLayer::onSongMode @ 0x7e0a14
// > MoreSearchLayer::onSongMode @ 0x7e0a34
// > MoreSearchLayer::onSongMode @ 0x7e0a94
// > LevelInfoLayer::confirmOwnerDelete @ 0x7e73c8
// > ShareLevelLayer::selectRating @ 0x7f208c
// > LevelBrowserLayer::onProcessSelected @ 0x7f678c
// > InfoLayer::updateCommentModeButtons @ 0x907a58
// > InfoLayer::updateCommentModeButtons @ 0x907a78
// > InfoLayer::updateCommentModeButtons @ 0x907ac4
// > InfoLayer::updateCommentModeButtons @ 0x907ae4
// > InfoLayer::toggleModRoom @ 0x90b0b8
// > InfoLayer::toggleModRoom @ 0x90b118
// > InfoLayer::init @ 0x90c794
// > InfoLayer::init @ 0x90c810
// > InfoLayer::init @ 0x90cc4c
// > InfoLayer::init @ 0x90cc64
// > LeaderboardsLayer::toggleTabButtons @ 0x94e5b4
// > GJRateLevelLayer::selectRating @ 0x9507b8
// > GJRateLevelLayer::onCustomButton @ 0x952f58
// > GJRateLevelListLayer::onCustomButton @ 0x9533b8
// > GJRateEditorSoundLayer::onCustomButton @ 0x95382c
// > RateStarsLayer::selectRating @ 0x9573b8
// > SongSelectNode::onSongMode @ 0x97fb1c
// > SongSelectNode::onSongMode @ 0x97fb44
// > SongSelectNode::onSongMode @ 0x97fc0c
// > CustomizeObjectLayer::highlightSelected @ 0x983bd8
// > CustomizeObjectLayer::highlightSelected @ 0x983c04
// > CustomizeObjectLayer::onSelectMode @ 0x984090
// > CustomizeObjectLayer::onSelectMode @ 0x9840bc
// > CustomizeObjectLayer::onSelectMode @ 0x9840e8
// > AccountHelpLayer::verifyUnlink @ 0x98cc7c
// > AccountLayer::onBackup @ 0x98cefc
// > AccountHelpLayer::onUnlink @ 0x98e3f8
// > GJMessagePopup::onRemove @ 0xa1f218
// > GJWriteMessagePopup::onClearBody @ 0xa1f350
// > FriendRequestPopup::onBlock @ 0xa29778
// > GJMessagePopup::onBlock @ 0xa29974
// > GJSpecialColorSelect::highlightSelected @ 0xa3f910
// > GJSpecialColorSelect::highlightSelected @ 0xa3f94c
// > SetupPulsePopup::onSelectPulseMode @ 0xa45d30
// > SetupPulsePopup::onSelectPulseMode @ 0xa45d54
// > SetupPulsePopup::onSelectPulseMode @ 0xa45ea0
// > SetupPulsePopup::onSelectPulseMode @ 0xa45ecc
// > SetupPulsePopup::onSelectTargetMode @ 0xa46404
// > SetupPulsePopup::onSelectTargetMode @ 0xa46424
// > SetupPulsePopup::onSelectTargetMode @ 0xa46584
// > SetupPulsePopup::onSelectTargetMode @ 0xa465b4
// > SetupPulsePopup::onSelectTargetMode @ 0xa465c8
// > SetupPulsePopup::onSelectTargetMode @ 0xa46604
// > MessagesProfilePage::onDeleteSelected @ 0xa4a678
// > FRequestProfilePage::onDeleteSelected @ 0xa4d218
// > FriendsProfilePage::onUnfollow @ 0xa51cc4
// > FriendsProfilePage::onUnmute @ 0xa51ef8
// > FriendsProfilePage::onUnblock @ 0xa52130
// > ProfilePage::onBlockUser @ 0xa5656c
// > ProfilePage::createUnfriendAlert @ 0xa56950
// > ProfilePage::onFriend @ 0xa56ce8
// > ColorSelectLiveOverlay::onSelectTab @ 0xa66a94
// > FollowRewardPage::onSpecialItem @ 0xaaae74
// > SetGroupIDLayer::updateZLayerButtons @ 0xabb928
// > CreateParticlePopup::onMode @ 0xafc578
// > CreateParticlePopup::onMode @ 0xafc5a4
// > CreateParticlePopup::onMode @ 0xafc5d8
// > CreateParticlePopup::onMode @ 0xafc604
// > CreateParticlePopup::onPage @ 0xaff118
// > MPLobbyLayer::onBtn1 @ 0xb05910
// > SetupGradientPopup::updateZLayerButtons @ 0xb30858
// > SetupGradientPopup::updateZLayerButtons @ 0xb3088c
// > SetupShaderEffectPopup::updateZLayerButtons @ 0xb31d44
// > SetupShaderEffectPopup::updateZLayerButtons @ 0xb31d7c
// > SetupShaderEffectPopup::updateZLayerButtons @ 0xb31d90
// > SetupAreaMoveTriggerPopup::onMode @ 0xb3bd9c
// > SetupAreaMoveTriggerPopup::onMode @ 0xb3bde4
// > HSVLiveOverlay::createHSVWidget @ 0xb50818
// > CharacterColorPage::updateColorMode @ 0xb51794
// > CharacterColorPage::updateColorMode @ 0xb51898
// > SelectArtLayer::onSelectCustom @ 0xb618b0
// > SelectArtLayer::onSelectCustom @ 0xb618e0
// > LevelSettingsLayer::updateGameplayModeButtons @ 0xb62410
// > LevelSettingsLayer::updateGameplayModeButtons @ 0xb62444
// > LevelSettingsLayer::updateGameplayModeButtons @ 0xb62454
// > LevelSettingsLayer::updateGameplayModeButtons @ 0xb62488
// > SetupAudioTriggerPopup::onProxMode @ 0xb6c0c0
// > SetupSequenceTriggerPopup::onSelect @ 0xb81fe4
// > SetupSequenceTriggerPopup::onSelect @ 0xb82018
// > MusicBrowser::updateViewItems @ 0xb841e4
// > MusicBrowser::updateViewItems @ 0xb84214
// > MusicBrowser::updateViewItems @ 0xb8424c
// > MusicBrowser::updateViewItems @ 0xb84284
// > MusicBrowser::setupList @ 0xb85410
// > MusicBrowser::setupList @ 0xb8543c
// > MusicBrowser::setupList @ 0xb85494
// > MusicBrowser::setupList @ 0xb854ac
// > SFXBrowser::updateViewItems @ 0xb8e0e4
// > SFXBrowser::updateViewItems @ 0xb8e114
// > SFXBrowser::updateViewItems @ 0xb8e144
// > SFXBrowser::updateViewItems @ 0xb8e1cc
// > EditorUI::updateDeleteButtons @ 0xbdf504
// > EditorUI::updateDeleteButtons @ 0xbdf53c
// > EditorUI::updateDeleteButtons @ 0xbdf558
// > EditorUI::updateDeleteButtons @ 0xbdf574
// > EditorUI::updateDeleteButtons @ 0xbdf598
// > EditorUI::updateDeleteButtons @ 0xbdf8a8
// > EditorUI::updateDeleteButtons @ 0xbdf8d4
// > EditorUI::updateDeleteButtons @ 0xbdf904
// > EditorUI::updateViewButtons @ 0xbe04a0
// > EditorUI::setDpadStep @ 0xbe07b0
// > TabbedPopupLayer::refreshTabButtons @ 0xc387d8
// > SFXFolderPickerPopup::updateShareHint @ 0xc3a8dc
// > SFXFolderPickerPopup::updateShareHint @ 0xc3a99c
// > SFXFolderPickerPopup::updateActionBtn @ 0xc3aa10
// > SFXFolderPickerPopup::updateActionBtn @ 0xc3aa24
// > AccountReviewPopup::selectTab @ 0xc40498
// > AccountReviewPopup::onDeleteRow @ 0xc421ec
// > AccountReviewPopup::onDeleteFilterRow @ 0xc4244c
// > AccountReviewPopup::confirmDeleteSelected @ 0xc42620
// > ThreadOptionsPopup::onDismissRemoved @ 0xc64bb4
// > ThreadOptionsPopup::onCancelRequest @ 0xc64ccc
// > ThreadOptionsPopup::onLeave @ 0xc6befc
// > InvitesPopup::declineInvite @ 0xc6cd28
// > MemberListPopup::onKickMember @ 0xc6e9f0
// > ThreadOptionsPopup::onHide @ 0xc6ed9c
// > MessageThreadsPage::onDeleteSelected @ 0xc73b68
// > ThreadViewPopup::refreshLockNotice @ 0xc77bf0
// > ClearPlatformerSavesPopup::onDelete @ 0xc8f0fc
// > DeathMarkerSettingsPopup::onClearMarkers @ 0xca5c30
// > DeathTrackerOptionsPopup::onClearData @ 0xca8c48
// > EditorSFXActionConfigLayer::refreshModeButtons @ 0xcbde94
// > PlatformerControlsPopup::refreshClassUI @ 0xcfa8e8
// > RateStarsModLayer::selectRating @ 0xcfcda8
// > ReportPopup::onSubmit @ 0xcff3c4
// > ??> @ 0x5d700
//
// This function is hookable on this platform (idp: arm, 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:50:33 +0000
//
__int64 __fastcall ButtonSprite::updateBGImage(ButtonSprite *this, const char *a2)
{
__int64 v3; // x0
__int64 v4; // x22
void (__fastcall *v5)(__int64, _BYTE *); // x23
const char *v6; // x1
cocos2d::CCTextureCache **v8; // x19
void (__fastcall *v9)(cocos2d::CCTextureCache **, __int64); // x21
cocos2d::CCTextureCache *v10; // x0
__int64 v11; // x0
_BYTE v13[16]; // [xsp+58h] [xbp+58h] BYREF
v3 = *((_QWORD *)this + 81);
if ( v3 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 536LL))(v3);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v13, 0.0, 0.0, 40.0, 40.0);
v4 = cocos2d::extension::CCScale9Sprite::create(a2, v13);
*((_QWORD *)this + 81) = v4;
v5 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v4 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v13, 16.0, 16.0);
v5(v4, v13);
(*(void (__fastcall **)(ButtonSprite *, _QWORD, _QWORD))(*(_QWORD *)this + 464LL))(this, *((_QWORD *)this + 81), 0);
if ( *((_DWORD *)this + 149) == 1 )
{
v6 = (char *)this + 673;
if ( (*((_BYTE *)this + 672) & 1) != 0 )
v6 = *((const char **)this + 86);
ButtonSprite::setString(this, v6);
}
else
{
ButtonSprite::updateSpriteBGSize(this);
}
}
else
{
v8 = *((cocos2d::CCTextureCache ***)this + 80);
if ( v8 )
{
v9 = *((void (__fastcall **)(cocos2d::CCTextureCache **, __int64))*v8 + 133);
v10 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(*v8);
v11 = cocos2d::CCTextureCache::addImage(v10, a2, 0);
v9(v8, v11);
}
}
return _stack_chk_guard;
}