{"type": "func", "start": 4296152720, "end": 4296153004, "name": "CustomSongWidget::deleteSong", "pseudocode": "// \n// CustomSongWidget::deleteSong from 0x100121690 to 0x1001217ac (284 bytes)\n// \n// 1 xrefs:\n// > CustomSongWidget::FLAlert_Clicked @ 0x10012312c\n// \n// This function is hookable on this platform (idp: arm, 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 10:59:16 +0000\n// \n\n__int64 __fastcall CustomSongWidget::deleteSong(__int64 result)\n{\n  __int64 v1; // x19\n  __int64 v2; // x20\n  __int64 v3; // x0\n  __int64 isMusicPlaying; // x0\n  int v5; // w20\n  __int64 v6; // x0\n  __int64 v7; // x0\n  __int64 v8; // x0\n  float v9; // s0\n  float v10; // s1\n  __int16 v11; // [xsp+4h] [xbp-2Ch] BYREF\n  char v12; // [xsp+6h] [xbp-2Ah]\n  void *__p[2]; // [xsp+8h] [xbp-28h] BYREF\n  char v14; // [xsp+1Fh] [xbp-11h]\n\n  if ( !*(_QWORD *)(result + 336) )\n    return result;\n  v1 = result;\n  v2 = FMODAudioEngine::sharedEngine(result);\n  v3 = MusicDownloadManager::sharedState(v2);\n  MusicDownloadManager::pathForSong(__p, v3, *(unsigned int *)(*(_QWORD *)(v1 + 336) + 316LL));\n  isMusicPlaying = FMODAudioEngine::isMusicPlaying(v2, __p, 0);\n  v5 = isMusicPlaying;\n  if ( v14 < 0 )\n  {\n    operator delete(__p[0]);\n    if ( !v5 )\n      goto LABEL_5;\n    goto LABEL_4;\n  }\n  if ( (_DWORD)isMusicPlaying )\n  {\nLABEL_4:\n    v6 = FMODAudioEngine::sharedEngine(isMusicPlaying);\n    isMusicPlaying = FMODAudioEngine::stopAllMusic(v6, 1);\n  }\nLABEL_5:\n  v7 = MusicDownloadManager::sharedState(isMusicPlaying);\n  MusicDownloadManager::deleteSong(v7, *(unsigned int *)(*(_QWORD *)(v1 + 336) + 316LL));\n  CustomSongWidget::updateSongInfo(v1);\n  v8 = *(_QWORD *)(v1 + 376);\n  v12 = 0;\n  v11 = 25855;\n  (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v8 + 1072LL))(v8, &v11);\n  (*(void (__fastcall **)(_QWORD, const char *))(**(_QWORD **)(v1 + 376) + 928LL))(\n    *(_QWORD *)(v1 + 376),\n    \"Song Deleted\");\n  if ( *(_BYTE *)(v1 + 501) == 1 )\n  {\n    v9 = 140.0;\n    v10 = 0.35;\n  }\n  else\n  {\n    v9 = 230.0;\n    v10 = 0.4;\n  }\n  cocos2d::CCLabelBMFont::limitLabelWidth(*(_QWORD *)(v1 + 376), v9, v10, 0.0);\n  return CustomSongWidget::showError(v1, 1);\n}", "assembly": "; \n; CustomSongWidget::deleteSong from 0x100121690 to 0x1001217ac (284 bytes)\n; \n; 1 xrefs:\n; > CustomSongWidget::FLAlert_Clicked @ 0x10012312c\n; \n; This function is hookable on this platform (idp: arm, 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 10:59:16 +0000\n; \nSUB             SP, SP, #0x40                                          ; +0x0, 0x100121690\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x4, 0x100121694\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0x8, 0x100121698\nADD             X29, SP, #0x30                                         ; +0xc, 0x10012169c\nLDR             X8, [X0,#0x150]                                        ; +0x10, 0x1001216a0\nCBZ             X8, loc_10012178C                                      ; +0x14, 0x1001216a4\nMOV             X19, X0                                                ; +0x18, 0x1001216a8\nBL              FMODAudioEngine__sharedEngine                          ; +0x1c, 0x1001216ac\nMOV             X20, X0                                                ; +0x20, 0x1001216b0\nBL              MusicDownloadManager__sharedState                      ; +0x24, 0x1001216b4\nLDR             X8, [X19,#0x150]                                       ; +0x28, 0x1001216b8\nLDR             W1, [X8,#0x13C]                                        ; +0x2c, 0x1001216bc\nADD             X8, SP, #0x30+__p                                      ; +0x30, 0x1001216c0\nBL              MusicDownloadManager__pathForSong                      ; +0x34, 0x1001216c4\nADD             X1, SP, #0x30+__p                                      ; +0x38, 0x1001216c8\nMOV             X0, X20                                                ; +0x3c, 0x1001216cc\nMOV             W2, #0                                                 ; +0x40, 0x1001216d0\nBL              FMODAudioEngine__isMusicPlaying                        ; +0x44, 0x1001216d4\nMOV             X20, X0                                                ; +0x48, 0x1001216d8\nLDRSB           W8, [SP,#0x30+var_11]                                  ; +0x4c, 0x1001216dc\nTBNZ            W8, #0x1F, loc_10012179C                               ; +0x50, 0x1001216e0\nCBZ             W20, loc_1001216F4                                     ; +0x54, 0x1001216e4\nBL              FMODAudioEngine__sharedEngine                          ; +0x58, 0x1001216e8\nMOV             W1, #1                                                 ; +0x5c, 0x1001216ec\nBL              FMODAudioEngine__stopAllMusic                          ; +0x60, 0x1001216f0\nBL              MusicDownloadManager__sharedState                      ; +0x64, 0x1001216f4\nLDR             X8, [X19,#0x150]                                       ; +0x68, 0x1001216f8\nLDR             W1, [X8,#0x13C]                                        ; +0x6c, 0x1001216fc\nBL              MusicDownloadManager__deleteSong                       ; +0x70, 0x100121700\nMOV             X0, X19                                                ; +0x74, 0x100121704\nBL              CustomSongWidget__updateSongInfo                       ; +0x78, 0x100121708\nLDR             X0, [X19,#0x178]                                       ; +0x7c, 0x10012170c\nSTRB            WZR, [SP,#0x30+var_2A]                                 ; +0x80, 0x100121710\nMOV             W8, #0x64FF                                            ; +0x84, 0x100121714\nSTRH            W8, [SP,#0x30+var_2C]                                  ; +0x88, 0x100121718\nLDR             X8, [X0]                                               ; +0x8c, 0x10012171c\nLDR             X8, [X8,#0x430]                                        ; +0x90, 0x100121720\nADD             X1, SP, #0x30+var_2C                                   ; +0x94, 0x100121724\nBLR             X8                                                     ; +0x98, 0x100121728\nLDR             X0, [X19,#0x178]                                       ; +0x9c, 0x10012172c\nLDR             X8, [X0]                                               ; +0xa0, 0x100121730\nLDR             X8, [X8,#0x3A0]                                        ; +0xa4, 0x100121734\nADRL            X1, aSongDeleted; \"Song Deleted\"                       ; +0xa8, 0x100121738\nBLR             X8                                                     ; +0xb0, 0x100121740\nLDRB            W8, [X19,#0x1F5]                                       ; +0xb4, 0x100121744\nLDR             X0, [X19,#0x178]                                       ; +0xb8, 0x100121748\nCMP             W8, #1                                                 ; +0xbc, 0x10012174c\nB.NE            loc_100121768                                          ; +0xc0, 0x100121750\nMOV             W8, #0x430C0000                                        ; +0xc4, 0x100121754\nFMOV            S0, W8                                                 ; +0xc8, 0x100121758\nADRP            X8, #dword_10075BD44@PAGE                              ; +0xcc, 0x10012175c\nLDR             S1, [X8,#dword_10075BD44@PAGEOFF]                      ; +0xd0, 0x100121760\nB               loc_100121778                                          ; +0xd4, 0x100121764\nMOV             W8, #0x43660000                                        ; +0xd8, 0x100121768\nFMOV            S0, W8                                                 ; +0xdc, 0x10012176c\nADRP            X8, #dword_10075BD1C@PAGE                              ; +0xe0, 0x100121770\nLDR             S1, [X8,#dword_10075BD1C@PAGEOFF]                      ; +0xe4, 0x100121774\nFMOV            S2, WZR                                                ; +0xe8, 0x100121778\nBL              cocos2d__CCLabelBMFont__limitLabelWidth                ; +0xec, 0x10012177c\nMOV             X0, X19                                                ; +0xf0, 0x100121780\nMOV             W1, #1                                                 ; +0xf4, 0x100121784\nBL              CustomSongWidget__showError                            ; +0xf8, 0x100121788\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xfc, 0x10012178c\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x100, 0x100121790\nADD             SP, SP, #0x40 ; '@'                                    ; +0x104, 0x100121794\nRET                                                                    ; +0x108, 0x100121798\nLDR             X0, [SP,#0x30+__p]; __p                                ; +0x10c, 0x10012179c\nBL              __ZdlPv; operator delete(void *)                       ; +0x110, 0x1001217a0\nCBNZ            W20, loc_1001216E8                                     ; +0x114, 0x1001217a4\nB               loc_1001216F4                                          ; +0x118, 0x1001217a8", "xrefs": ["CustomSongWidget::FLAlert_Clicked @ 0x10012312c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}