{"type": "func", "start": 4295035808, "end": 4295036110, "name": "EditorUI::showMaxBasicError", "pseudocode": "// \n// EditorUI::showMaxBasicError from 0x100010ba0 to 0x100010cce (302 bytes)\n// \n// 3 xrefs:\n// > EditorUI::onCreate @ 0x10000cf6d\n// > EditorUI::onDuplicate @ 0x1005b5e72\n// > EditorUI::doPasteObjects @ 0x1005b7fb1\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::showMaxBasicError(__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 max limit of <cg>%i</c> objects. You can increase it to <cy>%i</c>, but your level may bec\"\n         \"ome unstable on some devices, so it is recommended to stay below this limit. Levels with object count above thi\"\n         \"s limit will display a <co>warning</c> when played online.\",\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\", \"Increase\", 380.0);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v7 + 72LL))(v7, 125);\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)v7 + 1312LL))(v7);\n}", "assembly": "; \n; EditorUI::showMaxBasicError from 0x100010ba0 to 0x100010cce (302 bytes)\n; \n; 3 xrefs:\n; > EditorUI::onCreate @ 0x10000cf6d\n; > EditorUI::onDuplicate @ 0x1005b5e72\n; > EditorUI::doPasteObjects @ 0x1005b7fb1\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, 0x100010ba0\nmov     rbp, rsp                                                       ; +0x1, 0x100010ba1\npush    r15                                                            ; +0x4, 0x100010ba4\npush    r14                                                            ; +0x6, 0x100010ba6\npush    r13                                                            ; +0x8, 0x100010ba8\npush    r12                                                            ; +0xa, 0x100010baa\npush    rbx                                                            ; +0xc, 0x100010bac\nsub     rsp, 18h                                                       ; +0xd, 0x100010bad\ncmp     byte ptr [rdi+278h], 0                                         ; +0x11, 0x100010bb1\njnz     loc_100010CBA                                                  ; +0x18, 0x100010bb8\nmov     rbx, rdi                                                       ; +0x1e, 0x100010bbe\nmov     byte ptr [rdi+278h], 1                                         ; +0x21, 0x100010bc1\nlea     rdi, aYouHaveReached_0; \"You have reached the max limit of <cg>%\"... ; +0x28, 0x100010bc8\nmov     esi, 9C40h                                                     ; +0x2f, 0x100010bcf\nmov     edx, 13880h                                                    ; +0x34, 0x100010bd4\nxor     eax, eax                                                       ; +0x39, 0x100010bd9\ncall    sub_10088E820                                                  ; +0x3b, 0x100010bdb\nmov     rdi, rax                                                       ; +0x40, 0x100010be0\ncall    cocos2d__CCString__getCString                                  ; +0x43, 0x100010be3\nmov     r15, rax                                                       ; +0x48, 0x100010be8\nmov     rdi, rax; __s                                                  ; +0x4b, 0x100010beb\ncall    _strlen                                                        ; +0x4e, 0x100010bee\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x53, 0x100010bf3\njnb     loc_100010CC9                                                  ; +0x57, 0x100010bf7\nmov     r14, rax                                                       ; +0x5d, 0x100010bfd\nadd     rbx, 198h                                                      ; +0x60, 0x100010c00\ncmp     rax, 17h                                                       ; +0x67, 0x100010c07\njnb     short loc_100010C1F                                            ; +0x6b, 0x100010c0b\nlea     eax, [r14+r14]                                                 ; +0x6d, 0x100010c0d\nmov     byte ptr [rbp+__dst], al                                       ; +0x71, 0x100010c11\nlea     r12, [rbp+__dst+1]                                             ; +0x74, 0x100010c14\ntest    r14, r14                                                       ; +0x78, 0x100010c18\njnz     short loc_100010C52                                            ; +0x7b, 0x100010c1b\njmp     short loc_100010C60                                            ; +0x7d, 0x100010c1d\nmov     rax, r14                                                       ; +0x7f, 0x100010c1f\nor      rax, 7                                                         ; +0x82, 0x100010c22\nlea     rcx, [rax+1]                                                   ; +0x86, 0x100010c26\ncmp     rax, 17h                                                       ; +0x8a, 0x100010c2a\nmov     r13d, 1Ah                                                      ; +0x8e, 0x100010c2e\ncmovnz  r13, rcx                                                       ; +0x94, 0x100010c34\nmov     rdi, r13; __sz                                                 ; +0x98, 0x100010c38\ncall    __Znwm; operator new(ulong)                                    ; +0x9b, 0x100010c3b\nmov     r12, rax                                                       ; +0xa0, 0x100010c40\nmov     [rbp+__p], rax                                                 ; +0xa3, 0x100010c43\ninc     r13                                                            ; +0xa7, 0x100010c47\nmov     [rbp+__dst], r13                                               ; +0xaa, 0x100010c4a\nmov     [rbp+var_38], r14                                              ; +0xae, 0x100010c4e\nmov     rdi, r12; __dst                                                ; +0xb2, 0x100010c52\nmov     rsi, r15; __src                                                ; +0xb5, 0x100010c55\nmov     rdx, r14; __len                                                ; +0xb8, 0x100010c58\ncall    _memmove                                                       ; +0xbb, 0x100010c5b\nmov     byte ptr [r12+r14], 0                                          ; +0xc0, 0x100010c60\nlea     rsi, aMaxObjects; \"Max Objects\"                                ; +0xc5, 0x100010c65\nlea     rcx, aCancel; \"Cancel\"                                         ; +0xcc, 0x100010c6c\nlea     r8, aIncrease; \"Increase\"                                      ; +0xd3, 0x100010c73\nlea     rdx, [rbp+__dst]                                               ; +0xda, 0x100010c7a\nmovss   xmm0, cs:dword_100A03824                                       ; +0xde, 0x100010c7e\nmov     rdi, rbx                                                       ; +0xe6, 0x100010c86\ncall    FLAlertLayer__create_1                                         ; +0xe9, 0x100010c89\nmov     rbx, rax                                                       ; +0xee, 0x100010c8e\ntest    byte ptr [rbp+__dst], 1                                        ; +0xf1, 0x100010c91\njz      short loc_100010CA0                                            ; +0xf5, 0x100010c95\nmov     rdi, [rbp+__p]; __p                                            ; +0xf7, 0x100010c97\ncall    __ZdlPv; operator delete(void *)                               ; +0xfb, 0x100010c9b\nmov     rax, [rbx]                                                     ; +0x100, 0x100010ca0\nmov     rdi, rbx                                                       ; +0x103, 0x100010ca3\nmov     esi, 7Dh ; '}'                                                 ; +0x106, 0x100010ca6\ncall    qword ptr [rax+48h]                                            ; +0x10b, 0x100010cab\nmov     rax, [rbx]                                                     ; +0x10e, 0x100010cae\nmov     rdi, rbx                                                       ; +0x111, 0x100010cb1\ncall    qword ptr [rax+520h]                                           ; +0x114, 0x100010cb4\nadd     rsp, 18h                                                       ; +0x11a, 0x100010cba\npop     rbx                                                            ; +0x11e, 0x100010cbe\npop     r12                                                            ; +0x11f, 0x100010cbf\npop     r13                                                            ; +0x121, 0x100010cc1\npop     r14                                                            ; +0x123, 0x100010cc3\npop     r15                                                            ; +0x125, 0x100010cc5\npop     rbp                                                            ; +0x127, 0x100010cc7\nretn                                                                   ; +0x128, 0x100010cc8\ncall    sub_100003630                                                  ; +0x129, 0x100010cc9", "xrefs": ["EditorUI::onCreate @ 0x10000cf6d", "EditorUI::onDuplicate @ 0x1005b5e72", "EditorUI::doPasteObjects @ 0x1005b7fb1"], "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"}