//
// EditorUI::updatePlaybackBtn from 0x1401b4630 to 0x1401b475f (303 bytes)
//
// 9 xrefs:
// > EditorUI::onPause @ 0x1401acda9
// > EditorUI::onPlayback @ 0x1401b459d
// > EditorUI::songStateChanged @ 0x1401b4767
// > EditorUI::onPlaytest @ 0x1401b4945
// > EditorUI::playtestStopped @ 0x1401b4a94
// > ??> @ 0x1408a1a04
// > ??> @ 0x1408a1a14
// > ??> @ 0x14091a0cc
// > ??> @ 0x14091a0d8
//
// 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 11:27:57 +0000
//
__int64 __fastcall EditorUI::updatePlaybackBtn(__int64 a1)
{
int v2; // ebp
_QWORD *v3; // rax
_QWORD *v4; // rsi
__int64 v5; // rbx
cocos2d::CCSpriteFrameCache *v6; // rax
const char *v7; // rdx
struct cocos2d::CCSpriteFrame *v8; // rax
__int64 v9; // rax
__int16 *v10; // rdx
__int64 v11; // rdx
__int64 result; // rax
v2 = *(_DWORD *)(*(_QWORD *)(a1 + 1512) + 2204LL);
v3 = (_QWORD *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1040) + 952LL))(*(_QWORD *)(a1 + 1040));
v4 = v3;
if ( !*(_BYTE *)(a1 + 664) || v2 )
{
v5 = *v3;
v6 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v7 = "GJ_playMusicBtn_001.png";
}
else
{
v5 = *v3;
v6 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();
v7 = "GJ_stopMusicBtn_001.png";
}
v8 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v6, v7);
(*(void (__fastcall **)(_QWORD *, struct cocos2d::CCSpriteFrame *))(v5 + 1008))(v4, v8);
*(_BYTE *)(*(_QWORD *)(a1 + 1040) + 408LL) = v2 == 0;
v9 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1040) + 952LL))(*(_QWORD *)(a1 + 1040));
v10 = &word_140703290;
if ( !v2 )
v10 = &word_14070329C;
(**(void (__fastcall ***)(__int64, __int16 *))(v9 + 320))(v9 + 320, v10);
v11 = 175;
if ( !v2 )
v11 = 255;
result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)(*(_QWORD *)(a1 + 1040) + 320LL) + 40LL))(
*(_QWORD *)(a1 + 1040) + 320LL,
v11);
*(_BYTE *)(a1 + 716) = *(_BYTE *)(a1 + 664) && (result = *(_QWORD *)(a1 + 1512), !*(_DWORD *)(result + 2204));
return result;
}