{"type": "func", "start": 6337504, "end": 6337824, "name": "CustomSongCell::onDelete", "pseudocode": "// \n// CustomSongCell::onDelete from 0x60b3e0 to 0x60b520 (320 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x62bb0\n// > CustomSongCell::loadFromObject @ 0x61568c\n// > <???> @ 0x122b310\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 CustomSongCell::onDelete(CustomSongCell *a1, cocos2d::CCObject *a2)\n{\n  FMODAudioEngine *v3; // x22\n  MusicDownloadManager *v4; // x0\n  _BOOL4 isMusicPlaying; // w21\n  void *v6; // x0\n  MusicDownloadManager *v7; // x0\n  FMODAudioEngine *v8; // x0\n  unsigned int *v9; // x2\n  int v10; // w1\n  __int64 v11; // [xsp+40h] [xbp+40h] BYREF\n\n  if ( a1->m_songInfoObject )\n  {\n    v3 = FMODAudioEngine::sharedEngine();\n    v4 = MusicDownloadManager::sharedState();\n    MusicDownloadManager::pathForSong(&v11, v4, a1->m_songInfoObject->m_songID);\n    isMusicPlaying = FMODAudioEngine::isMusicPlaying(v3, (int)&v11);\n    v6 = (void *)(v11 - 24);\n    if ( (__int64 *)(v11 - 24) != &qword_124B6B0 )\n    {\n      if ( &pthread_create )\n      {\n        v9 = (unsigned int *)(v11 - 8);\n        do\n          v10 = __ldaxr(v9);\n        while ( __stlxr(v10 - 1, v9) );\n      }\n      else\n      {\n        v10 = *(_DWORD *)(v11 - 8);\n        *(_DWORD *)(v11 - 8) = v10 - 1;\n      }\n      if ( v10 <= 0 )\n        operator delete(v6);\n    }\n    if ( isMusicPlaying )\n    {\n      v8 = FMODAudioEngine::sharedEngine();\n      FMODAudioEngine::stopAllMusic(v8, 1);\n    }\n    v7 = MusicDownloadManager::sharedState();\n    MusicDownloadManager::deleteSong(v7, a1->m_songInfoObject->m_songID);\n  }\n  TableView::deleteTableViewCell(a1->m_tableView, a1);\n}", "assembly": "; \n; CustomSongCell::onDelete from 0x60b3e0 to 0x60b520 (320 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x62bb0\n; > CustomSongCell::loadFromObject @ 0x61568c\n; > <???> @ 0x122b310\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\nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x60b3e0\nMOV             X29, SP                                                ; +0x4, 0x60b3e4\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x60b3e8\nADRP            X20, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x60b3ec\nMOV             X19, X0                                                ; +0x10, 0x60b3f0\nLDR             X0, [X0,#0x220]; this                                  ; +0x14, 0x60b3f4\nSTP             X21, X22, [SP,#0x50+var_30]                            ; +0x18, 0x60b3f8\nLDR             X1, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x60b3fc\nLDR             X1, [X1]                                               ; +0x20, 0x60b400\nSTR             X1, [X29,#0x50+var_8]                                  ; +0x24, 0x60b404\nCBZ             X0, loc_60B46C                                         ; +0x28, 0x60b408\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x2c, 0x60b40c\nMOV             X22, X0                                                ; +0x30, 0x60b410\nBL              _ZN20MusicDownloadManager11sharedStateEv; MusicDownloadManager::sharedState(void) ; +0x34, 0x60b414\nADD             X21, X29, #0x50+var_10                                 ; +0x38, 0x60b418\nLDR             X1, [X19,#0x220]                                       ; +0x3c, 0x60b41c\nMOV             X8, X21                                                ; +0x40, 0x60b420\nLDR             W1, [X1,#0x13C]; int                                   ; +0x44, 0x60b424\nBL              _ZN20MusicDownloadManager11pathForSongEi; MusicDownloadManager::pathForSong(int) ; +0x48, 0x60b428\nMOV             X0, X22; int                                           ; +0x4c, 0x60b42c\nMOV             X1, X21; int                                           ; +0x50, 0x60b430\nMOV             W2, #0; int                                            ; +0x54, 0x60b434\nBL              _ZN15FMODAudioEngine14isMusicPlayingESsi; FMODAudioEngine::isMusicPlaying(std::string,int) ; +0x58, 0x60b438\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x5c, 0x60b43c\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x60, 0x60b440\nUXTB            W21, W0                                                ; +0x64, 0x60b444\nSUB             X0, X2, #0x18; this                                    ; +0x68, 0x60b448\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x6c, 0x60b44c\nCMP             X0, X1                                                 ; +0x70, 0x60b450\nB.NE            loc_60B4AC                                             ; +0x74, 0x60b454\nCBNZ            W21, loc_60B49C                                        ; +0x78, 0x60b458\nBL              _ZN20MusicDownloadManager11sharedStateEv; MusicDownloadManager::sharedState(void) ; +0x7c, 0x60b45c\nLDR             X1, [X19,#0x220]                                       ; +0x80, 0x60b460\nLDR             W1, [X1,#0x13C]; int                                   ; +0x84, 0x60b464\nBL              _ZN20MusicDownloadManager10deleteSongEi; MusicDownloadManager::deleteSong(int) ; +0x88, 0x60b468\nLDR             X0, [X19,#0x1A0]; this                                 ; +0x8c, 0x60b46c\nMOV             X1, X19; TableViewCell *                               ; +0x90, 0x60b470\nBL              _ZN9TableView19deleteTableViewCellEP13TableViewCell; TableView::deleteTableViewCell(TableViewCell *) ; +0x94, 0x60b474\nLDR             X20, [X20,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x98, 0x60b478\nLDR             X1, [X29,#0x50+var_8]                                  ; +0x9c, 0x60b47c\nLDR             X0, [X20]                                              ; +0xa0, 0x60b480\nCMP             X1, X0                                                 ; +0xa4, 0x60b484\nB.NE            loc_60B4F0                                             ; +0xa8, 0x60b488\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xac, 0x60b48c\nLDP             X21, X22, [SP,#0x50+var_30]                            ; +0xb0, 0x60b490\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xb4, 0x60b494\nRET                                                                    ; +0xb8, 0x60b498\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0xbc, 0x60b49c\nMOV             W1, #1; bool                                           ; +0xc0, 0x60b4a0\nBL              _ZN15FMODAudioEngine12stopAllMusicEb; FMODAudioEngine::stopAllMusic(bool) ; +0xc4, 0x60b4a4\nB               loc_60B45C                                             ; +0xc8, 0x60b4a8\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xcc, 0x60b4ac\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xd0, 0x60b4b0\nCBZ             X1, loc_60B4E0                                         ; +0xd4, 0x60b4b4\nSUB             X2, X2, #8                                             ; +0xd8, 0x60b4b8\nLDAXR           W1, [X2]                                               ; +0xdc, 0x60b4bc\nSUB             W3, W1, #1                                             ; +0xe0, 0x60b4c0\nSTLXR           W4, W3, [X2]                                           ; +0xe4, 0x60b4c4\nCBNZ            W4, loc_60B4BC                                         ; +0xe8, 0x60b4c8\nCMP             W1, WZR                                                ; +0xec, 0x60b4cc\nB.GT            loc_60B458                                             ; +0xf0, 0x60b4d0\nADD             X1, X29, #0x50+var_18                                  ; +0xf4, 0x60b4d4\nBL              j__ZdlPv; operator delete(void *)                      ; +0xf8, 0x60b4d8\nB               loc_60B458                                             ; +0xfc, 0x60b4dc\nLDUR            W1, [X2,#-8]                                           ; +0x100, 0x60b4e0\nSUB             W3, W1, #1                                             ; +0x104, 0x60b4e4\nSTUR            W3, [X2,#-8]                                           ; +0x108, 0x60b4e8\nB               loc_60B4CC                                             ; +0x10c, 0x60b4ec\nBL              .__stack_chk_fail                                      ; +0x110, 0x60b4f0\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x114, 0x60b4f4\nMOV             X19, X0                                                ; +0x118, 0x60b4f8\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x11c, 0x60b4fc\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x120, 0x60b500\nSUB             X0, X0, #0x18                                          ; +0x124, 0x60b504\nCMP             X0, X1                                                 ; +0x128, 0x60b508\nB.EQ            loc_60B518                                             ; +0x12c, 0x60b50c\nADD             X1, X29, #0x50+var_18                                  ; +0x130, 0x60b510\nBL              sub_4DB620                                             ; +0x134, 0x60b514\nMOV             X0, X19                                                ; +0x138, 0x60b518\nBL              _Unwind_Resume                                         ; +0x13c, 0x60b51c", "xrefs": ["<???> @ 0x62bb0", "CustomSongCell::loadFromObject @ 0x61568c", "<???> @ 0x122b310"], "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"}