{"type": "func", "start": 4295035472, "end": 4295035769, "name": "EditorUI::showMaxError", "pseudocode": "// \n// EditorUI::showMaxError from 0x100010a50 to 0x100010b79 (297 bytes)\n// \n// 4 xrefs:\n// > EditorUI::onCreate @ 0x10000ceae\n// > LevelEditorLayer::createObjectsFromString @ 0x1000af1f5\n// > EditorUI::onDuplicate @ 0x1005b5e2b\n// > EditorUI::doPasteObjects @ 0x1005b7f56\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:18:52 +0000\n// \n\nvoid __fastcall EditorUI::showMaxError(__int64 a1)\n{\n  __int64 v1; // rax\n  const char *CString; // r15\n  size_t v3; // rax\n  size_t v4; // r14\n  char *v5; // r12\n  size_t v6; // r13\n  __int64 v7; // rbx\n  _QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF\n  void *__p; // [rsp+10h] [rbp-30h]\n\n  if ( *(_BYTE *)(a1 + 632) )\n    return;\n  *(_BYTE *)(a1 + 632) = 1;\n  v1 = sub_10088E820(\n         \"You have reached the upper max limit of <cg>%i</c> objects. This limit can be removed completely, but it is <cr\"\n         \">not</c> recommended. Levels with object count above this limit will display a <co>warning</c> when played onli\"\n         \"ne.\\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 = (const char *)cocos2d::CCString::getCString(v1);\n  v3 = strlen(CString);\n  if ( v3 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v4 = v3;\n  if ( v3 >= 0x17 )\n  {\n    v6 = 26;\n    if ( (v3 | 7) != 0x17 )\n      v6 = (v3 | 7) + 1;\n    v5 = (char *)operator new(v6);\n    __p = v5;\n    __dst[0] = v6 + 1;\n    __dst[1] = v4;\n  }\n  else\n  {\n    LOBYTE(__dst[0]) = 2 * v3;\n    v5 = (char *)__dst + 1;\n    if ( !v3 )\n      goto LABEL_10;\n  }\n  memmove(v5, CString, v4);\nLABEL_10:\n  v5[v4] = 0;\n  v7 = FLAlertLayer::create_1(a1 + 408, \"Max Objects\", __dst, \"Cancel\", \"Unlimited\", 380.0);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 72LL))(v7, 126);\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 1312LL))(v7);\n}", "assembly": "; \n; EditorUI::showMaxError from 0x100010a50 to 0x100010b79 (297 bytes)\n; \n; 4 xrefs:\n; > EditorUI::onCreate @ 0x10000ceae\n; > LevelEditorLayer::createObjectsFromString @ 0x1000af1f5\n; > EditorUI::onDuplicate @ 0x1005b5e2b\n; > EditorUI::doPasteObjects @ 0x1005b7f56\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:18:52 +0000\n; \npush    rbp                                                            ; +0x0, 0x100010a50\nmov     rbp, rsp                                                       ; +0x1, 0x100010a51\npush    r15                                                            ; +0x4, 0x100010a54\npush    r14                                                            ; +0x6, 0x100010a56\npush    r13                                                            ; +0x8, 0x100010a58\npush    r12                                                            ; +0xa, 0x100010a5a\npush    rbx                                                            ; +0xc, 0x100010a5c\nsub     rsp, 18h                                                       ; +0xd, 0x100010a5d\ncmp     byte ptr [rdi+278h], 0                                         ; +0x11, 0x100010a61\njnz     loc_100010B65                                                  ; +0x18, 0x100010a68\nmov     rbx, rdi                                                       ; +0x1e, 0x100010a6e\nmov     byte ptr [rdi+278h], 1                                         ; +0x21, 0x100010a71\nlea     rdi, aYouHaveReached; \"You have reached the upper max limit of\"... ; +0x28, 0x100010a78\nmov     esi, 13880h                                                    ; +0x2f, 0x100010a7f\nxor     eax, eax                                                       ; +0x34, 0x100010a84\ncall    sub_10088E820                                                  ; +0x36, 0x100010a86\nmov     rdi, rax                                                       ; +0x3b, 0x100010a8b\ncall    cocos2d__CCString__getCString                                  ; +0x3e, 0x100010a8e\nmov     r15, rax                                                       ; +0x43, 0x100010a93\nmov     rdi, rax; __s                                                  ; +0x46, 0x100010a96\ncall    _strlen                                                        ; +0x49, 0x100010a99\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x4e, 0x100010a9e\njnb     loc_100010B74                                                  ; +0x52, 0x100010aa2\nmov     r14, rax                                                       ; +0x58, 0x100010aa8\nadd     rbx, 198h                                                      ; +0x5b, 0x100010aab\ncmp     rax, 17h                                                       ; +0x62, 0x100010ab2\njnb     short loc_100010ACA                                            ; +0x66, 0x100010ab6\nlea     eax, [r14+r14]                                                 ; +0x68, 0x100010ab8\nmov     byte ptr [rbp+__dst], al                                       ; +0x6c, 0x100010abc\nlea     r12, [rbp+__dst+1]                                             ; +0x6f, 0x100010abf\ntest    r14, r14                                                       ; +0x73, 0x100010ac3\njnz     short loc_100010AFD                                            ; +0x76, 0x100010ac6\njmp     short loc_100010B0B                                            ; +0x78, 0x100010ac8\nmov     rax, r14                                                       ; +0x7a, 0x100010aca\nor      rax, 7                                                         ; +0x7d, 0x100010acd\nlea     rcx, [rax+1]                                                   ; +0x81, 0x100010ad1\ncmp     rax, 17h                                                       ; +0x85, 0x100010ad5\nmov     r13d, 1Ah                                                      ; +0x89, 0x100010ad9\ncmovnz  r13, rcx                                                       ; +0x8f, 0x100010adf\nmov     rdi, r13; __sz                                                 ; +0x93, 0x100010ae3\ncall    __Znwm; operator new(ulong)                                    ; +0x96, 0x100010ae6\nmov     r12, rax                                                       ; +0x9b, 0x100010aeb\nmov     [rbp+__p], rax                                                 ; +0x9e, 0x100010aee\ninc     r13                                                            ; +0xa2, 0x100010af2\nmov     [rbp+__dst], r13                                               ; +0xa5, 0x100010af5\nmov     [rbp+var_38], r14                                              ; +0xa9, 0x100010af9\nmov     rdi, r12; __dst                                                ; +0xad, 0x100010afd\nmov     rsi, r15; __src                                                ; +0xb0, 0x100010b00\nmov     rdx, r14; __len                                                ; +0xb3, 0x100010b03\ncall    _memmove                                                       ; +0xb6, 0x100010b06\nmov     byte ptr [r12+r14], 0                                          ; +0xbb, 0x100010b0b\nlea     rsi, aMaxObjects; \"Max Objects\"                                ; +0xc0, 0x100010b10\nlea     rcx, aCancel; \"Cancel\"                                         ; +0xc7, 0x100010b17\nlea     r8, aUnlimited; \"Unlimited\"                                    ; +0xce, 0x100010b1e\nlea     rdx, [rbp+__dst]                                               ; +0xd5, 0x100010b25\nmovss   xmm0, cs:dword_100A03824                                       ; +0xd9, 0x100010b29\nmov     rdi, rbx                                                       ; +0xe1, 0x100010b31\ncall    FLAlertLayer__create_1                                         ; +0xe4, 0x100010b34\nmov     rbx, rax                                                       ; +0xe9, 0x100010b39\ntest    byte ptr [rbp+__dst], 1                                        ; +0xec, 0x100010b3c\njz      short loc_100010B4B                                            ; +0xf0, 0x100010b40\nmov     rdi, [rbp+__p]; __p                                            ; +0xf2, 0x100010b42\ncall    __ZdlPv; operator delete(void *)                               ; +0xf6, 0x100010b46\nmov     rax, [rbx]                                                     ; +0xfb, 0x100010b4b\nmov     rdi, rbx                                                       ; +0xfe, 0x100010b4e\nmov     esi, 7Eh ; '~'                                                 ; +0x101, 0x100010b51\ncall    qword ptr [rax+48h]                                            ; +0x106, 0x100010b56\nmov     rax, [rbx]                                                     ; +0x109, 0x100010b59\nmov     rdi, rbx                                                       ; +0x10c, 0x100010b5c\ncall    qword ptr [rax+520h]                                           ; +0x10f, 0x100010b5f\nadd     rsp, 18h                                                       ; +0x115, 0x100010b65\npop     rbx                                                            ; +0x119, 0x100010b69\npop     r12                                                            ; +0x11a, 0x100010b6a\npop     r13                                                            ; +0x11c, 0x100010b6c\npop     r14                                                            ; +0x11e, 0x100010b6e\npop     r15                                                            ; +0x120, 0x100010b70\npop     rbp                                                            ; +0x122, 0x100010b72\nretn                                                                   ; +0x123, 0x100010b73\ncall    sub_100003630                                                  ; +0x124, 0x100010b74", "xrefs": ["EditorUI::onCreate @ 0x10000ceae", "LevelEditorLayer::createObjectsFromString @ 0x1000af1f5", "EditorUI::onDuplicate @ 0x1005b5e2b", "EditorUI::doPasteObjects @ 0x1005b7f56"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}