{"type": "func", "start": 5370200416, "end": 5370200698, "name": "CustomSongWidget::updatePlaybackBtn", "pseudocode": "// \n// CustomSongWidget::updatePlaybackBtn from 0x14016c160 to 0x14016c27a (282 bytes)\n// \n// 3 xrefs:\n// > CustomSongWidget::init @ 0x14016a686\n// > CustomSongWidget::songStateChanged @ 0x14016c36d\n// > <???> @ 0x140918158\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:27:29 +0000\n// \n\n// Hidden C++ exception states: #wind=3\nvoid __fastcall CustomSongWidget::updatePlaybackBtn(__int64 a1)\n{\n  __int64 *v2; // rdi\n  __int64 v3; // rcx\n  _QWORD *v4; // rbx\n  _QWORD *v5; // rcx\n  bool isMusicPlaying; // al\n  __int64 v7; // rbx\n  cocos2d::CCSpriteFrameCache *v8; // rax\n  const char *v9; // rdx\n  struct cocos2d::CCSpriteFrame *v10; // rax\n  _BYTE v11[40]; // [rsp+20h] [rbp-28h] BYREF\n  void *v12; // [rsp+58h] [rbp+10h]\n  void *v13; // [rsp+58h] [rbp+10h]\n\n  if ( *(_QWORD *)(a1 + 336) )\n  {\n    v2 = (__int64 *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 416) + 952LL))(*(_QWORD *)(a1 + 416));\n    v3 = qword_14090C070;\n    if ( !qword_14090C070 )\n    {\n      v12 = operator new(0x3D0u);\n      qword_14090C070 = MusicDownloadManager::MusicDownloadManager(v12);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090C070 + 72LL))(qword_14090C070);\n      v3 = qword_14090C070;\n    }\n    v4 = (_QWORD *)MusicDownloadManager::pathForSong(v3, v11, *(unsigned int *)(*(_QWORD *)(a1 + 336) + 320LL));\n    v5 = (_QWORD *)qword_14090BF60;\n    if ( !qword_14090BF60 )\n    {\n      v13 = operator new(0x8A8u);\n      qword_14090BF60 = FMODAudioEngine::FMODAudioEngine((__int64)v13);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BF60 + 72LL))(qword_14090BF60);\n      v5 = (_QWORD *)qword_14090BF60;\n    }\n    isMusicPlaying = FMODAudioEngine::isMusicPlaying(v5, v4);\n    v7 = *v2;\n    if ( isMusicPlaying )\n    {\n      v8 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n      v9 = \"GJ_stopMusicBtn_001.png\";\n    }\n    else\n    {\n      v8 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n      v9 = \"GJ_playMusicBtn_001.png\";\n    }\n    v10 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v8, v9);\n    (*(void (__fastcall **)(__int64 *, struct cocos2d::CCSpriteFrame *))(v7 + 1008))(v2, v10);\n  }\n}", "assembly": "; \n; CustomSongWidget::updatePlaybackBtn from 0x14016c160 to 0x14016c27a (282 bytes)\n; \n; 3 xrefs:\n; > CustomSongWidget::init @ 0x14016a686\n; > CustomSongWidget::songStateChanged @ 0x14016c36d\n; > <???> @ 0x140918158\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:27:29 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x14016c160\npush    rdi                                                            ; +0x5, 0x14016c165\nsub     rsp, 40h                                                       ; +0x6, 0x14016c166\nmov     rbx, rcx                                                       ; +0xa, 0x14016c16a\ncmp     qword ptr [rcx+150h], 0                                        ; +0xd, 0x14016c16d\njz      loc_14016C26F                                                  ; +0x15, 0x14016c175\nmov     rcx, [rcx+1A0h]                                                ; +0x1b, 0x14016c17b\nmov     rax, [rcx]                                                     ; +0x22, 0x14016c182\ncall    qword ptr [rax+3B8h]                                           ; +0x25, 0x14016c185\nmov     rdi, rax                                                       ; +0x2b, 0x14016c18b\nlea     rax, [rsp+48h+var_28]                                          ; +0x2e, 0x14016c18e\nmov     [rsp+48h+arg_0], rax                                           ; +0x33, 0x14016c193\nmov     rcx, cs:qword_14090C070                                        ; +0x38, 0x14016c198\ntest    rcx, rcx                                                       ; +0x3f, 0x14016c19f\njnz     short loc_14016C1D6                                            ; +0x42, 0x14016c1a2\nmov     ecx, 3D0h; Size                                                ; +0x44, 0x14016c1a4\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x49, 0x14016c1a9\nmov     [rsp+48h+arg_8], rax                                           ; +0x4e, 0x14016c1ae\nmov     rcx, rax                                                       ; +0x53, 0x14016c1b3\ncall    MusicDownloadManager__MusicDownloadManager                     ; +0x56, 0x14016c1b6\nnop                                                                    ; +0x5b, 0x14016c1bb\nmov     cs:qword_14090C070, rax                                        ; +0x5c, 0x14016c1bc\nmov     rcx, [rax]                                                     ; +0x63, 0x14016c1c3\nmov     rdx, [rcx+48h]                                                 ; +0x66, 0x14016c1c6\nmov     rcx, rax                                                       ; +0x6a, 0x14016c1ca\ncall    rdx                                                            ; +0x6d, 0x14016c1cd\nmov     rcx, cs:qword_14090C070                                        ; +0x6f, 0x14016c1cf\nmov     r8, [rbx+150h]                                                 ; +0x76, 0x14016c1d6\nmov     r8d, [r8+140h]                                                 ; +0x7d, 0x14016c1dd\nlea     rdx, [rsp+48h+var_28]                                          ; +0x84, 0x14016c1e4\ncall    MusicDownloadManager__pathForSong                              ; +0x89, 0x14016c1e9\nmov     rbx, rax                                                       ; +0x8e, 0x14016c1ee\nmov     rcx, cs:qword_14090BF60                                        ; +0x91, 0x14016c1f1\ntest    rcx, rcx                                                       ; +0x98, 0x14016c1f8\njnz     short loc_14016C22F                                            ; +0x9b, 0x14016c1fb\nmov     ecx, 8A8h; Size                                                ; +0x9d, 0x14016c1fd\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xa2, 0x14016c202\nmov     [rsp+48h+arg_8], rax                                           ; +0xa7, 0x14016c207\nmov     rcx, rax                                                       ; +0xac, 0x14016c20c\ncall    FMODAudioEngine__FMODAudioEngine                               ; +0xaf, 0x14016c20f\nnop                                                                    ; +0xb4, 0x14016c214\nmov     cs:qword_14090BF60, rax                                        ; +0xb5, 0x14016c215\nmov     rcx, [rax]                                                     ; +0xbc, 0x14016c21c\nmov     rdx, [rcx+48h]                                                 ; +0xbf, 0x14016c21f\nmov     rcx, rax                                                       ; +0xc3, 0x14016c223\ncall    rdx                                                            ; +0xc6, 0x14016c226\nmov     rcx, cs:qword_14090BF60                                        ; +0xc8, 0x14016c228\nmov     rdx, rbx                                                       ; +0xcf, 0x14016c22f\ncall    FMODAudioEngine__isMusicPlaying                                ; +0xd2, 0x14016c232\nmov     rbx, [rdi]                                                     ; +0xd7, 0x14016c237\ntest    al, al                                                         ; +0xda, 0x14016c23a\njz      short loc_14016C24D                                            ; +0xdc, 0x14016c23c\ncall    cs:?sharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0xde, 0x14016c23e\nlea     rdx, aGjStopmusicbtn; \"GJ_stopMusicBtn_001.png\"                ; +0xe4, 0x14016c244\njmp     short loc_14016C25A                                            ; +0xeb, 0x14016c24b\ncall    cs:?sharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(void) ; +0xed, 0x14016c24d\nlea     rdx, aGjPlaymusicbtn; \"GJ_playMusicBtn_001.png\"                ; +0xf3, 0x14016c253\nmov     rcx, rax                                                       ; +0xfa, 0x14016c25a\ncall    cs:?spriteFrameByName@CCSpriteFrameCache@cocos2d@@QEAAPEAVCCSpriteFrame@2@PEBD@Z; cocos2d::CCSpriteFrameCache::spriteFrameByName(char const *) ; +0xfd, 0x14016c25d\nmov     rdx, rax                                                       ; +0x103, 0x14016c263\nmov     rcx, rdi                                                       ; +0x106, 0x14016c266\ncall    qword ptr [rbx+3F0h]                                           ; +0x109, 0x14016c269\nmov     rbx, [rsp+48h+arg_10]                                          ; +0x10f, 0x14016c26f\nadd     rsp, 40h                                                       ; +0x114, 0x14016c274\npop     rdi                                                            ; +0x118, 0x14016c278\nretn                                                                   ; +0x119, 0x14016c279", "xrefs": ["CustomSongWidget::init @ 0x14016a686", "CustomSongWidget::songStateChanged @ 0x14016c36d", "<???> @ 0x140918158"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}