{"type": "func", "start": 4295358856, "end": 4295359128, "name": "ButtonSprite::updateBGImage", "pseudocode": "// \n// ButtonSprite::updateBGImage from 0x10005f988 to 0x10005fa98 (272 bytes)\n// \n// 71 xrefs:\n// > LevelInfoLayer::confirmOwnerDelete @ 0x100028998\n// > SetupAreaMoveTriggerPopup::onMode @ 0x100035fd0\n// > SetGroupIDLayer::updateZLayerButtons @ 0x10003deb4\n// > CustomizeObjectLayer::onSelectMode @ 0x10004f5c0\n// > CustomizeObjectLayer::onSelectMode @ 0x10004f5e0\n// > CustomizeObjectLayer::onSelectMode @ 0x10004f604\n// > CustomizeObjectLayer::highlightSelected @ 0x100050670\n// > CustomizeObjectLayer::highlightSelected @ 0x100050698\n// > MoreSearchLayer::onSongMode @ 0x100056c80\n// > MoreSearchLayer::onSongMode @ 0x100056c98\n// > RateStarsLayer::selectRating @ 0x1000808bc\n// > ColorSelectLiveOverlay::onSelectTab @ 0x1000f6394\n// > GJUserCell::onUnblockUser @ 0x1001116f0\n// > GJUserCell::onCancelFriendRequest @ 0x1001117fc\n// > GJUserCell::onRemoveFriend @ 0x10011198c\n// > GJRequestCell::onDeleteRequest @ 0x1001120e8\n// > GJMessageCell::onDeleteMessage @ 0x10011276c\n// > CharacterColorPage::updateColorMode @ 0x10012a010\n// > SongSelectNode::onSongMode @ 0x100147970\n// > SongSelectNode::onSongMode @ 0x100147988\n// > AccountLayer::onBackup @ 0x100165f18\n// > AccountHelpLayer::onUnlink @ 0x10016753c\n// > AccountHelpLayer::verifyUnlink @ 0x10016791c\n// > LevelSettingsLayer::updateGameplayModeButtons @ 0x10017b534\n// > LevelSettingsLayer::updateGameplayModeButtons @ 0x10017b564\n// > SelectArtLayer::onSelectCustom @ 0x10017ce84\n// > SetupAudioTriggerPopup::onProxMode @ 0x10017f0ec\n// > SetupShaderEffectPopup::updateZLayerButtons @ 0x100189d2c\n// > ProfilePage::onFriend @ 0x10019af6c\n// > ProfilePage::onBlockUser @ 0x10019b194\n// > HSVLiveOverlay::createHSVWidget @ 0x10019ffc0\n// > GJSpecialColorSelect::highlightSelected @ 0x1001af628\n// > GJSpecialColorSelect::highlightSelected @ 0x1001af660\n// > GJRateLevelLayer::selectRating @ 0x1001b16f4\n// > GJRateLevelLayer::onCustomButton @ 0x1001b1968\n// > FRequestProfilePage::onDeleteSelected @ 0x1001b6bf0\n// > MessagesProfilePage::onDeleteSelected @ 0x1001cca9c\n// > SetupSequenceTriggerPopup::onSelect @ 0x1001d36e8\n// > SetupSequenceTriggerPopup::onSelect @ 0x1001d3724\n// > ShareLevelLayer::selectRating @ 0x100276174\n// > CreateParticlePopup::onMode @ 0x1002cdd60\n// > CreateParticlePopup::onMode @ 0x1002cdd80\n// > CreateParticlePopup::onMode @ 0x1002cddac\n// > CreateParticlePopup::onPage @ 0x1002cdfa4\n// > FriendRequestPopup::onBlock @ 0x1002d9ca8\n// > GJMessagePopup::onBlock @ 0x1002db42c\n// > GJMessagePopup::onRemove @ 0x1002db548\n// > GJWriteMessagePopup::onClearBody @ 0x1002dcde0\n// > SetupGradientPopup::updateZLayerButtons @ 0x1003435f4\n// > InfoLayer::init @ 0x100350d3c\n// > InfoLayer::init @ 0x100350db8\n// > InfoLayer::updateCommentModeButtons @ 0x100351ecc\n// > InfoLayer::updateCommentModeButtons @ 0x100351ee4\n// > LeaderboardsLayer::toggleTabButtons @ 0x1003b1cb4\n// > SetupPulsePopup::onSelectTargetMode @ 0x1003b6198\n// > SetupPulsePopup::onSelectTargetMode @ 0x1003b61b0\n// > SetupPulsePopup::onSelectPulseMode @ 0x1003b6404\n// > SetupPulsePopup::onSelectPulseMode @ 0x1003b6420\n// > MusicBrowser::setupList @ 0x1003c26a0\n// > MusicBrowser::setupList @ 0x1003c26c4\n// > EditorUI::toggleSwipe @ 0x1003c7240\n// > EditorUI::toggleFreeMove @ 0x1003c7340\n// > EditorUI::toggleSnap @ 0x1003c73d0\n// > EditorUI::toggleEnableRotate @ 0x1003c742c\n// > EditorUI::toggleEnableRotate @ 0x1003c744c\n// > EditorUI::updateDeleteButtons @ 0x1003e9530\n// > EditorUI::updateDeleteButtons @ 0x1003e954c\n// > EditorUI::updateDeleteButtons @ 0x1003e9568\n// > EditorUI::updateDeleteButtons @ 0x1003e9584\n// > LevelBrowserLayer::onDeleteSelected @ 0x100416050\n// > FollowRewardPage::onSpecialItem @ 0x100425864\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall ButtonSprite::updateBGImage(ButtonSprite *a1, const char *a2)\n{\n  cocos2d::extension::CCScale9Sprite *m_BGSprite; // x0\n  cocos2d::extension::CCScale9Sprite *v5; // x20\n  std::string *p_m_caption; // x1\n  cocos2d::CCSprite *m_subBGSprite; // x19\n  cocos2d::CCTextureCache *v8; // x0\n  cocos2d::CCTexture2D *v9; // x0\n  float v10[4]; // [xsp+0h] [xbp-20h] BYREF\n  cocos2d::CCRect v11; // 0:s0.4,4:s1.4,8:s2.4,12:s3.4\n\n  m_BGSprite = a1->m_BGSprite;\n  if ( m_BGSprite )\n  {\n    ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *))m_BGSprite->removeMeAndCleanup)(m_BGSprite);\n    sub_100022990(v10, 0.0, 0.0, 40.0, 40.0);\n    v5 = cocos2d::extension::CCScale9Sprite::create(a2, v11);\n    a1->m_BGSprite = v5;\n    sub_100022988(v10, 16.0, 16.0);\n    ((void (__fastcall *)(cocos2d::extension::CCScale9Sprite *, float *))v5->setContentSize)(v5, v10);\n    ((void (__fastcall *)(ButtonSprite *, cocos2d::extension::CCScale9Sprite *, _QWORD))a1->addChild_0)(\n      a1,\n      a1->m_BGSprite,\n      0);\n    if ( a1->m_mode == 1 )\n    {\n      p_m_caption = &a1->m_caption;\n      if ( a1->m_caption.m_data.m_short.shortStorage.__elems_[22] < 0 )\n        p_m_caption = (std::string *)p_m_caption->m_data.m_long.capacitym1;\n      ButtonSprite::setString(a1, (const char *)p_m_caption);\n    }\n    else\n    {\n      ButtonSprite::updateSpriteBGSize(a1);\n    }\n  }\n  else\n  {\n    m_subBGSprite = a1->m_subBGSprite;\n    if ( m_subBGSprite )\n    {\n      v8 = cocos2d::CCTextureCache::sharedTextureCache();\n      v9 = cocos2d::CCTextureCache::addImage(v8, a2, 0);\n      ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCTexture2D *))m_subBGSprite->setTexture)(m_subBGSprite, v9);\n    }\n  }\n}", "assembly": "; \n; ButtonSprite::updateBGImage from 0x10005f988 to 0x10005fa98 (272 bytes)\n; \n; 71 xrefs:\n; > LevelInfoLayer::confirmOwnerDelete @ 0x100028998\n; > SetupAreaMoveTriggerPopup::onMode @ 0x100035fd0\n; > SetGroupIDLayer::updateZLayerButtons @ 0x10003deb4\n; > CustomizeObjectLayer::onSelectMode @ 0x10004f5c0\n; > CustomizeObjectLayer::onSelectMode @ 0x10004f5e0\n; > CustomizeObjectLayer::onSelectMode @ 0x10004f604\n; > CustomizeObjectLayer::highlightSelected @ 0x100050670\n; > CustomizeObjectLayer::highlightSelected @ 0x100050698\n; > MoreSearchLayer::onSongMode @ 0x100056c80\n; > MoreSearchLayer::onSongMode @ 0x100056c98\n; > RateStarsLayer::selectRating @ 0x1000808bc\n; > ColorSelectLiveOverlay::onSelectTab @ 0x1000f6394\n; > GJUserCell::onUnblockUser @ 0x1001116f0\n; > GJUserCell::onCancelFriendRequest @ 0x1001117fc\n; > GJUserCell::onRemoveFriend @ 0x10011198c\n; > GJRequestCell::onDeleteRequest @ 0x1001120e8\n; > GJMessageCell::onDeleteMessage @ 0x10011276c\n; > CharacterColorPage::updateColorMode @ 0x10012a010\n; > SongSelectNode::onSongMode @ 0x100147970\n; > SongSelectNode::onSongMode @ 0x100147988\n; > AccountLayer::onBackup @ 0x100165f18\n; > AccountHelpLayer::onUnlink @ 0x10016753c\n; > AccountHelpLayer::verifyUnlink @ 0x10016791c\n; > LevelSettingsLayer::updateGameplayModeButtons @ 0x10017b534\n; > LevelSettingsLayer::updateGameplayModeButtons @ 0x10017b564\n; > SelectArtLayer::onSelectCustom @ 0x10017ce84\n; > SetupAudioTriggerPopup::onProxMode @ 0x10017f0ec\n; > SetupShaderEffectPopup::updateZLayerButtons @ 0x100189d2c\n; > ProfilePage::onFriend @ 0x10019af6c\n; > ProfilePage::onBlockUser @ 0x10019b194\n; > HSVLiveOverlay::createHSVWidget @ 0x10019ffc0\n; > GJSpecialColorSelect::highlightSelected @ 0x1001af628\n; > GJSpecialColorSelect::highlightSelected @ 0x1001af660\n; > GJRateLevelLayer::selectRating @ 0x1001b16f4\n; > GJRateLevelLayer::onCustomButton @ 0x1001b1968\n; > FRequestProfilePage::onDeleteSelected @ 0x1001b6bf0\n; > MessagesProfilePage::onDeleteSelected @ 0x1001cca9c\n; > SetupSequenceTriggerPopup::onSelect @ 0x1001d36e8\n; > SetupSequenceTriggerPopup::onSelect @ 0x1001d3724\n; > ShareLevelLayer::selectRating @ 0x100276174\n; > CreateParticlePopup::onMode @ 0x1002cdd60\n; > CreateParticlePopup::onMode @ 0x1002cdd80\n; > CreateParticlePopup::onMode @ 0x1002cddac\n; > CreateParticlePopup::onPage @ 0x1002cdfa4\n; > FriendRequestPopup::onBlock @ 0x1002d9ca8\n; > GJMessagePopup::onBlock @ 0x1002db42c\n; > GJMessagePopup::onRemove @ 0x1002db548\n; > GJWriteMessagePopup::onClearBody @ 0x1002dcde0\n; > SetupGradientPopup::updateZLayerButtons @ 0x1003435f4\n; > InfoLayer::init @ 0x100350d3c\n; > InfoLayer::init @ 0x100350db8\n; > InfoLayer::updateCommentModeButtons @ 0x100351ecc\n; > InfoLayer::updateCommentModeButtons @ 0x100351ee4\n; > LeaderboardsLayer::toggleTabButtons @ 0x1003b1cb4\n; > SetupPulsePopup::onSelectTargetMode @ 0x1003b6198\n; > SetupPulsePopup::onSelectTargetMode @ 0x1003b61b0\n; > SetupPulsePopup::onSelectPulseMode @ 0x1003b6404\n; > SetupPulsePopup::onSelectPulseMode @ 0x1003b6420\n; > MusicBrowser::setupList @ 0x1003c26a0\n; > MusicBrowser::setupList @ 0x1003c26c4\n; > EditorUI::toggleSwipe @ 0x1003c7240\n; > EditorUI::toggleFreeMove @ 0x1003c7340\n; > EditorUI::toggleSnap @ 0x1003c73d0\n; > EditorUI::toggleEnableRotate @ 0x1003c742c\n; > EditorUI::toggleEnableRotate @ 0x1003c744c\n; > EditorUI::updateDeleteButtons @ 0x1003e9530\n; > EditorUI::updateDeleteButtons @ 0x1003e954c\n; > EditorUI::updateDeleteButtons @ 0x1003e9568\n; > EditorUI::updateDeleteButtons @ 0x1003e9584\n; > LevelBrowserLayer::onDeleteSelected @ 0x100416050\n; > FollowRewardPage::onSpecialItem @ 0x100425864\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSUB             SP, SP, #0x30                                          ; +0x0, 0x10005f988\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x10005f98c\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x10005f990\nADD             X29, SP, #0x20                                         ; +0xc, 0x10005f994\nMOV             X20, X1                                                ; +0x10, 0x10005f998\nMOV             X19, X0                                                ; +0x14, 0x10005f99c\nLDR             X0, [X0,#0x288]                                        ; +0x18, 0x10005f9a0\nCBZ             X0, loc_10005FA48                                      ; +0x1c, 0x10005f9a4\nLDR             X8, [X0]                                               ; +0x20, 0x10005f9a8\nLDR             X8, [X8,#0x208]                                        ; +0x24, 0x10005f9ac\nBLR             X8                                                     ; +0x28, 0x10005f9b0\nMOV             W8, #0x42200000                                        ; +0x2c, 0x10005f9b4\nFMOV            S2, W8                                                 ; +0x30, 0x10005f9b8\nMOV             X0, SP                                                 ; +0x34, 0x10005f9bc\nFMOV            S0, WZR                                                ; +0x38, 0x10005f9c0\nFMOV            S1, WZR                                                ; +0x3c, 0x10005f9c4\nFMOV            S3, S2                                                 ; +0x40, 0x10005f9c8\nBL              sub_100022990                                          ; +0x44, 0x10005f9cc\nMOV             X1, SP                                                 ; +0x48, 0x10005f9d0\nMOV             X0, X20                                                ; +0x4c, 0x10005f9d4\nBL              cocos2d__extension__CCScale9Sprite__create             ; +0x50, 0x10005f9d8\nMOV             X20, X0                                                ; +0x54, 0x10005f9dc\nSTR             X0, [X19,#0x288]                                       ; +0x58, 0x10005f9e0\nMOV             X0, SP                                                 ; +0x5c, 0x10005f9e4\nFMOV            S0, #16.0                                              ; +0x60, 0x10005f9e8\nFMOV            S1, #16.0                                              ; +0x64, 0x10005f9ec\nBL              sub_100022988                                          ; +0x68, 0x10005f9f0\nLDR             X8, [X20]                                              ; +0x6c, 0x10005f9f4\nLDR             X8, [X8,#0x130]                                        ; +0x70, 0x10005f9f8\nMOV             X1, SP                                                 ; +0x74, 0x10005f9fc\nMOV             X0, X20                                                ; +0x78, 0x10005fa00\nBLR             X8                                                     ; +0x7c, 0x10005fa04\nLDR             X1, [X19,#0x288]                                       ; +0x80, 0x10005fa08\nLDR             X8, [X19]                                              ; +0x84, 0x10005fa0c\nLDR             X8, [X8,#0x1C0]                                        ; +0x88, 0x10005fa10\nMOV             X0, X19                                                ; +0x8c, 0x10005fa14\nMOV             W2, #0                                                 ; +0x90, 0x10005fa18\nBLR             X8                                                     ; +0x94, 0x10005fa1c\nLDR             W8, [X19,#0x254]                                       ; +0x98, 0x10005fa20\nCMP             W8, #1                                                 ; +0x9c, 0x10005fa24\nB.NE            loc_10005FA80                                          ; +0xa0, 0x10005fa28\nADD             X1, X19, #0x2A0                                        ; +0xa4, 0x10005fa2c\nLDRSB           W8, [X19,#0x2B7]                                       ; +0xa8, 0x10005fa30\nTBZ             W8, #0x1F, loc_10005FA3C                               ; +0xac, 0x10005fa34\nLDR             X1, [X1]                                               ; +0xb0, 0x10005fa38\nMOV             X0, X19                                                ; +0xb4, 0x10005fa3c\nBL              ButtonSprite__setString                                ; +0xb8, 0x10005fa40\nB               loc_10005FA88                                          ; +0xbc, 0x10005fa44\nLDR             X19, [X19,#0x280]                                      ; +0xc0, 0x10005fa48\nCBZ             X19, loc_10005FA88                                     ; +0xc4, 0x10005fa4c\nBL              cocos2d__CCTextureCache__sharedTextureCache            ; +0xc8, 0x10005fa50\nMOV             X1, X20                                                ; +0xcc, 0x10005fa54\nMOV             W2, #0                                                 ; +0xd0, 0x10005fa58\nBL              cocos2d__CCTextureCache__addImage                      ; +0xd4, 0x10005fa5c\nMOV             X1, X0                                                 ; +0xd8, 0x10005fa60\nLDR             X8, [X19]                                              ; +0xdc, 0x10005fa64\nLDR             X2, [X8,#0x418]                                        ; +0xe0, 0x10005fa68\nMOV             X0, X19                                                ; +0xe4, 0x10005fa6c\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xe8, 0x10005fa70\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xec, 0x10005fa74\nADD             SP, SP, #0x30 ; '0'                                    ; +0xf0, 0x10005fa78\nBR              X2                                                     ; +0xf4, 0x10005fa7c\nMOV             X0, X19                                                ; +0xf8, 0x10005fa80\nBL              ButtonSprite__updateSpriteBGSize                       ; +0xfc, 0x10005fa84\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0x100, 0x10005fa88\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0x104, 0x10005fa8c\nADD             SP, SP, #0x30 ; '0'                                    ; +0x108, 0x10005fa90\nRET                                                                    ; +0x10c, 0x10005fa94", "xrefs": ["LevelInfoLayer::confirmOwnerDelete @ 0x100028998", "SetupAreaMoveTriggerPopup::onMode @ 0x100035fd0", "SetGroupIDLayer::updateZLayerButtons @ 0x10003deb4", "CustomizeObjectLayer::onSelectMode @ 0x10004f5c0", "CustomizeObjectLayer::onSelectMode @ 0x10004f5e0", "CustomizeObjectLayer::onSelectMode @ 0x10004f604", "CustomizeObjectLayer::highlightSelected @ 0x100050670", "CustomizeObjectLayer::highlightSelected @ 0x100050698", "MoreSearchLayer::onSongMode @ 0x100056c80", "MoreSearchLayer::onSongMode @ 0x100056c98", "RateStarsLayer::selectRating @ 0x1000808bc", "ColorSelectLiveOverlay::onSelectTab @ 0x1000f6394", "GJUserCell::onUnblockUser @ 0x1001116f0", "GJUserCell::onCancelFriendRequest @ 0x1001117fc", "GJUserCell::onRemoveFriend @ 0x10011198c", "GJRequestCell::onDeleteRequest @ 0x1001120e8", "GJMessageCell::onDeleteMessage @ 0x10011276c", "CharacterColorPage::updateColorMode @ 0x10012a010", "SongSelectNode::onSongMode @ 0x100147970", "SongSelectNode::onSongMode @ 0x100147988", "AccountLayer::onBackup @ 0x100165f18", "AccountHelpLayer::onUnlink @ 0x10016753c", "AccountHelpLayer::verifyUnlink @ 0x10016791c", "LevelSettingsLayer::updateGameplayModeButtons @ 0x10017b534", "LevelSettingsLayer::updateGameplayModeButtons @ 0x10017b564", "SelectArtLayer::onSelectCustom @ 0x10017ce84", "SetupAudioTriggerPopup::onProxMode @ 0x10017f0ec", "SetupShaderEffectPopup::updateZLayerButtons @ 0x100189d2c", "ProfilePage::onFriend @ 0x10019af6c", "ProfilePage::onBlockUser @ 0x10019b194", "HSVLiveOverlay::createHSVWidget @ 0x10019ffc0", "GJSpecialColorSelect::highlightSelected @ 0x1001af628", "GJSpecialColorSelect::highlightSelected @ 0x1001af660", "GJRateLevelLayer::selectRating @ 0x1001b16f4", "GJRateLevelLayer::onCustomButton @ 0x1001b1968", "FRequestProfilePage::onDeleteSelected @ 0x1001b6bf0", "MessagesProfilePage::onDeleteSelected @ 0x1001cca9c", "SetupSequenceTriggerPopup::onSelect @ 0x1001d36e8", "SetupSequenceTriggerPopup::onSelect @ 0x1001d3724", "ShareLevelLayer::selectRating @ 0x100276174", "CreateParticlePopup::onMode @ 0x1002cdd60", "CreateParticlePopup::onMode @ 0x1002cdd80", "CreateParticlePopup::onMode @ 0x1002cddac", "CreateParticlePopup::onPage @ 0x1002cdfa4", "FriendRequestPopup::onBlock @ 0x1002d9ca8", "GJMessagePopup::onBlock @ 0x1002db42c", "GJMessagePopup::onRemove @ 0x1002db548", "GJWriteMessagePopup::onClearBody @ 0x1002dcde0", "SetupGradientPopup::updateZLayerButtons @ 0x1003435f4", "InfoLayer::init @ 0x100350d3c", "InfoLayer::init @ 0x100350db8", "InfoLayer::updateCommentModeButtons @ 0x100351ecc", "InfoLayer::updateCommentModeButtons @ 0x100351ee4", "LeaderboardsLayer::toggleTabButtons @ 0x1003b1cb4", "SetupPulsePopup::onSelectTargetMode @ 0x1003b6198", "SetupPulsePopup::onSelectTargetMode @ 0x1003b61b0", "SetupPulsePopup::onSelectPulseMode @ 0x1003b6404", "SetupPulsePopup::onSelectPulseMode @ 0x1003b6420", "MusicBrowser::setupList @ 0x1003c26a0", "MusicBrowser::setupList @ 0x1003c26c4", "EditorUI::toggleSwipe @ 0x1003c7240", "EditorUI::toggleFreeMove @ 0x1003c7340", "EditorUI::toggleSnap @ 0x1003c73d0", "EditorUI::toggleEnableRotate @ 0x1003c742c", "EditorUI::toggleEnableRotate @ 0x1003c744c", "EditorUI::updateDeleteButtons @ 0x1003e9530", "EditorUI::updateDeleteButtons @ 0x1003e954c", "EditorUI::updateDeleteButtons @ 0x1003e9568", "EditorUI::updateDeleteButtons @ 0x1003e9584", "LevelBrowserLayer::onDeleteSelected @ 0x100416050", "FollowRewardPage::onSpecialItem @ 0x100425864"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}