{"type": "func", "start": 4295182688, "end": 4295182990, "name": "EditorUI::showMaxBasicError", "pseudocode": "// \n// EditorUI::showMaxBasicError from 0x100034960 to 0x100034a8e (302 bytes)\n// \n// 3 xrefs:\n// > EditorUI::onDuplicate @ 0x10002ad00\n// > EditorUI::onCreate @ 0x10002e25e\n// > EditorUI::doPasteObjects @ 0x10003e261\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::showMaxBasicError(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 max limit of <cg>%i</c> objects. You can increase it to <cy>%i</c>, b\"\n                              \"ut your level may become unstable on some devices, so it is recommended to stay below this\"\n                              \" limit. Levels with object count above this limit will display a <co>warning</c> when played online.\",\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\", \"Increase\", 380.0);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 72LL))(v8, 125);\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 1288LL))(v8);\n}", "assembly": "; \n; EditorUI::showMaxBasicError from 0x100034960 to 0x100034a8e (302 bytes)\n; \n; 3 xrefs:\n; > EditorUI::onDuplicate @ 0x10002ad00\n; > EditorUI::onCreate @ 0x10002e25e\n; > EditorUI::doPasteObjects @ 0x10003e261\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, 0x100034960\nmov     rbp, rsp                                                       ; +0x1, 0x100034961\npush    r15                                                            ; +0x4, 0x100034964\npush    r14                                                            ; +0x6, 0x100034966\npush    r13                                                            ; +0x8, 0x100034968\npush    r12                                                            ; +0xa, 0x10003496a\npush    rbx                                                            ; +0xc, 0x10003496c\nsub     rsp, 18h                                                       ; +0xd, 0x10003496d\ncmp     byte ptr [rdi+250h], 0                                         ; +0x11, 0x100034971\njnz     loc_100034A7A                                                  ; +0x18, 0x100034978\nmov     rbx, rdi                                                       ; +0x1e, 0x10003497e\nmov     byte ptr [rdi+250h], 1                                         ; +0x21, 0x100034981\nlea     rdi, aYouHaveReached_0; \"You have reached the max limit of <cg>%\"... ; +0x28, 0x100034988\nmov     esi, 9C40h                                                     ; +0x2f, 0x10003498f\nmov     edx, 13880h                                                    ; +0x34, 0x100034994\nxor     eax, eax                                                       ; +0x39, 0x100034999\ncall    sub_1007AB580                                                  ; +0x3b, 0x10003499b\nmov     rdi, rax                                                       ; +0x40, 0x1000349a0\ncall    cocos2d__CCString__getCString                                  ; +0x43, 0x1000349a3\nmov     r15, rax                                                       ; +0x48, 0x1000349a8\nmov     rdi, rax; __s                                                  ; +0x4b, 0x1000349ab\ncall    _strlen                                                        ; +0x4e, 0x1000349ae\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x53, 0x1000349b3\njnb     loc_100034A89                                                  ; +0x57, 0x1000349b7\nmov     r14, rax                                                       ; +0x5d, 0x1000349bd\nadd     rbx, 198h                                                      ; +0x60, 0x1000349c0\ncmp     rax, 17h                                                       ; +0x67, 0x1000349c7\njnb     short loc_1000349DF                                            ; +0x6b, 0x1000349cb\nlea     eax, [r14+r14]                                                 ; +0x6d, 0x1000349cd\nmov     byte ptr [rbp+__dst], al                                       ; +0x71, 0x1000349d1\nlea     r12, [rbp+__dst+1]                                             ; +0x74, 0x1000349d4\ntest    r14, r14                                                       ; +0x78, 0x1000349d8\njnz     short loc_100034A12                                            ; +0x7b, 0x1000349db\njmp     short loc_100034A20                                            ; +0x7d, 0x1000349dd\nmov     rax, r14                                                       ; +0x7f, 0x1000349df\nor      rax, 7                                                         ; +0x82, 0x1000349e2\nlea     rcx, [rax+1]                                                   ; +0x86, 0x1000349e6\ncmp     rax, 17h                                                       ; +0x8a, 0x1000349ea\nmov     r13d, 1Ah                                                      ; +0x8e, 0x1000349ee\ncmovnz  r13, rcx                                                       ; +0x94, 0x1000349f4\nmov     rdi, r13; __sz                                                 ; +0x98, 0x1000349f8\ncall    __Znwm; operator new(ulong)                                    ; +0x9b, 0x1000349fb\nmov     r12, rax                                                       ; +0xa0, 0x100034a00\nmov     [rbp+__p], rax                                                 ; +0xa3, 0x100034a03\ninc     r13                                                            ; +0xa7, 0x100034a07\nmov     [rbp+__dst], r13                                               ; +0xaa, 0x100034a0a\nmov     [rbp+var_38], r14                                              ; +0xae, 0x100034a0e\nmov     rdi, r12; __dst                                                ; +0xb2, 0x100034a12\nmov     rsi, r15; __src                                                ; +0xb5, 0x100034a15\nmov     rdx, r14; __len                                                ; +0xb8, 0x100034a18\ncall    _memmove                                                       ; +0xbb, 0x100034a1b\nmov     byte ptr [r12+r14], 0                                          ; +0xc0, 0x100034a20\nlea     rsi, aMaxObjects; \"Max Objects\"                                ; +0xc5, 0x100034a25\nlea     rcx, aCancel; \"Cancel\"                                         ; +0xcc, 0x100034a2c\nlea     r8, aIncrease; \"Increase\"                                      ; +0xd3, 0x100034a33\nlea     rdx, [rbp+__dst]                                               ; +0xda, 0x100034a3a\nmovss   xmm0, cs:dword_1008152BC                                       ; +0xde, 0x100034a3e\nmov     rdi, rbx                                                       ; +0xe6, 0x100034a46\ncall    FLAlertLayer__create_1                                         ; +0xe9, 0x100034a49\nmov     rbx, rax                                                       ; +0xee, 0x100034a4e\ntest    byte ptr [rbp+__dst], 1                                        ; +0xf1, 0x100034a51\njz      short loc_100034A60                                            ; +0xf5, 0x100034a55\nmov     rdi, [rbp+__p]; __p                                            ; +0xf7, 0x100034a57\ncall    __ZdlPv; operator delete(void *)                               ; +0xfb, 0x100034a5b\nmov     rax, [rbx]                                                     ; +0x100, 0x100034a60\nmov     rdi, rbx                                                       ; +0x103, 0x100034a63\nmov     esi, 7Dh ; '}'                                                 ; +0x106, 0x100034a66\ncall    qword ptr [rax+48h]                                            ; +0x10b, 0x100034a6b\nmov     rax, [rbx]                                                     ; +0x10e, 0x100034a6e\nmov     rdi, rbx                                                       ; +0x111, 0x100034a71\ncall    qword ptr [rax+508h]                                           ; +0x114, 0x100034a74\nadd     rsp, 18h                                                       ; +0x11a, 0x100034a7a\npop     rbx                                                            ; +0x11e, 0x100034a7e\npop     r12                                                            ; +0x11f, 0x100034a7f\npop     r13                                                            ; +0x121, 0x100034a81\npop     r14                                                            ; +0x123, 0x100034a83\npop     r15                                                            ; +0x125, 0x100034a85\npop     rbp                                                            ; +0x127, 0x100034a87\nretn                                                                   ; +0x128, 0x100034a88\ncall    sub_100006BF0                                                  ; +0x129, 0x100034a89", "xrefs": ["EditorUI::onDuplicate @ 0x10002ad00", "EditorUI::onCreate @ 0x10002e25e", "EditorUI::doPasteObjects @ 0x10003e261"], "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"}