{"type": "func", "start": 6027632, "end": 6027944, "name": "CreateGuidelinesLayer::onClearGuidelines", "pseudocode": "// \n// CreateGuidelinesLayer::onClearGuidelines from 0x5bf970 to 0x5bfaa8 (312 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x65be0\n// > CreateGuidelinesLayer::init @ 0x5c0ed8\n// > <???> @ 0x122b488\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 CreateGuidelinesLayer::onClearGuidelines(CreateGuidelinesLayer *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, \"<cr>Delete</c> the current <cl>guidelines</c>?\");\n  v3 = FLAlertLayer::create(v2 + 632, (__int64)\"Clear Guidelines\", (__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, 1);\n  v3->show(v3);\n}", "assembly": "; \n; CreateGuidelinesLayer::onClearGuidelines from 0x5bf970 to 0x5bfaa8 (312 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x65be0\n; > CreateGuidelinesLayer::init @ 0x5c0ed8\n; > <???> @ 0x122b488\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, 0x5bf970\nADRP            X1, #aCrDeleteCTheCu@PAGE; \"<cr>Delete</c> the current <cl>guidelin\"... ; +0x4, 0x5bf974\nMOV             X29, SP                                                ; +0x8, 0x5bf978\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0xc, 0x5bf97c\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x5bf980\nADD             X20, X29, #0x50+var_10                                 ; +0x14, 0x5bf984\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x18, 0x5bf988\nADD             X1, X1, #aCrDeleteCTheCu@PAGEOFF; \"<cr>Delete</c> the current <cl>guidelin\"... ; +0x1c, 0x5bf98c\nMOV             X21, X0                                                ; +0x20, 0x5bf990\nADD             X2, X29, #0x50+var_20                                  ; +0x24, 0x5bf994\nLDR             X3, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x28, 0x5bf998\nMOV             X0, X20; int                                           ; +0x2c, 0x5bf99c\nLDR             X3, [X3]                                               ; +0x30, 0x5bf9a0\nSTR             X3, [X29,#0x50+var_8]                                  ; +0x34, 0x5bf9a4\nBL              sub_D153B8                                             ; +0x38, 0x5bf9a8\nADRP            X1, #aClearGuideline@PAGE; \"Clear Guidelines\"          ; +0x3c, 0x5bf9ac\nADRP            X3, #aNo@PAGE; \"No\"                                    ; +0x40, 0x5bf9b0\nADRP            X4, #aYes@PAGE; \"Yes\"                                  ; +0x44, 0x5bf9b4\nADD             X0, X21, #0x278                                        ; +0x48, 0x5bf9b8\nADD             X1, X1, #aClearGuideline@PAGEOFF; \"Clear Guidelines\"   ; +0x4c, 0x5bf9bc\nMOV             X2, X20                                                ; +0x50, 0x5bf9c0\nADD             X3, X3, #aNo@PAGEOFF; \"No\"                             ; +0x54, 0x5bf9c4\nADD             X4, X4, #aYes@PAGEOFF; \"Yes\"                           ; +0x58, 0x5bf9c8\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*) ; +0x5c, 0x5bf9cc\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x60, 0x5bf9d0\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x64, 0x5bf9d4\nMOV             X20, X0                                                ; +0x68, 0x5bf9d8\nSUB             X0, X2, #0x18; p                                       ; +0x6c, 0x5bf9dc\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x70, 0x5bf9e0\nCMP             X0, X1                                                 ; +0x74, 0x5bf9e4\nB.NE            loc_5BFA34                                             ; +0x78, 0x5bf9e8\nLDR             X2, [X20]                                              ; +0x7c, 0x5bf9ec\nMOV             X0, X20                                                ; +0x80, 0x5bf9f0\nMOV             W1, #1                                                 ; +0x84, 0x5bf9f4\nLDR             X2, [X2,#0x48]                                         ; +0x88, 0x5bf9f8\nBLR             X2                                                     ; +0x8c, 0x5bf9fc\nLDR             X1, [X20]                                              ; +0x90, 0x5bfa00\nMOV             X0, X20                                                ; +0x94, 0x5bfa04\nLDR             X1, [X1,#0x508]                                        ; +0x98, 0x5bfa08\nBLR             X1                                                     ; +0x9c, 0x5bfa0c\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xa0, 0x5bfa10\nLDR             X1, [X29,#0x50+var_8]                                  ; +0xa4, 0x5bfa14\nLDR             X0, [X19]                                              ; +0xa8, 0x5bfa18\nCMP             X1, X0                                                 ; +0xac, 0x5bfa1c\nB.NE            loc_5BFA78                                             ; +0xb0, 0x5bfa20\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0xb4, 0x5bfa24\nLDR             X21, [SP,#0x50+var_30]                                 ; +0xb8, 0x5bfa28\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0xbc, 0x5bfa2c\nRET                                                                    ; +0xc0, 0x5bfa30\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xc4, 0x5bfa34\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xc8, 0x5bfa38\nCBZ             X1, loc_5BFA68                                         ; +0xcc, 0x5bfa3c\nSUB             X2, X2, #8                                             ; +0xd0, 0x5bfa40\nLDAXR           W1, [X2]                                               ; +0xd4, 0x5bfa44\nSUB             W3, W1, #1                                             ; +0xd8, 0x5bfa48\nSTLXR           W4, W3, [X2]                                           ; +0xdc, 0x5bfa4c\nCBNZ            W4, loc_5BFA44                                         ; +0xe0, 0x5bfa50\nCMP             W1, WZR                                                ; +0xe4, 0x5bfa54\nB.GT            loc_5BF9EC                                             ; +0xe8, 0x5bfa58\nADD             X1, X29, #0x50+var_18                                  ; +0xec, 0x5bfa5c\nBL              j__ZdlPv; operator delete(void *)                      ; +0xf0, 0x5bfa60\nB               loc_5BF9EC                                             ; +0xf4, 0x5bfa64\nLDUR            W1, [X2,#-8]                                           ; +0xf8, 0x5bfa68\nSUB             W3, W1, #1                                             ; +0xfc, 0x5bfa6c\nSTUR            W3, [X2,#-8]                                           ; +0x100, 0x5bfa70\nB               loc_5BFA54                                             ; +0x104, 0x5bfa74\nBL              .__stack_chk_fail                                      ; +0x108, 0x5bfa78\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x10c, 0x5bfa7c\nMOV             X19, X0                                                ; +0x110, 0x5bfa80\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x114, 0x5bfa84\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x118, 0x5bfa88\nSUB             X0, X0, #0x18                                          ; +0x11c, 0x5bfa8c\nCMP             X0, X1                                                 ; +0x120, 0x5bfa90\nB.EQ            loc_5BFAA0                                             ; +0x124, 0x5bfa94\nADD             X1, X29, #0x50+var_18                                  ; +0x128, 0x5bfa98\nBL              sub_4DB3D0                                             ; +0x12c, 0x5bfa9c\nMOV             X0, X19                                                ; +0x130, 0x5bfaa0\nBL              _Unwind_Resume                                         ; +0x134, 0x5bfaa4", "xrefs": ["<???> @ 0x65be0", "CreateGuidelinesLayer::init @ 0x5c0ed8", "<???> @ 0x122b488"], "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"}