{"type": "func", "start": 3660696, "end": 3660838, "name": "EditorUI::showMaxError", "pseudocode": "// \n// EditorUI::showMaxError from 0x37db98 to 0x37dc26 (142 bytes)\n// \n// 4 xrefs:\n// > LevelEditorLayer::createObjectsFromString @ 0x371180\n// > EditorUI::onCreate @ 0x3a4068\n// > EditorUI::doPasteObjects @ 0x3a5e72\n// > EditorUI::onDuplicate @ 0x3a6940\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::showMaxError(EditorUI *a1)\n{\n  cocos2d::CCString *v2; // r0\n  char *CString; // r0\n  FLAlertLayer *v4; // r5\n  _BYTE v5[4]; // [sp+10h] [bp-8h] BYREF\n\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 upper max limit of <cg>%i</c> objects. This li\"\n                                                     \"mit can be removed completely, but it is <cr>not</c> recommended. L\"\n                                                     \"evels with object count above this limit will display a <co>warning\"\n                                                     \"</c> when played online.\\n\"\n                                                     \"<cy>Unoptimized levels that use too many objects have a lower chanc\"\n                                                     \"e of being rated and featured.</c>\",\n                                (const char *)&stru_1387C.st_value);\n    CString = (char *)cocos2d::CCString::getCString(v2);\n    sub_776584((int)v5, CString);\n    v4 = FLAlertLayer::create(\n           (int)&a1->FLAlertLayerProtocol,\n           (int)\"Max Objects\",\n           (int)v5,\n           (int)\"Cancel\",\n           (int)\"Unlimited\",\n           380.0);\n    sub_774008(v5);\n    v4->setTag(v4, 126);\n    v4->show(v4);\n  }\n}", "assembly": "; \n; EditorUI::showMaxError from 0x37db98 to 0x37dc26 (142 bytes)\n; \n; 4 xrefs:\n; > LevelEditorLayer::createObjectsFromString @ 0x371180\n; > EditorUI::onCreate @ 0x3a4068\n; > EditorUI::doPasteObjects @ 0x3a5e72\n; > EditorUI::onDuplicate @ 0x3a6940\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x37DBA0)                ; +0x0, 0x37db98\nPUSH            {R4-R6,LR}                                             ; +0x2, 0x37db9a\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x4, 0x37db9c\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x6, 0x37db9e\nSUB             SP, SP, #0x18                                          ; +0x8, 0x37dba0\nMOV             R5, R0                                                 ; +0xa, 0x37dba2\nLDR             R2, [R3]                                               ; +0xc, 0x37dba4\nMOV             R6, R3                                                 ; +0xe, 0x37dba6\nSTR             R2, [SP,#0x18+var_4]                                   ; +0x10, 0x37dba8\nLDRB.W          R2, [R0,#0x1C4]                                        ; +0x12, 0x37dbaa\nCMP             R2, #0                                                 ; +0x16, 0x37dbae\nBNE             loc_37DC16                                             ; +0x18, 0x37dbb0\nMOVS            R3, #1                                                 ; +0x1a, 0x37dbb2\nSTRB.W          R3, [R0,#0x1C4]                                        ; +0x1c, 0x37dbb4\nLDR             R0, =(aYouHaveReached - 0x37DBC2); \"You have reached the upper max limit of\"... ; +0x20, 0x37dbb8\nADD             R4, SP, #0x18+var_8                                    ; +0x22, 0x37dbba\nLDR             R1, =0x13880; char *                                   ; +0x24, 0x37dbbc\nADD             R0, PC; \"You have reached the upper max limit of\"...   ; +0x26, 0x37dbbe\nBL              _ZN7cocos2d8CCString16createWithFormatEPKcz; cocos2d::CCString::createWithFormat(char const*,...) ; +0x28, 0x37dbc0\nBL              _ZNK7cocos2d8CCString10getCStringEv; cocos2d::CCString::getCString(void) ; +0x2c, 0x37dbc4\nADD             R2, SP, #0x18+var_C                                    ; +0x30, 0x37dbc8\nMOV             R1, R0; char *                                         ; +0x32, 0x37dbca\nMOV             R0, R4; int                                            ; +0x34, 0x37dbcc\nBL              sub_776584                                             ; +0x36, 0x37dbce\nLDR             R3, =(aUnlimited - 0x37DBDE); \"Unlimited\"              ; +0x3a, 0x37dbd2\nLDR             R1, =(aMaxObjects - 0x37DBE4); \"Max Objects\"           ; +0x3c, 0x37dbd4\nADD.W           R0, R5, #0x13C; int                                    ; +0x3e, 0x37dbd6\nADD             R3, PC; \"Unlimited\"                                    ; +0x42, 0x37dbda\nSTR             R3, [SP,#0x18+var_18]; int                             ; +0x44, 0x37dbdc\nLDR             R3, flt_37DC2C                                         ; +0x46, 0x37dbde\nADD             R1, PC; \"Max Objects\"                                  ; +0x48, 0x37dbe0\nMOV             R2, R4; int                                            ; +0x4a, 0x37dbe2\nSTR             R3, [SP,#0x18+var_14]; float                           ; +0x4c, 0x37dbe4\nLDR             R3, =(aCancel - 0x37DBEC); \"Cancel\"                    ; +0x4e, 0x37dbe6\nADD             R3, PC; \"Cancel\"                                       ; +0x50, 0x37dbe8\nBL              _ZN12FLAlertLayer6createEP20FLAlertLayerProtocolPKcSsS3_S3_f; FLAlertLayer::create(FLAlertLayerProtocol *,char const*,std::string,char const*,char const*,float) ; +0x52, 0x37dbea\nMOV             R5, R0                                                 ; +0x56, 0x37dbee\nMOV             R0, R4                                                 ; +0x58, 0x37dbf0\nBL              sub_774008                                             ; +0x5a, 0x37dbf2\nLDR             R3, [R5]                                               ; +0x5e, 0x37dbf6\nMOV             R0, R5                                                 ; +0x60, 0x37dbf8\nMOVS            R1, #0x7E ; '~'                                        ; +0x62, 0x37dbfa\nLDR             R3, [R3,#0x24]                                         ; +0x64, 0x37dbfc\nBLX             R3                                                     ; +0x66, 0x37dbfe\nLDR             R3, [R5]                                               ; +0x68, 0x37dc00\nMOV             R0, R5                                                 ; +0x6a, 0x37dc02\nLDR.W           R3, [R3,#0x284]                                        ; +0x6c, 0x37dc04\nBLX             R3                                                     ; +0x70, 0x37dc08\nB               loc_37DC16                                             ; +0x72, 0x37dc0a\nMOV             R0, R4                                                 ; +0x74, 0x37dc0c\nBL              sub_774008                                             ; +0x76, 0x37dc0e\nBL              __cxa_end_cleanup                                      ; +0x7a, 0x37dc12\nLDR             R2, [SP,#0x18+var_4]                                   ; +0x7e, 0x37dc16\nLDR             R3, [R6]                                               ; +0x80, 0x37dc18\nCMP             R2, R3                                                 ; +0x82, 0x37dc1a\nBEQ             loc_37DC22                                             ; +0x84, 0x37dc1c\nBLX             __stack_chk_fail                                       ; +0x86, 0x37dc1e\nADD             SP, SP, #0x18                                          ; +0x8a, 0x37dc22\nPOP             {R4-R6,PC}                                             ; +0x8c, 0x37dc24", "xrefs": ["LevelEditorLayer::createObjectsFromString @ 0x371180", "EditorUI::onCreate @ 0x3a4068", "EditorUI::doPasteObjects @ 0x3a5e72", "EditorUI::onDuplicate @ 0x3a6940"], "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"}