{"type": "func", "start": 7611700, "end": 7612024, "name": "CustomSongWidget::onDelete", "pseudocode": "// \n// CustomSongWidget::onDelete from 0x742534 to 0x742678 (324 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x80220\n// > CustomSongWidget::init @ 0x745b14\n// > <???> @ 0x122c510\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 CustomSongWidget::onDelete(CustomSongWidget *a1, cocos2d::CCObject *a2)\n{\n  int v2; // w20\n  FLAlertLayer *v3; // x20\n  void *v4; // x0\n  unsigned int *v5; // x2\n  int v6; // w1\n  __int64 v7; // [xsp+40h] [xbp+40h] BYREF\n\n  v2 = (int)a1;\n  if ( a1->m_songInfoObject )\n  {\n    sub_D153B8((int)&v7, \"Do you want to <cr>delete</c> this song?\");\n    v3 = FLAlertLayer::create(v2 + 328, (__int64)\"Delete Song\", (__int64)&v7);\n    v4 = (void *)(v7 - 24);\n    if ( (__int64 *)(v7 - 24) != &qword_124B6B0 )\n    {\n      if ( &pthread_create )\n      {\n        v5 = (unsigned int *)(v7 - 8);\n        do\n          v6 = __ldaxr(v5);\n        while ( __stlxr(v6 - 1, v5) );\n      }\n      else\n      {\n        v6 = *(_DWORD *)(v7 - 8);\n        *(_DWORD *)(v7 - 8) = v6 - 1;\n      }\n      if ( v6 <= 0 )\n        operator delete(v4);\n    }\n    v3->setTag(v3, 2);\n    v3->show(v3);\n  }\n}", "assembly": "; \n; CustomSongWidget::onDelete from 0x742534 to 0x742678 (324 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x80220\n; > CustomSongWidget::init @ 0x745b14\n; > <???> @ 0x122c510\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, 0x742534\nMOV             X29, SP                                                ; +0x4, 0x742538\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x74253c\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x742540\nMOV             X20, X0                                                ; +0x10, 0x742544\nLDR             X0, [X0,#0x150]                                        ; +0x14, 0x742548\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x18, 0x74254c\nLDR             X1, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x742550\nLDR             X1, [X1]                                               ; +0x20, 0x742554\nSTR             X1, [X29,#0x50+var_8]                                  ; +0x24, 0x742558\nCBZ             X0, loc_7425E0                                         ; +0x28, 0x74255c\nADD             X21, X29, #0x50+var_10                                 ; +0x2c, 0x742560\nADRP            X1, #aDoYouWantToCrD_1@PAGE; \"Do you want to <cr>delete</c> this song\"... ; +0x30, 0x742564\nMOV             X0, X21; int                                           ; +0x34, 0x742568\nADD             X1, X1, #aDoYouWantToCrD_1@PAGEOFF; \"Do you want to <cr>delete</c> this song\"... ; +0x38, 0x74256c\nADD             X2, X29, #0x50+var_20                                  ; +0x3c, 0x742570\nBL              sub_D153B8                                             ; +0x40, 0x742574\nLDR             S0, =0x43960000                                        ; +0x44, 0x742578\nADRP            X1, #aDeleteSong@PAGE; \"Delete Song\"                   ; +0x48, 0x74257c\nADRP            X3, #aCancel@PAGE; \"Cancel\"                            ; +0x4c, 0x742580\nADRP            X4, #aDelete@PAGE; \"Delete\"                            ; +0x50, 0x742584\nADD             X0, X20, #0x148                                        ; +0x54, 0x742588\nADD             X1, X1, #aDeleteSong@PAGEOFF; \"Delete Song\"            ; +0x58, 0x74258c\nMOV             X2, X21                                                ; +0x5c, 0x742590\nADD             X3, X3, #aCancel@PAGEOFF; \"Cancel\"                     ; +0x60, 0x742594\nADD             X4, X4, #aDelete@PAGEOFF; \"Delete\"                     ; +0x64, 0x742598\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x68, 0x74259c\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x6c, 0x7425a0\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x70, 0x7425a4\nMOV             X20, X0                                                ; +0x74, 0x7425a8\nSUB             X0, X2, #0x18; p                                       ; +0x78, 0x7425ac\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x7c, 0x7425b0\nCMP             X0, X1                                                 ; +0x80, 0x7425b4\nB.NE            loc_742604                                             ; +0x84, 0x7425b8\nLDR             X2, [X20]                                              ; +0x88, 0x7425bc\nMOV             X0, X20                                                ; +0x8c, 0x7425c0\nMOV             W1, #2                                                 ; +0x90, 0x7425c4\nLDR             X2, [X2,#0x48]                                         ; +0x94, 0x7425c8\nBLR             X2                                                     ; +0x98, 0x7425cc\nLDR             X1, [X20]                                              ; +0x9c, 0x7425d0\nMOV             X0, X20                                                ; +0xa0, 0x7425d4\nLDR             X1, [X1,#0x508]                                        ; +0xa4, 0x7425d8\nBLR             X1                                                     ; +0xa8, 0x7425dc\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xac, 0x7425e0\nLDR             X1, [X29,#0x50+var_8]                                  ; +0xb0, 0x7425e4\nLDR             X0, [X19]                                              ; +0xb4, 0x7425e8\nCMP             X1, X0                                                 ; +0xb8, 0x7425ec\nB.NE            loc_742648                                             ; +0xbc, 0x7425f0\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xc0, 0x7425f4\nLDR             X21, [SP,#0x50+var_30]                                 ; +0xc4, 0x7425f8\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xc8, 0x7425fc\nRET                                                                    ; +0xcc, 0x742600\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xd0, 0x742604\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xd4, 0x742608\nCBZ             X1, loc_742638                                         ; +0xd8, 0x74260c\nSUB             X2, X2, #8                                             ; +0xdc, 0x742610\nLDAXR           W1, [X2]                                               ; +0xe0, 0x742614\nSUB             W3, W1, #1                                             ; +0xe4, 0x742618\nSTLXR           W4, W3, [X2]                                           ; +0xe8, 0x74261c\nCBNZ            W4, loc_742614                                         ; +0xec, 0x742620\nCMP             W1, WZR                                                ; +0xf0, 0x742624\nB.GT            loc_7425BC                                             ; +0xf4, 0x742628\nADD             X1, X29, #0x50+var_18                                  ; +0xf8, 0x74262c\nBL              j__ZdlPv; operator delete(void *)                      ; +0xfc, 0x742630\nB               loc_7425BC                                             ; +0x100, 0x742634\nLDUR            W1, [X2,#-8]                                           ; +0x104, 0x742638\nSUB             W3, W1, #1                                             ; +0x108, 0x74263c\nSTUR            W3, [X2,#-8]                                           ; +0x10c, 0x742640\nB               loc_742624                                             ; +0x110, 0x742644\nBL              .__stack_chk_fail                                      ; +0x114, 0x742648\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x118, 0x74264c\nMOV             X19, X0                                                ; +0x11c, 0x742650\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x120, 0x742654\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x124, 0x742658\nSUB             X0, X0, #0x18                                          ; +0x128, 0x74265c\nCMP             X0, X1                                                 ; +0x12c, 0x742660\nB.EQ            loc_742670                                             ; +0x130, 0x742664\nADD             X1, X29, #0x50+var_18                                  ; +0x134, 0x742668\nBL              sub_4DBA38                                             ; +0x138, 0x74266c\nMOV             X0, X19                                                ; +0x13c, 0x742670\nBL              _Unwind_Resume                                         ; +0x140, 0x742674", "xrefs": ["<???> @ 0x80220", "CustomSongWidget::init @ 0x745b14", "<???> @ 0x122c510"], "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"}