{"type": "func", "start": 6854436, "end": 6854796, "name": "EditorUI::showMaxBasicError", "pseudocode": "// \n// EditorUI::showMaxBasicError from 0x689724 to 0x68988c (360 bytes)\n// \n// 4 xrefs:\n// > EditorUI::onCreate @ 0x6c0550\n// > EditorUI::doPasteObjects @ 0x6c3974\n// > EditorUI::onDuplicate @ 0x6c4f34\n// > <???> @ 0xc5d60\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 EditorUI::showMaxBasicError(EditorUI *a1)\n{\n  int v1; // w20\n  cocos2d::CCString *v2; // x0\n  char *CString; // x0\n  FLAlertLayer *v4; // x20\n  void *v5; // x0\n  unsigned int *v6; // x2\n  int v7; // w1\n  __int64 v8; // [xsp+40h] [xbp+40h] BYREF\n\n  v1 = (int)a1;\n  if ( !a1->m_alertShown )\n  {\n    a1->m_alertShown = 1;\n    v2 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(\n                                (cocos2d::CCString *)\"You have reached the max limit of <cg>%i</c> objects. You can incre\"\n                                                     \"ase it to <cy>%i</c>, but your level may become unstable on some de\"\n                                                     \"vices, so it is recommended to stay below this limit. Levels with o\"\n                                                     \"bject count above this limit will display a <co>warning</c> when played online.\",\n                                (const char *)&elf_hash_bucket[9874],\n                                80000);\n    CString = (char *)cocos2d::CCString::getCString(v2);\n    sub_D153B8((int)&v8, CString);\n    v4 = FLAlertLayer::create(v1 + 408, (__int64)\"Max Objects\", (__int64)&v8);\n    v5 = (void *)(v8 - 24);\n    if ( (__int64 *)(v8 - 24) != &qword_124B6B0 )\n    {\n      if ( &pthread_create )\n      {\n        v6 = (unsigned int *)(v8 - 8);\n        do\n          v7 = __ldaxr(v6);\n        while ( __stlxr(v7 - 1, v6) );\n      }\n      else\n      {\n        v7 = *(_DWORD *)(v8 - 8);\n        *(_DWORD *)(v8 - 8) = v7 - 1;\n      }\n      if ( v7 <= 0 )\n        operator delete(v5);\n    }\n    v4->setTag(v4, 125);\n    v4->show(v4);\n  }\n}", "assembly": "; \n; EditorUI::showMaxBasicError from 0x689724 to 0x68988c (360 bytes)\n; \n; 4 xrefs:\n; > EditorUI::onCreate @ 0x6c0550\n; > EditorUI::doPasteObjects @ 0x6c3974\n; > EditorUI::onDuplicate @ 0x6c4f34\n; > <???> @ 0xc5d60\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, 0x689724\nMOV             X29, SP                                                ; +0x4, 0x689728\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x68972c\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x689730\nMOV             X20, X0                                                ; +0x10, 0x689734\nLDRB            W0, [X0,#0x260]                                        ; +0x14, 0x689738\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x18, 0x68973c\nLDR             X1, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x689740\nLDR             X1, [X1]                                               ; +0x20, 0x689744\nSTR             X1, [X29,#0x50+var_8]                                  ; +0x24, 0x689748\nCBZ             W0, loc_689774                                         ; +0x28, 0x68974c\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x2c, 0x689750\nLDR             X1, [X29,#0x50+var_8]                                  ; +0x30, 0x689754\nLDR             X0, [X19]                                              ; +0x34, 0x689758\nCMP             X1, X0                                                 ; +0x38, 0x68975c\nB.NE            loc_68985C                                             ; +0x3c, 0x689760\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x40, 0x689764\nLDR             X21, [SP,#0x50+var_30]                                 ; +0x44, 0x689768\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x48, 0x68976c\nRET                                                                    ; +0x4c, 0x689770\nMOV             W2, #0x3880                                            ; +0x50, 0x689774\nADRP            X0, #aYouHaveReached_0@PAGE; \"You have reached the max limit of <cg>%\"... ; +0x54, 0x689778\nMOV             W3, #1                                                 ; +0x58, 0x68977c\nMOVK            W2, #1,LSL#16                                          ; +0x5c, 0x689780\nSTRB            W3, [X20,#0x260]                                       ; +0x60, 0x689784\nMOV             W1, #(elf_hash_bucket+0x9A48); char *                  ; +0x64, 0x689788\nADD             X0, X0, #aYouHaveReached_0@PAGEOFF; \"You have reached the max limit of <cg>%\"... ; +0x68, 0x68978c\nADD             X21, X29, #0x50+var_10                                 ; +0x6c, 0x689790\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x70, 0x689794\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x74, 0x689798\nMOV             X1, X0; char *                                         ; +0x78, 0x68979c\nADD             X2, X29, #0x50+var_20                                  ; +0x7c, 0x6897a0\nMOV             X0, X21; int                                           ; +0x80, 0x6897a4\nBL              sub_D153B8                                             ; +0x84, 0x6897a8\nLDR             S0, =0x43BE0000                                        ; +0x88, 0x6897ac\nADRP            X1, #aMaxObjects@PAGE; \"Max Objects\"                   ; +0x8c, 0x6897b0\nADRP            X3, #aCancel@PAGE; \"Cancel\"                            ; +0x90, 0x6897b4\nADRP            X4, #aIncrease@PAGE; \"Increase\"                        ; +0x94, 0x6897b8\nADD             X0, X20, #0x198                                        ; +0x98, 0x6897bc\nADD             X1, X1, #aMaxObjects@PAGEOFF; \"Max Objects\"            ; +0x9c, 0x6897c0\nMOV             X2, X21                                                ; +0xa0, 0x6897c4\nADD             X3, X3, #aCancel@PAGEOFF; \"Cancel\"                     ; +0xa4, 0x6897c8\nADD             X4, X4, #aIncrease@PAGEOFF; \"Increase\"                 ; +0xa8, 0x6897cc\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0xac, 0x6897d0\nADRP            X1, #off_122EFE8@PAGE                                  ; +0xb0, 0x6897d4\nLDR             X2, [X29,#0x50+var_10]                                 ; +0xb4, 0x6897d8\nMOV             X20, X0                                                ; +0xb8, 0x6897dc\nSUB             X0, X2, #0x18; p                                       ; +0xbc, 0x6897e0\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0xc0, 0x6897e4\nCMP             X0, X1                                                 ; +0xc4, 0x6897e8\nB.NE            loc_689818                                             ; +0xc8, 0x6897ec\nLDR             X2, [X20]                                              ; +0xcc, 0x6897f0\nMOV             X0, X20                                                ; +0xd0, 0x6897f4\nMOV             W1, #0x7D ; '}'                                        ; +0xd4, 0x6897f8\nLDR             X2, [X2,#0x48]                                         ; +0xd8, 0x6897fc\nBLR             X2                                                     ; +0xdc, 0x689800\nLDR             X1, [X20]                                              ; +0xe0, 0x689804\nMOV             X0, X20                                                ; +0xe4, 0x689808\nLDR             X1, [X1,#0x508]                                        ; +0xe8, 0x68980c\nBLR             X1                                                     ; +0xec, 0x689810\nB               loc_689750                                             ; +0xf0, 0x689814\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0xf4, 0x689818\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xf8, 0x68981c\nCBZ             X1, loc_68984C                                         ; +0xfc, 0x689820\nSUB             X2, X2, #8                                             ; +0x100, 0x689824\nLDAXR           W1, [X2]                                               ; +0x104, 0x689828\nSUB             W3, W1, #1                                             ; +0x108, 0x68982c\nSTLXR           W4, W3, [X2]                                           ; +0x10c, 0x689830\nCBNZ            W4, loc_689828                                         ; +0x110, 0x689834\nCMP             W1, WZR                                                ; +0x114, 0x689838\nB.GT            loc_6897F0                                             ; +0x118, 0x68983c\nADD             X1, X29, #0x50+var_18                                  ; +0x11c, 0x689840\nBL              j__ZdlPv; operator delete(void *)                      ; +0x120, 0x689844\nB               loc_6897F0                                             ; +0x124, 0x689848\nLDUR            W1, [X2,#-8]                                           ; +0x128, 0x68984c\nSUB             W3, W1, #1                                             ; +0x12c, 0x689850\nSTUR            W3, [X2,#-8]                                           ; +0x130, 0x689854\nB               loc_689838                                             ; +0x134, 0x689858\nBL              .__stack_chk_fail                                      ; +0x138, 0x68985c\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x13c, 0x689860\nMOV             X19, X0                                                ; +0x140, 0x689864\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x144, 0x689868\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x148, 0x68986c\nSUB             X0, X0, #0x18                                          ; +0x14c, 0x689870\nCMP             X0, X1                                                 ; +0x150, 0x689874\nB.EQ            loc_689884                                             ; +0x154, 0x689878\nADD             X1, X29, #0x50+var_18                                  ; +0x158, 0x68987c\nBL              sub_6865FC                                             ; +0x15c, 0x689880\nMOV             X0, X19                                                ; +0x160, 0x689884\nBL              _Unwind_Resume                                         ; +0x164, 0x689888", "xrefs": ["EditorUI::onCreate @ 0x6c0550", "EditorUI::doPasteObjects @ 0x6c3974", "EditorUI::onDuplicate @ 0x6c4f34", "<???> @ 0xc5d60"], "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"}