//
// ButtonSprite::updateBGImage from 0x1000686cc to 0x1000687dc (272 bytes)
//
// 108 xrefs:
// > sub_10002BEC8 @ 0x10002c01c
// > sub_1000397FC @ 0x10003995c
// > sub_1000417B4 @ 0x100041818
// > CustomizeObjectLayer::onSelectMode @ 0x100057d94
// > CustomizeObjectLayer::onSelectMode @ 0x100057db4
// > CustomizeObjectLayer::onSelectMode @ 0x100057dd8
// > CustomizeObjectLayer::highlightSelected @ 0x100058e8c
// > CustomizeObjectLayer::highlightSelected @ 0x100058eb4
// > MoreSearchLayer::onSongMode @ 0x10005f4c4
// > MoreSearchLayer::onSongMode @ 0x10005f4dc
// > sub_100088FD4 @ 0x100089070
// > sub_10011AA00 @ 0x10011aaf0
// > sub_10013AB44 @ 0x10013ac4c
// > sub_10013AF0C @ 0x10013af98
// > CharacterColorPage::updateColorMode @ 0x100153a40
// > EditorUI::setDpadStep @ 0x100186b9c
// > EditorUI::updateDeleteButtons @ 0x100187828
// > EditorUI::updateDeleteButtons @ 0x100187844
// > EditorUI::updateDeleteButtons @ 0x100187860
// > EditorUI::updateDeleteButtons @ 0x10018787c
// > sub_1001891C4 @ 0x100189240
// > sub_1001AA740 @ 0x1001aa7ac
// > SongSelectNode::onSongMode @ 0x1001c6274
// > SongSelectNode::onSongMode @ 0x1001c628c
// > sub_1001EEB58 @ 0x1001eecc0
// > sub_1001F0210 @ 0x1001f02e8
// > sub_1001F0644 @ 0x1001f06c8
// > sub_1001F62F0 @ 0x1001f633c
// > sub_1001F62F0 @ 0x1001f6360
// > sub_1001F62F0 @ 0x1001f6388
// > sub_10020CB80 @ 0x10020cbfc
// > sub_10020CB80 @ 0x10020cc2c
// > sub_10020E4E0 @ 0x10020e564
// > sub_100211DD0 @ 0x100211e6c
// > sub_10021CC30 @ 0x10021ccb8
// > ProfilePage::onFriend @ 0x10022dc90
// > sub_10022DE90 @ 0x10022dfa8
// > sub_10022F9F0 @ 0x10022faa0
// > HSVLiveOverlay::createHSVWidget @ 0x100234d94
// > sub_1002446B0 @ 0x100244714
// > sub_1002446B0 @ 0x10024474c
// > sub_10024658C @ 0x100246628
// > GJRateLevelLayer::onCustomButton @ 0x1002468a4
// > sub_10024C070 @ 0x10024c1e8
// > sub_100264808 @ 0x100264918
// > SetupSequenceTriggerPopup::onSelect @ 0x10026b6b8
// > SetupSequenceTriggerPopup::onSelect @ 0x10026b6f4
// > sub_100272BF4 @ 0x100272d2c
// > sub_100272DA8 @ 0x100272edc
// > sub_100272FF8 @ 0x10027312c
// > ShareLevelLayer::selectRating @ 0x100313fbc
// > sub_10036CCF4 @ 0x10036cd5c
// > sub_10036CCF4 @ 0x10036cd7c
// > sub_10036CCF4 @ 0x10036cda8
// > sub_10036CF0C @ 0x10036cfa0
// > sub_100378BB0 @ 0x100378c80
// > sub_10037A2A8 @ 0x10037a320
// > sub_10037A374 @ 0x10037a460
// > sub_1003E1D98 @ 0x1003e1dfc
// > InfoLayer::init @ 0x1003ef0f0
// > InfoLayer::init @ 0x1003ef4a0
// > InfoLayer::init @ 0x1003ef51c
// > sub_1003F0408 @ 0x1003f0458
// > sub_1003F04AC @ 0x1003f0500
// > sub_1003F04AC @ 0x1003f0518
// > sub_100458A50 @ 0x100458c94
// > sub_10045CE68 @ 0x10045cef8
// > sub_10045CE68 @ 0x10045cf10
// > sub_10045D094 @ 0x10045d0f0
// > sub_10045D094 @ 0x10045d10c
// > sub_100469F94 @ 0x10046a368
// > sub_100469F94 @ 0x10046a38c
// > sub_10046A558 @ 0x10046a5a4
// > sub_10046A558 @ 0x10046a5c8
// > sub_10046A558 @ 0x10046a5fc
// > EditorUI::toggleMode @ 0x100470c88
// > EditorUI::toggleSwipe @ 0x100470ce0
// > EditorUI::toggleFreeMove @ 0x100470df8
// > EditorUI::toggleSnap @ 0x100470e8c
// > EditorUI::toggleEnableRotate @ 0x100470f14
// > EditorUI::toggleEnableRotate @ 0x100470f34
// > EditorUI::resetUI @ 0x100471764
// > EditorUI::resetUI @ 0x10047177c
// > EditorUI::resetUI @ 0x100471794
// > EditorUI::resetUI @ 0x1004717ac
// > LevelBrowserLayer::onProcessSelected @ 0x100497344
// > sub_1004A7AD4 @ 0x1004a7eb4
// > sub_1004AA378 @ 0x1004aa438
// > sub_1004B7D20 @ 0x1004b7da4
// > sub_1004B96F0 @ 0x1004b977c
// > sub_1004C6460 @ 0x1004c64a0
// > sub_1004F5774 @ 0x1004f5a60
// > sub_1004FA25C @ 0x1004fa4d4
// > sub_100507D2C @ 0x100507e68
// > sub_10050D170 @ 0x10050d200
// > sub_10050D5B0 @ 0x10050d63c
// > sub_10050D67C @ 0x10050d78c
// > sub_10050D7D0 @ 0x10050d8e4
// > sub_1005105C8 @ 0x100510670
// > sub_10051CF84 @ 0x10051d010
// > sub_10051F2B8 @ 0x10051f354
// > sub_100521918 @ 0x100521d9c
// > sub_100529874 @ 0x1005298d4
// > sub_1005298E4 @ 0x1005299f8
// > sub_1005428CC @ 0x10054290c
// > sub_10054975C @ 0x1005498d4
// > sub_100549BA8 @ 0x100549d0c
// > sub_10054A0EC @ 0x10054a1fc
//
// 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 10:57:57 +0000
//
void *__fastcall ButtonSprite::updateBGImage(__int64 a1, __int64 a2)
{
void *result; // x0
__int64 v5; // x20
const std::string::value_type *v6; // x1
__int64 v7; // x19
__int64 v8; // x0
__int64 v9; // x0
float v10[4]; // [xsp+0h] [xbp-20h] BYREF
result = *(void **)(a1 + 648);
if ( result )
{
(*(void (__fastcall **)(void *))(*(_QWORD *)result + 536LL))(result);
sub_1000262CC(v10, 0.0, 0.0, 40.0, 40.0);
v5 = cocos2d::extension::CCScale9Sprite::create(a2, v10);
*(_QWORD *)(a1 + 648) = v5;
sub_1000262C4(v10, 16.0, 16.0);
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v5 + 320LL))(v5, v10);
(*(void (__fastcall **)(__int64, _QWORD, _QWORD))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 648), 0);
if ( *(_DWORD *)(a1 + 596) == 1 )
{
v6 = (const std::string::value_type *)(a1 + 672);
if ( *(char *)(a1 + 695) < 0 )
v6 = *(const std::string::value_type **)v6;
return (void *)ButtonSprite::setString(a1, v6);
}
else
{
return ButtonSprite::updateSpriteBGSize(a1);
}
}
else
{
v7 = *(_QWORD *)(a1 + 640);
if ( v7 )
{
v8 = cocos2d::CCTextureCache::sharedTextureCache();
v9 = cocos2d::CCTextureCache::addImage(v8, a2, 0);
return (void *)(*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 1064LL))(v7, v9);
}
}
return result;
}