{"type": "func", "start": 10688476, "end": 10688800, "name": "CustomSFXWidget::onDelete", "pseudocode": "// \n// CustomSFXWidget::onDelete from 0xa317dc to 0xa31920 (324 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x6aec0\n// > CustomSFXWidget::init @ 0xa32be4\n// > <???> @ 0x122b7f8\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 CustomSFXWidget::onDelete(CustomSFXWidget *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_sfxObject )\n  {\n    sub_D153B8((int)&v7, \"Do you want to <cr>Delete</c> this SFX?\");\n    v3 = FLAlertLayer::create(v2 + 328, (__int64)\"Delete SFX\", (__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, 3);\n    v3->show(v3);\n  }\n}", "assembly": "; \n; CustomSFXWidget::onDelete from 0xa317dc to 0xa31920 (324 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x6aec0\n; > CustomSFXWidget::init @ 0xa32be4\n; > <???> @ 0x122b7f8\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, 0xa317dc\nMOV             X29, SP                                                ; +0x4, 0xa317e0\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0xa317e4\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0xa317e8\nMOV             X20, X0                                                ; +0x10, 0xa317ec\nLDR             X0, [X0,#0x150]                                        ; +0x14, 0xa317f0\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x18, 0xa317f4\nLDR             X1, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0xa317f8\nLDR             X1, [X1]                                               ; +0x20, 0xa317fc\nSTR             X1, [X29,#0x50+var_8]                                  ; +0x24, 0xa31800\nCBZ             X0, loc_A31888                                         ; +0x28, 0xa31804\nADD             X21, X29, #0x50+var_10                                 ; +0x2c, 0xa31808\nADRP            X1, #aDoYouWantToCrD_3@PAGE; \"Do you want to <cr>Delete</c> this SFX?\" ; +0x30, 0xa3180c\nMOV             X0, X21; int                                           ; +0x34, 0xa31810\nADD             X1, X1, #aDoYouWantToCrD_3@PAGEOFF; \"Do you want to <cr>Delete</c> this SFX?\" ; +0x38, 0xa31814\nADD             X2, X29, #0x50+var_20                                  ; +0x3c, 0xa31818\nBL              sub_D153B8                                             ; +0x40, 0xa3181c\nLDR             S0, =0x43960000                                        ; +0x44, 0xa31820\nADRP            X1, #aDeleteSfx@PAGE; \"Delete SFX\"                     ; +0x48, 0xa31824\nADRP            X3, #aCancel@PAGE; \"Cancel\"                            ; +0x4c, 0xa31828\nADRP            X4, #aDelete@PAGE; \"Delete\"                            ; +0x50, 0xa3182c\nADD             X0, X20, #0x148                                        ; +0x54, 0xa31830\nADD             X1, X1, #aDeleteSfx@PAGEOFF; \"Delete SFX\"              ; +0x58, 0xa31834\nMOV             X2, X21                                                ; +0x5c, 0xa31838\nADD             X3, X3, #aCancel@PAGEOFF; \"Cancel\"                     ; +0x60, 0xa3183c\nADD             X4, X4, #aDelete@PAGEOFF; \"Delete\"                     ; +0x64, 0xa31840\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x68, 0xa31844\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x6c, 0xa31848\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x70, 0xa3184c\nMOV             X20, X0                                                ; +0x74, 0xa31850\nSUB             X0, X2, #0x18; p                                       ; +0x78, 0xa31854\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x7c, 0xa31858\nCMP             X0, X1                                                 ; +0x80, 0xa3185c\nB.NE            loc_A318AC                                             ; +0x84, 0xa31860\nLDR             X2, [X20]                                              ; +0x88, 0xa31864\nMOV             X0, X20                                                ; +0x8c, 0xa31868\nMOV             W1, #3                                                 ; +0x90, 0xa3186c\nLDR             X2, [X2,#0x48]                                         ; +0x94, 0xa31870\nBLR             X2                                                     ; +0x98, 0xa31874\nLDR             X1, [X20]                                              ; +0x9c, 0xa31878\nMOV             X0, X20                                                ; +0xa0, 0xa3187c\nLDR             X1, [X1,#0x508]                                        ; +0xa4, 0xa31880\nBLR             X1                                                     ; +0xa8, 0xa31884\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xac, 0xa31888\nLDR             X1, [X29,#0x50+var_8]                                  ; +0xb0, 0xa3188c\nLDR             X0, [X19]                                              ; +0xb4, 0xa31890\nCMP             X1, X0                                                 ; +0xb8, 0xa31894\nB.NE            loc_A318F0                                             ; +0xbc, 0xa31898\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xc0, 0xa3189c\nLDR             X21, [SP,#0x50+var_30]                                 ; +0xc4, 0xa318a0\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xc8, 0xa318a4\nRET                                                                    ; +0xcc, 0xa318a8\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xd0, 0xa318ac\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xd4, 0xa318b0\nCBZ             X1, loc_A318E0                                         ; +0xd8, 0xa318b4\nSUB             X2, X2, #8                                             ; +0xdc, 0xa318b8\nLDAXR           W1, [X2]                                               ; +0xe0, 0xa318bc\nSUB             W3, W1, #1                                             ; +0xe4, 0xa318c0\nSTLXR           W4, W3, [X2]                                           ; +0xe8, 0xa318c4\nCBNZ            W4, loc_A318BC                                         ; +0xec, 0xa318c8\nCMP             W1, WZR                                                ; +0xf0, 0xa318cc\nB.GT            loc_A31864                                             ; +0xf4, 0xa318d0\nADD             X1, X29, #0x50+var_18                                  ; +0xf8, 0xa318d4\nBL              j__ZdlPv; operator delete(void *)                      ; +0xfc, 0xa318d8\nB               loc_A31864                                             ; +0x100, 0xa318dc\nLDUR            W1, [X2,#-8]                                           ; +0x104, 0xa318e0\nSUB             W3, W1, #1                                             ; +0x108, 0xa318e4\nSTUR            W3, [X2,#-8]                                           ; +0x10c, 0xa318e8\nB               loc_A318CC                                             ; +0x110, 0xa318ec\nBL              .__stack_chk_fail                                      ; +0x114, 0xa318f0\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x118, 0xa318f4\nMOV             X19, X0                                                ; +0x11c, 0xa318f8\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x120, 0xa318fc\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x124, 0xa31900\nSUB             X0, X0, #0x18                                          ; +0x128, 0xa31904\nCMP             X0, X1                                                 ; +0x12c, 0xa31908\nB.EQ            loc_A31918                                             ; +0x130, 0xa3190c\nADD             X1, X29, #0x50+var_18                                  ; +0x134, 0xa31910\nBL              sub_4DD960                                             ; +0x138, 0xa31914\nMOV             X0, X19                                                ; +0x13c, 0xa31918\nBL              _Unwind_Resume                                         ; +0x140, 0xa3191c", "xrefs": ["<???> @ 0x6aec0", "CustomSFXWidget::init @ 0xa32be4", "<???> @ 0x122b7f8"], "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"}