{"type": "func", "start": 4295183024, "end": 4295183312, "name": "EditorUI::showMaxCoinError", "pseudocode": "// \n// EditorUI::showMaxCoinError from 0x100034ab0 to 0x100034bd0 (288 bytes)\n// \n// 1 xrefs:\n// > EditorUI::onCreate @ 0x10002e1f7\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::showMaxCoinError(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 cannot add more than <cy>3</c> <cg>coins</c> in a single level.\",\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 Coins\", __dst, \"OK\", 0, 300.0);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 72LL))(v8, 122);\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 1288LL))(v8);\n}", "assembly": "; \n; EditorUI::showMaxCoinError from 0x100034ab0 to 0x100034bd0 (288 bytes)\n; \n; 1 xrefs:\n; > EditorUI::onCreate @ 0x10002e1f7\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, 0x100034ab0\nmov     rbp, rsp                                                       ; +0x1, 0x100034ab1\npush    r15                                                            ; +0x4, 0x100034ab4\npush    r14                                                            ; +0x6, 0x100034ab6\npush    r13                                                            ; +0x8, 0x100034ab8\npush    r12                                                            ; +0xa, 0x100034aba\npush    rbx                                                            ; +0xc, 0x100034abc\nsub     rsp, 18h                                                       ; +0xd, 0x100034abd\ncmp     byte ptr [rdi+250h], 0                                         ; +0x11, 0x100034ac1\njnz     loc_100034BBC                                                  ; +0x18, 0x100034ac8\nmov     rbx, rdi                                                       ; +0x1e, 0x100034ace\nmov     byte ptr [rdi+250h], 1                                         ; +0x21, 0x100034ad1\nlea     rdi, aYouCannotAddMo; \"You cannot add more than <cy>3</c> <cg>\"... ; +0x28, 0x100034ad8\nxor     eax, eax                                                       ; +0x2f, 0x100034adf\ncall    sub_1007AB580                                                  ; +0x31, 0x100034ae1\nmov     rdi, rax                                                       ; +0x36, 0x100034ae6\ncall    cocos2d__CCString__getCString                                  ; +0x39, 0x100034ae9\nmov     r15, rax                                                       ; +0x3e, 0x100034aee\nmov     rdi, rax; __s                                                  ; +0x41, 0x100034af1\ncall    _strlen                                                        ; +0x44, 0x100034af4\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x49, 0x100034af9\njnb     loc_100034BCB                                                  ; +0x4d, 0x100034afd\nmov     r14, rax                                                       ; +0x53, 0x100034b03\nadd     rbx, 198h                                                      ; +0x56, 0x100034b06\ncmp     rax, 17h                                                       ; +0x5d, 0x100034b0d\njnb     short loc_100034B25                                            ; +0x61, 0x100034b11\nlea     eax, [r14+r14]                                                 ; +0x63, 0x100034b13\nmov     byte ptr [rbp+__dst], al                                       ; +0x67, 0x100034b17\nlea     r12, [rbp+__dst+1]                                             ; +0x6a, 0x100034b1a\ntest    r14, r14                                                       ; +0x6e, 0x100034b1e\njnz     short loc_100034B58                                            ; +0x71, 0x100034b21\njmp     short loc_100034B66                                            ; +0x73, 0x100034b23\nmov     rax, r14                                                       ; +0x75, 0x100034b25\nor      rax, 7                                                         ; +0x78, 0x100034b28\nlea     rcx, [rax+1]                                                   ; +0x7c, 0x100034b2c\ncmp     rax, 17h                                                       ; +0x80, 0x100034b30\nmov     r13d, 1Ah                                                      ; +0x84, 0x100034b34\ncmovnz  r13, rcx                                                       ; +0x8a, 0x100034b3a\nmov     rdi, r13; __sz                                                 ; +0x8e, 0x100034b3e\ncall    __Znwm; operator new(ulong)                                    ; +0x91, 0x100034b41\nmov     r12, rax                                                       ; +0x96, 0x100034b46\nmov     [rbp+__p], rax                                                 ; +0x99, 0x100034b49\ninc     r13                                                            ; +0x9d, 0x100034b4d\nmov     [rbp+__dst], r13                                               ; +0xa0, 0x100034b50\nmov     [rbp+var_38], r14                                              ; +0xa4, 0x100034b54\nmov     rdi, r12; __dst                                                ; +0xa8, 0x100034b58\nmov     rsi, r15; __src                                                ; +0xab, 0x100034b5b\nmov     rdx, r14; __len                                                ; +0xae, 0x100034b5e\ncall    _memmove                                                       ; +0xb1, 0x100034b61\nmov     byte ptr [r12+r14], 0                                          ; +0xb6, 0x100034b66\nlea     rsi, aMaxCoins; \"Max Coins\"                                    ; +0xbb, 0x100034b6b\nlea     rcx, aOk; \"OK\"                                                 ; +0xc2, 0x100034b72\nlea     rdx, [rbp+__dst]                                               ; +0xc9, 0x100034b79\nmovss   xmm0, cs:dword_1008152B4                                       ; +0xcd, 0x100034b7d\nmov     rdi, rbx                                                       ; +0xd5, 0x100034b85\nxor     r8d, r8d                                                       ; +0xd8, 0x100034b88\ncall    FLAlertLayer__create_1                                         ; +0xdb, 0x100034b8b\nmov     rbx, rax                                                       ; +0xe0, 0x100034b90\ntest    byte ptr [rbp+__dst], 1                                        ; +0xe3, 0x100034b93\njz      short loc_100034BA2                                            ; +0xe7, 0x100034b97\nmov     rdi, [rbp+__p]; __p                                            ; +0xe9, 0x100034b99\ncall    __ZdlPv; operator delete(void *)                               ; +0xed, 0x100034b9d\nmov     rax, [rbx]                                                     ; +0xf2, 0x100034ba2\nmov     rdi, rbx                                                       ; +0xf5, 0x100034ba5\nmov     esi, 7Ah ; 'z'                                                 ; +0xf8, 0x100034ba8\ncall    qword ptr [rax+48h]                                            ; +0xfd, 0x100034bad\nmov     rax, [rbx]                                                     ; +0x100, 0x100034bb0\nmov     rdi, rbx                                                       ; +0x103, 0x100034bb3\ncall    qword ptr [rax+508h]                                           ; +0x106, 0x100034bb6\nadd     rsp, 18h                                                       ; +0x10c, 0x100034bbc\npop     rbx                                                            ; +0x110, 0x100034bc0\npop     r12                                                            ; +0x111, 0x100034bc1\npop     r13                                                            ; +0x113, 0x100034bc3\npop     r14                                                            ; +0x115, 0x100034bc5\npop     r15                                                            ; +0x117, 0x100034bc7\npop     rbp                                                            ; +0x119, 0x100034bc9\nretn                                                                   ; +0x11a, 0x100034bca\ncall    sub_100006BF0                                                  ; +0x11b, 0x100034bcb", "xrefs": ["EditorUI::onCreate @ 0x10002e1f7"], "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"}