{"type": "func", "start": 7201920, "end": 7202236, "name": "EditLevelLayer::confirmDelete", "pseudocode": "// \n// EditLevelLayer::confirmDelete from 0x6de480 to 0x6de5bc (316 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x4de20\n// > EditLevelLayer::init @ 0x6e0ce4\n// > <???> @ 0x122a808\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 EditLevelLayer::confirmDelete(EditLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  int v2; // w21\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  sub_D153B8((int)&v7, \"Are you sure you want to <cr>delete</c> this level?\\n<cy>This action cannot be undone.</c>\");\n  v3 = FLAlertLayer::create(v2 + 416, (__int64)\"Delete Level\", (__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, 4);\n  v3->show(v3);\n}", "assembly": "; \n; EditLevelLayer::confirmDelete from 0x6de480 to 0x6de5bc (316 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x4de20\n; > EditLevelLayer::init @ 0x6e0ce4\n; > <???> @ 0x122a808\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, 0x6de480\nADRP            X1, #aAreYouSureYouW_11@PAGE; \"Are you sure you want to <cr>delete</c>\"... ; +0x4, 0x6de484\nMOV             X29, SP                                                ; +0x8, 0x6de488\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0xc, 0x6de48c\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x6de490\nADD             X20, X29, #0x50+var_10                                 ; +0x14, 0x6de494\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x18, 0x6de498\nADD             X1, X1, #aAreYouSureYouW_11@PAGEOFF; \"Are you sure you want to <cr>delete</c>\"... ; +0x1c, 0x6de49c\nMOV             X21, X0                                                ; +0x20, 0x6de4a0\nADD             X2, X29, #0x50+var_20                                  ; +0x24, 0x6de4a4\nLDR             X3, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x28, 0x6de4a8\nMOV             X0, X20; int                                           ; +0x2c, 0x6de4ac\nLDR             X3, [X3]                                               ; +0x30, 0x6de4b0\nSTR             X3, [X29,#0x50+var_8]                                  ; +0x34, 0x6de4b4\nBL              sub_D153B8                                             ; +0x38, 0x6de4b8\nLDR             S0, =0x43AA0000                                        ; +0x3c, 0x6de4bc\nADRP            X1, #aDeleteLevel@PAGE; \"Delete Level\"                 ; +0x40, 0x6de4c0\nADRP            X3, #aNo_0@PAGE; \"NO\"                                  ; +0x44, 0x6de4c4\nADRP            X4, #aYes_0@PAGE; \"YES\"                                ; +0x48, 0x6de4c8\nADD             X0, X21, #0x1A0                                        ; +0x4c, 0x6de4cc\nADD             X1, X1, #aDeleteLevel@PAGEOFF; \"Delete Level\"          ; +0x50, 0x6de4d0\nMOV             X2, X20                                                ; +0x54, 0x6de4d4\nADD             X3, X3, #aNo_0@PAGEOFF; \"NO\"                           ; +0x58, 0x6de4d8\nADD             X4, X4, #aYes_0@PAGEOFF; \"YES\"                         ; +0x5c, 0x6de4dc\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x60, 0x6de4e0\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x64, 0x6de4e4\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x68, 0x6de4e8\nMOV             X20, X0                                                ; +0x6c, 0x6de4ec\nSUB             X0, X2, #0x18; p                                       ; +0x70, 0x6de4f0\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x74, 0x6de4f4\nCMP             X0, X1                                                 ; +0x78, 0x6de4f8\nB.NE            loc_6DE548                                             ; +0x7c, 0x6de4fc\nLDR             X2, [X20]                                              ; +0x80, 0x6de500\nMOV             X0, X20                                                ; +0x84, 0x6de504\nMOV             W1, #4                                                 ; +0x88, 0x6de508\nLDR             X2, [X2,#0x48]                                         ; +0x8c, 0x6de50c\nBLR             X2                                                     ; +0x90, 0x6de510\nLDR             X1, [X20]                                              ; +0x94, 0x6de514\nMOV             X0, X20                                                ; +0x98, 0x6de518\nLDR             X1, [X1,#0x508]                                        ; +0x9c, 0x6de51c\nBLR             X1                                                     ; +0xa0, 0x6de520\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xa4, 0x6de524\nLDR             X1, [X29,#0x50+var_8]                                  ; +0xa8, 0x6de528\nLDR             X0, [X19]                                              ; +0xac, 0x6de52c\nCMP             X1, X0                                                 ; +0xb0, 0x6de530\nB.NE            loc_6DE58C                                             ; +0xb4, 0x6de534\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xb8, 0x6de538\nLDR             X21, [SP,#0x50+var_30]                                 ; +0xbc, 0x6de53c\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xc0, 0x6de540\nRET                                                                    ; +0xc4, 0x6de544\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xc8, 0x6de548\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xcc, 0x6de54c\nCBZ             X1, loc_6DE57C                                         ; +0xd0, 0x6de550\nSUB             X2, X2, #8                                             ; +0xd4, 0x6de554\nLDAXR           W1, [X2]                                               ; +0xd8, 0x6de558\nSUB             W3, W1, #1                                             ; +0xdc, 0x6de55c\nSTLXR           W4, W3, [X2]                                           ; +0xe0, 0x6de560\nCBNZ            W4, loc_6DE558                                         ; +0xe4, 0x6de564\nCMP             W1, WZR                                                ; +0xe8, 0x6de568\nB.GT            loc_6DE500                                             ; +0xec, 0x6de56c\nADD             X1, X29, #0x50+var_18                                  ; +0xf0, 0x6de570\nBL              j__ZdlPv; operator delete(void *)                      ; +0xf4, 0x6de574\nB               loc_6DE500                                             ; +0xf8, 0x6de578\nLDUR            W1, [X2,#-8]                                           ; +0xfc, 0x6de57c\nSUB             W3, W1, #1                                             ; +0x100, 0x6de580\nSTUR            W3, [X2,#-8]                                           ; +0x104, 0x6de584\nB               loc_6DE568                                             ; +0x108, 0x6de588\nBL              .__stack_chk_fail                                      ; +0x10c, 0x6de58c\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x110, 0x6de590\nMOV             X19, X0                                                ; +0x114, 0x6de594\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x118, 0x6de598\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x11c, 0x6de59c\nSUB             X0, X0, #0x18                                          ; +0x120, 0x6de5a0\nCMP             X0, X1                                                 ; +0x124, 0x6de5a4\nB.EQ            loc_6DE5B4                                             ; +0x128, 0x6de5a8\nADD             X1, X29, #0x50+var_18                                  ; +0x12c, 0x6de5ac\nBL              sub_4DB8F0                                             ; +0x130, 0x6de5b0\nMOV             X0, X19                                                ; +0x134, 0x6de5b4\nBL              _Unwind_Resume                                         ; +0x138, 0x6de5b8", "xrefs": ["<???> @ 0x4de20", "EditLevelLayer::init @ 0x6e0ce4", "<???> @ 0x122a808"], "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"}