{"type": "func", "start": 4295182352, "end": 4295182649, "name": "EditorUI::showMaxError", "pseudocode": "// \n// EditorUI::showMaxError from 0x100034810 to 0x100034939 (297 bytes)\n// \n// 4 xrefs:\n// > EditorUI::onDuplicate @ 0x10002acb9\n// > EditorUI::onCreate @ 0x10002e1ae\n// > EditorUI::doPasteObjects @ 0x10003e206\n// > LevelEditorLayer::createObjectsFromString @ 0x1000dfa08\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 __fastcall EditorUI::showMaxError(EditorUI *a1)\n{\n  double v1; // xmm0_8\n  cocos2d::CCString *v2; // rax\n  const char *CString; // r15\n  size_t v4; // rax\n  size_t v5; // r14\n  char *v6; // r12\n  size_t v7; // r13\n  __int64 v8; // rbx\n  _QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF\n  void *__p; // [rsp+10h] [rbp-30h]\n\n  if ( a1->m_alertShown )\n    return;\n  a1->m_alertShown = 1;\n  v2 = (cocos2d::CCString *)sub_1007AB580(\n                              \"You have reached the upper max limit of <cg>%i</c> objects. This limit can be removed comp\"\n                              \"letely, but it is <cr>not</c> recommended. Levels with object count above this limit will \"\n                              \"display a <co>warning</c> when played online.\\n\"\n                              \"<cy>Unoptimized levels that use too many objects have a lower chance of being rated and featured.</c>\",\n                              __dst[0]);\n  CString = cocos2d::CCString::getCString(v2);\n  v4 = strlen(CString);\n  if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100006BF0(v1);\n  v5 = v4;\n  if ( v4 >= 0x17 )\n  {\n    v7 = 26;\n    if ( (v4 | 7) != 0x17 )\n      v7 = (v4 | 7) + 1;\n    v6 = (char *)operator new(v7);\n    __p = v6;\n    __dst[0] = v7 + 1;\n    __dst[1] = v5;\n  }\n  else\n  {\n    LOBYTE(__dst[0]) = 2 * v4;\n    v6 = (char *)__dst + 1;\n    if ( !v4 )\n      goto LABEL_10;\n  }\n  memmove(v6, CString, v5);\nLABEL_10:\n  v6[v5] = 0;\n  v8 = FLAlertLayer::create_1(&a1->FLAlertLayerProtocol, \"Max Objects\", __dst, \"Cancel\", \"Unlimited\", 380.0);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 72LL))(v8, 126);\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 1288LL))(v8);\n}", "assembly": "; \n; EditorUI::showMaxError from 0x100034810 to 0x100034939 (297 bytes)\n; \n; 4 xrefs:\n; > EditorUI::onDuplicate @ 0x10002acb9\n; > EditorUI::onCreate @ 0x10002e1ae\n; > EditorUI::doPasteObjects @ 0x10003e206\n; > LevelEditorLayer::createObjectsFromString @ 0x1000dfa08\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\npush    rbp                                                            ; +0x0, 0x100034810\nmov     rbp, rsp                                                       ; +0x1, 0x100034811\npush    r15                                                            ; +0x4, 0x100034814\npush    r14                                                            ; +0x6, 0x100034816\npush    r13                                                            ; +0x8, 0x100034818\npush    r12                                                            ; +0xa, 0x10003481a\npush    rbx                                                            ; +0xc, 0x10003481c\nsub     rsp, 18h                                                       ; +0xd, 0x10003481d\ncmp     byte ptr [rdi+250h], 0                                         ; +0x11, 0x100034821\njnz     loc_100034925                                                  ; +0x18, 0x100034828\nmov     rbx, rdi                                                       ; +0x1e, 0x10003482e\nmov     byte ptr [rdi+250h], 1                                         ; +0x21, 0x100034831\nlea     rdi, aYouHaveReached; \"You have reached the upper max limit of\"... ; +0x28, 0x100034838\nmov     esi, 13880h                                                    ; +0x2f, 0x10003483f\nxor     eax, eax                                                       ; +0x34, 0x100034844\ncall    sub_1007AB580                                                  ; +0x36, 0x100034846\nmov     rdi, rax                                                       ; +0x3b, 0x10003484b\ncall    cocos2d__CCString__getCString                                  ; +0x3e, 0x10003484e\nmov     r15, rax                                                       ; +0x43, 0x100034853\nmov     rdi, rax; __s                                                  ; +0x46, 0x100034856\ncall    _strlen                                                        ; +0x49, 0x100034859\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x4e, 0x10003485e\njnb     loc_100034934                                                  ; +0x52, 0x100034862\nmov     r14, rax                                                       ; +0x58, 0x100034868\nadd     rbx, 198h                                                      ; +0x5b, 0x10003486b\ncmp     rax, 17h                                                       ; +0x62, 0x100034872\njnb     short loc_10003488A                                            ; +0x66, 0x100034876\nlea     eax, [r14+r14]                                                 ; +0x68, 0x100034878\nmov     byte ptr [rbp+__dst], al                                       ; +0x6c, 0x10003487c\nlea     r12, [rbp+__dst+1]                                             ; +0x6f, 0x10003487f\ntest    r14, r14                                                       ; +0x73, 0x100034883\njnz     short loc_1000348BD                                            ; +0x76, 0x100034886\njmp     short loc_1000348CB                                            ; +0x78, 0x100034888\nmov     rax, r14                                                       ; +0x7a, 0x10003488a\nor      rax, 7                                                         ; +0x7d, 0x10003488d\nlea     rcx, [rax+1]                                                   ; +0x81, 0x100034891\ncmp     rax, 17h                                                       ; +0x85, 0x100034895\nmov     r13d, 1Ah                                                      ; +0x89, 0x100034899\ncmovnz  r13, rcx                                                       ; +0x8f, 0x10003489f\nmov     rdi, r13; __sz                                                 ; +0x93, 0x1000348a3\ncall    __Znwm; operator new(ulong)                                    ; +0x96, 0x1000348a6\nmov     r12, rax                                                       ; +0x9b, 0x1000348ab\nmov     [rbp+__p], rax                                                 ; +0x9e, 0x1000348ae\ninc     r13                                                            ; +0xa2, 0x1000348b2\nmov     [rbp+__dst], r13                                               ; +0xa5, 0x1000348b5\nmov     [rbp+var_38], r14                                              ; +0xa9, 0x1000348b9\nmov     rdi, r12; __dst                                                ; +0xad, 0x1000348bd\nmov     rsi, r15; __src                                                ; +0xb0, 0x1000348c0\nmov     rdx, r14; __len                                                ; +0xb3, 0x1000348c3\ncall    _memmove                                                       ; +0xb6, 0x1000348c6\nmov     byte ptr [r12+r14], 0                                          ; +0xbb, 0x1000348cb\nlea     rsi, aMaxObjects; \"Max Objects\"                                ; +0xc0, 0x1000348d0\nlea     rcx, aCancel; \"Cancel\"                                         ; +0xc7, 0x1000348d7\nlea     r8, aUnlimited; \"Unlimited\"                                    ; +0xce, 0x1000348de\nlea     rdx, [rbp+__dst]                                               ; +0xd5, 0x1000348e5\nmovss   xmm0, cs:dword_1008152BC                                       ; +0xd9, 0x1000348e9\nmov     rdi, rbx                                                       ; +0xe1, 0x1000348f1\ncall    FLAlertLayer__create_1                                         ; +0xe4, 0x1000348f4\nmov     rbx, rax                                                       ; +0xe9, 0x1000348f9\ntest    byte ptr [rbp+__dst], 1                                        ; +0xec, 0x1000348fc\njz      short loc_10003490B                                            ; +0xf0, 0x100034900\nmov     rdi, [rbp+__p]; __p                                            ; +0xf2, 0x100034902\ncall    __ZdlPv; operator delete(void *)                               ; +0xf6, 0x100034906\nmov     rax, [rbx]                                                     ; +0xfb, 0x10003490b\nmov     rdi, rbx                                                       ; +0xfe, 0x10003490e\nmov     esi, 7Eh ; '~'                                                 ; +0x101, 0x100034911\ncall    qword ptr [rax+48h]                                            ; +0x106, 0x100034916\nmov     rax, [rbx]                                                     ; +0x109, 0x100034919\nmov     rdi, rbx                                                       ; +0x10c, 0x10003491c\ncall    qword ptr [rax+508h]                                           ; +0x10f, 0x10003491f\nadd     rsp, 18h                                                       ; +0x115, 0x100034925\npop     rbx                                                            ; +0x119, 0x100034929\npop     r12                                                            ; +0x11a, 0x10003492a\npop     r13                                                            ; +0x11c, 0x10003492c\npop     r14                                                            ; +0x11e, 0x10003492e\npop     r15                                                            ; +0x120, 0x100034930\npop     rbp                                                            ; +0x122, 0x100034932\nretn                                                                   ; +0x123, 0x100034933\ncall    sub_100006BF0                                                  ; +0x124, 0x100034934", "xrefs": ["EditorUI::onDuplicate @ 0x10002acb9", "EditorUI::onCreate @ 0x10002e1ae", "EditorUI::doPasteObjects @ 0x10003e206", "LevelEditorLayer::createObjectsFromString @ 0x1000dfa08"], "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"}