{"type": "func", "start": 7202560, "end": 7202876, "name": "EditLevelLayer::confirmMoveToTop", "pseudocode": "// \n// EditLevelLayer::confirmMoveToTop from 0x6de700 to 0x6de83c (316 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x7f998\n// > EditLevelLayer::init @ 0x6e0e94\n// > <???> @ 0x122c4a8\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::confirmMoveToTop(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, \"Move this level to the top of the created levels list?\");\n  v3 = FLAlertLayer::create(v2 + 416, (__int64)\"Move to Top\", (__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, 8);\n  v3->show(v3);\n}", "assembly": "; \n; EditLevelLayer::confirmMoveToTop from 0x6de700 to 0x6de83c (316 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x7f998\n; > EditLevelLayer::init @ 0x6e0e94\n; > <???> @ 0x122c4a8\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, 0x6de700\nADRP            X1, #aMoveThisLevelT_1@PAGE; \"Move this level to the top of the creat\"... ; +0x4, 0x6de704\nMOV             X29, SP                                                ; +0x8, 0x6de708\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0xc, 0x6de70c\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x6de710\nADD             X20, X29, #0x50+var_10                                 ; +0x14, 0x6de714\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x18, 0x6de718\nADD             X1, X1, #aMoveThisLevelT_1@PAGEOFF; \"Move this level to the top of the creat\"... ; +0x1c, 0x6de71c\nMOV             X21, X0                                                ; +0x20, 0x6de720\nADD             X2, X29, #0x50+var_20                                  ; +0x24, 0x6de724\nLDR             X3, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x28, 0x6de728\nMOV             X0, X20; int                                           ; +0x2c, 0x6de72c\nLDR             X3, [X3]                                               ; +0x30, 0x6de730\nSTR             X3, [X29,#0x50+var_8]                                  ; +0x34, 0x6de734\nBL              sub_D153B8                                             ; +0x38, 0x6de738\nLDR             S0, =0x43960000                                        ; +0x3c, 0x6de73c\nADRP            X1, #aMoveToTop@PAGE; \"Move to Top\"                    ; +0x40, 0x6de740\nADRP            X3, #aNo_0@PAGE; \"NO\"                                  ; +0x44, 0x6de744\nADRP            X4, #aYes_0@PAGE; \"YES\"                                ; +0x48, 0x6de748\nADD             X0, X21, #0x1A0                                        ; +0x4c, 0x6de74c\nADD             X1, X1, #aMoveToTop@PAGEOFF; \"Move to Top\"             ; +0x50, 0x6de750\nMOV             X2, X20                                                ; +0x54, 0x6de754\nADD             X3, X3, #aNo_0@PAGEOFF; \"NO\"                           ; +0x58, 0x6de758\nADD             X4, X4, #aYes_0@PAGEOFF; \"YES\"                         ; +0x5c, 0x6de75c\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x60, 0x6de760\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x64, 0x6de764\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x68, 0x6de768\nMOV             X20, X0                                                ; +0x6c, 0x6de76c\nSUB             X0, X2, #0x18; p                                       ; +0x70, 0x6de770\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x74, 0x6de774\nCMP             X0, X1                                                 ; +0x78, 0x6de778\nB.NE            loc_6DE7C8                                             ; +0x7c, 0x6de77c\nLDR             X2, [X20]                                              ; +0x80, 0x6de780\nMOV             X0, X20                                                ; +0x84, 0x6de784\nMOV             W1, #8                                                 ; +0x88, 0x6de788\nLDR             X2, [X2,#0x48]                                         ; +0x8c, 0x6de78c\nBLR             X2                                                     ; +0x90, 0x6de790\nLDR             X1, [X20]                                              ; +0x94, 0x6de794\nMOV             X0, X20                                                ; +0x98, 0x6de798\nLDR             X1, [X1,#0x508]                                        ; +0x9c, 0x6de79c\nBLR             X1                                                     ; +0xa0, 0x6de7a0\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xa4, 0x6de7a4\nLDR             X1, [X29,#0x50+var_8]                                  ; +0xa8, 0x6de7a8\nLDR             X0, [X19]                                              ; +0xac, 0x6de7ac\nCMP             X1, X0                                                 ; +0xb0, 0x6de7b0\nB.NE            loc_6DE80C                                             ; +0xb4, 0x6de7b4\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xb8, 0x6de7b8\nLDR             X21, [SP,#0x50+var_30]                                 ; +0xbc, 0x6de7bc\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xc0, 0x6de7c0\nRET                                                                    ; +0xc4, 0x6de7c4\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xc8, 0x6de7c8\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xcc, 0x6de7cc\nCBZ             X1, loc_6DE7FC                                         ; +0xd0, 0x6de7d0\nSUB             X2, X2, #8                                             ; +0xd4, 0x6de7d4\nLDAXR           W1, [X2]                                               ; +0xd8, 0x6de7d8\nSUB             W3, W1, #1                                             ; +0xdc, 0x6de7dc\nSTLXR           W4, W3, [X2]                                           ; +0xe0, 0x6de7e0\nCBNZ            W4, loc_6DE7D8                                         ; +0xe4, 0x6de7e4\nCMP             W1, WZR                                                ; +0xe8, 0x6de7e8\nB.GT            loc_6DE780                                             ; +0xec, 0x6de7ec\nADD             X1, X29, #0x50+var_18                                  ; +0xf0, 0x6de7f0\nBL              j__ZdlPv; operator delete(void *)                      ; +0xf4, 0x6de7f4\nB               loc_6DE780                                             ; +0xf8, 0x6de7f8\nLDUR            W1, [X2,#-8]                                           ; +0xfc, 0x6de7fc\nSUB             W3, W1, #1                                             ; +0x100, 0x6de800\nSTUR            W3, [X2,#-8]                                           ; +0x104, 0x6de804\nB               loc_6DE7E8                                             ; +0x108, 0x6de808\nBL              .__stack_chk_fail                                      ; +0x10c, 0x6de80c\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x110, 0x6de810\nMOV             X19, X0                                                ; +0x114, 0x6de814\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x118, 0x6de818\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x11c, 0x6de81c\nSUB             X0, X0, #0x18                                          ; +0x120, 0x6de820\nCMP             X0, X1                                                 ; +0x124, 0x6de824\nB.EQ            loc_6DE834                                             ; +0x128, 0x6de828\nADD             X1, X29, #0x50+var_18                                  ; +0x12c, 0x6de82c\nBL              sub_4DB8F0                                             ; +0x130, 0x6de830\nMOV             X0, X19                                                ; +0x134, 0x6de834\nBL              _Unwind_Resume                                         ; +0x138, 0x6de838", "xrefs": ["<???> @ 0x7f998", "EditLevelLayer::init @ 0x6e0e94", "<???> @ 0x122c4a8"], "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"}