{"type": "func", "start": 5370034528, "end": 5370035210, "name": "CustomizeObjectLayer::textChanged", "pseudocode": "// \n// CustomizeObjectLayer::textChanged from 0x140143960 to 0x140143c0a (682 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x140739660\n// > <???> @ 0x140917420\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 11:27:10 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall CustomizeObjectLayer::textChanged(__int64 a1, _QWORD *a2)\n{\n  int v4; // eax\n  _BYTE *v5; // rax\n  size_t v6; // rbx\n  const char *v7; // rcx\n  char *v8; // rcx\n  cocos2d::CCString *v9; // rax\n  char *CString; // rax\n  __int64 v11; // rdx\n  int v12; // edx\n  const char *v13; // rdx\n  cocos2d::CCString *v14; // rax\n  _BYTE *v15; // rax\n  size_t v16; // rbx\n  size_t v17; // r8\n  char **v18; // rdx\n  char *v19; // rcx\n  __int128 v20; // [rsp+38h] [rbp-60h] BYREF\n  __int64 v21; // [rsp+48h] [rbp-50h]\n  __int64 v22; // [rsp+50h] [rbp-48h]\n  char *String[2]; // [rsp+58h] [rbp-40h] BYREF\n  __int128 v24; // [rsp+68h] [rbp-30h]\n\n  if ( !*(_BYTE *)(a1 + 378) )\n  {\n    v4 = (*(__int64 (__fastcall **)(_QWORD *))(*a2 + 56LL))(a2);\n    if ( v4 )\n    {\n      if ( v4 == 1 )\n      {\n        v15 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a2[74] + 600LL) + 8LL))(a2[74] + 600LL);\n        *(_OWORD *)String = 0;\n        v24 = 0;\n        v16 = -1;\n        v17 = -1;\n        do\n          ++v17;\n        while ( v15[v17] );\n        sub_14003D230(String, v15, v17);\n        v18 = String;\n        if ( *((_QWORD *)&v24 + 1) > 0xFu )\n          v18 = (char **)String[0];\n        v20 = 0;\n        v21 = 0;\n        v22 = 0;\n        do\n          ++v16;\n        while ( *((_BYTE *)v18 + v16) );\n        sub_14003D230(&v20, v18, v16);\n        TextGameObject::updateTextObject(*(_QWORD *)(a1 + 144), &v20, 0);\n        if ( *((_QWORD *)&v24 + 1) > 0xFu )\n        {\n          v19 = String[0];\n          if ( (unsigned __int64)(*((_QWORD *)&v24 + 1) + 1LL) >= 0x1000 )\n          {\n            v19 = *((char **)String[0] - 1);\n            if ( (unsigned __int64)(String[0] - v19 - 8) > 0x1F )\n              invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n          }\n          j_j_free(v19);\n        }\n      }\n    }\n    else\n    {\n      v5 = (_BYTE *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a2[74] + 600LL) + 8LL))(a2[74] + 600LL);\n      *(_OWORD *)String = 0;\n      v24 = 0;\n      v6 = -1;\n      do\n        ++v6;\n      while ( v5[v6] );\n      sub_14003D230(String, v5, v6);\n      v7 = (const char *)String;\n      if ( *((_QWORD *)&v24 + 1) > 0xFu )\n        v7 = String[0];\n      *(_DWORD *)(a1 + 204) = atoi(v7);\n      if ( *((_QWORD *)&v24 + 1) > 0xFu )\n      {\n        v8 = String[0];\n        if ( (unsigned __int64)(*((_QWORD *)&v24 + 1) + 1LL) >= 0x1000 )\n        {\n          v8 = *((char **)String[0] - 1);\n          if ( (unsigned __int64)(String[0] - v8 - 8) > 0x1F )\n            invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n        }\n        j_j_free(v8);\n      }\n      v9 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, *(unsigned int *)(a1 + 204));\n      CString = (char *)cocos2d::CCString::getCString(v9);\n      ButtonSprite::setString(*(__int64 **)(a1 + 312), CString);\n      CustomizeObjectLayer::updateSelected(a1 - 544);\n      CustomizeObjectLayer::updateColorSprite(a1 - 544, v11);\n      v12 = *(_DWORD *)(a1 + 204);\n      if ( v12 < 1000 )\n      {\n        if ( v12 <= 0 )\n        {\n          v13 = \" \";\n        }\n        else\n        {\n          v14 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8);\n          v13 = cocos2d::CCString::getCString(v14);\n        }\n      }\n      else\n      {\n        v13 = (const char *)GJSpecialColorSelect::textForColorIdx((unsigned int)v12);\n      }\n      (**(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 264) + 360LL))(\n        *(_QWORD *)(a1 + 264) + 360LL,\n        v13);\n    }\n  }\n}", "assembly": "; \n; CustomizeObjectLayer::textChanged from 0x140143960 to 0x140143c0a (682 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x140739660\n; > <???> @ 0x140917420\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 11:27:10 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x140143960\npush    rbp                                                            ; +0x5, 0x140143965\npush    rsi                                                            ; +0x6, 0x140143966\npush    rdi                                                            ; +0x7, 0x140143967\nsub     rsp, 80h                                                       ; +0x8, 0x140143968\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x14014396f\nxor     rax, rsp                                                       ; +0x16, 0x140143976\nmov     [rsp+98h+var_20], rax                                          ; +0x19, 0x140143979\nmov     rbx, rdx                                                       ; +0x1e, 0x14014397e\nmov     rdi, rcx                                                       ; +0x21, 0x140143981\nxor     ebp, ebp                                                       ; +0x24, 0x140143984\ncmp     [rcx+17Ah], bpl                                                ; +0x26, 0x140143986\njnz     loc_140143BEA                                                  ; +0x2d, 0x14014398d\nmov     rax, [rdx]                                                     ; +0x33, 0x140143993\nmov     rcx, rdx                                                       ; +0x36, 0x140143996\ncall    qword ptr [rax+38h]                                            ; +0x39, 0x140143999\ntest    eax, eax                                                       ; +0x3c, 0x14014399c\njnz     loc_140143AF6                                                  ; +0x3e, 0x14014399e\nmov     rcx, [rbx+250h]                                                ; +0x44, 0x1401439a4\nadd     rcx, 258h                                                      ; +0x4b, 0x1401439ab\nmov     rax, [rcx]                                                     ; +0x52, 0x1401439b2\ncall    qword ptr [rax+8]                                              ; +0x55, 0x1401439b5\nxorps   xmm0, xmm0                                                     ; +0x58, 0x1401439b8\nmovups  xmmword ptr [rsp+98h+String], xmm0                             ; +0x5b, 0x1401439bb\nxorps   xmm1, xmm1                                                     ; +0x60, 0x1401439c0\nmovdqu  [rsp+98h+var_30], xmm1                                         ; +0x63, 0x1401439c3\nmov     rbx, 0FFFFFFFFFFFFFFFFh                                        ; +0x69, 0x1401439c9\ninc     rbx                                                            ; +0x70, 0x1401439d0\ncmp     [rax+rbx], bpl                                                 ; +0x73, 0x1401439d3\njnz     short loc_1401439D0                                            ; +0x77, 0x1401439d7\nmov     r8, rbx                                                        ; +0x79, 0x1401439d9\nmov     rdx, rax                                                       ; +0x7c, 0x1401439dc\nlea     rcx, [rsp+98h+String]                                          ; +0x7f, 0x1401439df\ncall    sub_14003D230                                                  ; +0x84, 0x1401439e4\nlea     rcx, [rsp+98h+String]                                          ; +0x89, 0x1401439e9\ncmp     qword ptr [rsp+98h+var_30+8], 0Fh                              ; +0x8e, 0x1401439ee\ncmova   rcx, [rsp+98h+String]; String                                  ; +0x94, 0x1401439f4\ncall    cs:atoi                                                        ; +0x9a, 0x1401439fa\nmov     [rdi+0CCh], eax                                                ; +0xa0, 0x140143a00\nmov     rdx, qword ptr [rsp+98h+var_30+8]                              ; +0xa6, 0x140143a06\ncmp     rdx, 0Fh                                                       ; +0xab, 0x140143a0b\njbe     short loc_140143A55                                            ; +0xaf, 0x140143a0f\ninc     rdx                                                            ; +0xb1, 0x140143a11\nmov     rcx, [rsp+98h+String]; Block                                   ; +0xb4, 0x140143a14\nmov     rax, rcx                                                       ; +0xb9, 0x140143a19\ncmp     rdx, 1000h                                                     ; +0xbc, 0x140143a1c\njb      short loc_140143A50                                            ; +0xc3, 0x140143a23\nadd     rdx, 27h ; '''                                                 ; +0xc5, 0x140143a25\nmov     rcx, [rcx-8]                                                   ; +0xc9, 0x140143a29\nsub     rax, rcx                                                       ; +0xcd, 0x140143a2d\nsub     rax, 8                                                         ; +0xd0, 0x140143a30\ncmp     rax, 1Fh                                                       ; +0xd4, 0x140143a34\njbe     short loc_140143A50                                            ; +0xd8, 0x140143a38\nmov     [rsp+98h+Reserved], rbp; Reserved                              ; +0xda, 0x140143a3a\nxor     r9d, r9d; LineNo                                               ; +0xdf, 0x140143a3f\nxor     r8d, r8d; FileName                                             ; +0xe2, 0x140143a42\nxor     edx, edx; FunctionName                                         ; +0xe5, 0x140143a45\nxor     ecx, ecx; Expression                                           ; +0xe7, 0x140143a47\ncall    cs:_invoke_watson                                              ; +0xe9, 0x140143a49\nalign 10h                                                              ; +0xef, 0x140143a4f\ncall    j_j_free                                                       ; +0xf0, 0x140143a50\nmov     edx, [rdi+0CCh]                                                ; +0xf5, 0x140143a55\nlea     rcx, word_1406ED6F8                                            ; +0xfb, 0x140143a5b\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x102, 0x140143a62\nmov     rcx, rax                                                       ; +0x108, 0x140143a68\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x10b, 0x140143a6b\nmov     rdx, rax                                                       ; +0x111, 0x140143a71\nmov     rcx, [rdi+138h]                                                ; +0x114, 0x140143a74\ncall    ButtonSprite__setString                                        ; +0x11b, 0x140143a7b\nmov     edx, [rdi+0CCh]                                                ; +0x120, 0x140143a80\nlea     rcx, [rdi-220h]                                                ; +0x126, 0x140143a86\ncall    CustomizeObjectLayer__updateSelected                           ; +0x12d, 0x140143a8d\nlea     rcx, [rdi-220h]                                                ; +0x132, 0x140143a92\ncall    CustomizeObjectLayer__updateColorSprite                        ; +0x139, 0x140143a99\nmov     edx, [rdi+0CCh]                                                ; +0x13e, 0x140143a9e\ncmp     edx, 3E8h                                                      ; +0x144, 0x140143aa4\njl      short loc_140143AB8                                            ; +0x14a, 0x140143aaa\nmov     ecx, edx                                                       ; +0x14c, 0x140143aac\ncall    GJSpecialColorSelect__textForColorIdx                          ; +0x14e, 0x140143aae\nmov     rdx, rax                                                       ; +0x153, 0x140143ab3\njmp     short loc_140143ADE                                            ; +0x156, 0x140143ab6\ntest    edx, edx                                                       ; +0x158, 0x140143ab8\njle     short loc_140143AD7                                            ; +0x15a, 0x140143aba\nlea     rcx, word_1406ED6F8                                            ; +0x15c, 0x140143abc\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x163, 0x140143ac3\nmov     rcx, rax                                                       ; +0x169, 0x140143ac9\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x16c, 0x140143acc\nmov     rdx, rax                                                       ; +0x172, 0x140143ad2\njmp     short loc_140143ADE                                            ; +0x175, 0x140143ad5\nlea     rdx, asc_1406ED6E4; \" \"                                        ; +0x177, 0x140143ad7\nmov     rcx, [rdi+108h]                                                ; +0x17e, 0x140143ade\nadd     rcx, 168h                                                      ; +0x185, 0x140143ae5\nmov     rax, [rcx]                                                     ; +0x18c, 0x140143aec\ncall    qword ptr [rax]                                                ; +0x18f, 0x140143aef\njmp     loc_140143BEA                                                  ; +0x191, 0x140143af1\ncmp     eax, 1                                                         ; +0x196, 0x140143af6\njnz     loc_140143BEA                                                  ; +0x199, 0x140143af9\nmov     rcx, [rbx+250h]                                                ; +0x19f, 0x140143aff\nadd     rcx, 258h                                                      ; +0x1a6, 0x140143b06\nmov     rax, [rcx]                                                     ; +0x1ad, 0x140143b0d\ncall    qword ptr [rax+8]                                              ; +0x1b0, 0x140143b10\nxorps   xmm0, xmm0                                                     ; +0x1b3, 0x140143b13\nmovups  xmmword ptr [rsp+98h+String], xmm0                             ; +0x1b6, 0x140143b16\nxorps   xmm1, xmm1                                                     ; +0x1bb, 0x140143b1b\nmovdqu  [rsp+98h+var_30], xmm1                                         ; +0x1be, 0x140143b1e\nmov     rbx, 0FFFFFFFFFFFFFFFFh                                        ; +0x1c4, 0x140143b24\nmov     r8, rbx                                                        ; +0x1cb, 0x140143b2b\nxchg    ax, ax                                                         ; +0x1ce, 0x140143b2e\ninc     r8                                                             ; +0x1d0, 0x140143b30\ncmp     [rax+r8], bpl                                                  ; +0x1d3, 0x140143b33\njnz     short loc_140143B30                                            ; +0x1d7, 0x140143b37\nmov     rdx, rax                                                       ; +0x1d9, 0x140143b39\nlea     rcx, [rsp+98h+String]                                          ; +0x1dc, 0x140143b3c\ncall    sub_14003D230                                                  ; +0x1e1, 0x140143b41\nnop                                                                    ; +0x1e6, 0x140143b46\nlea     rdx, [rsp+98h+String]                                          ; +0x1e7, 0x140143b47\ncmp     qword ptr [rsp+98h+var_30+8], 0Fh                              ; +0x1ec, 0x140143b4c\ncmova   rdx, [rsp+98h+String]                                          ; +0x1f2, 0x140143b52\nxorps   xmm0, xmm0                                                     ; +0x1f8, 0x140143b58\nmovups  [rsp+98h+var_60], xmm0                                         ; +0x1fb, 0x140143b5b\nmov     [rsp+98h+var_50], rbp                                          ; +0x200, 0x140143b60\nmov     [rsp+98h+var_48], rbp                                          ; +0x205, 0x140143b65\nnop     word ptr [rax+rax+00h]                                         ; +0x20a, 0x140143b6a\ninc     rbx                                                            ; +0x210, 0x140143b70\ncmp     byte ptr [rdx+rbx], 0                                          ; +0x213, 0x140143b73\njnz     short loc_140143B70                                            ; +0x217, 0x140143b77\nmov     r8, rbx                                                        ; +0x219, 0x140143b79\nlea     rcx, [rsp+98h+var_60]                                          ; +0x21c, 0x140143b7c\ncall    sub_14003D230                                                  ; +0x221, 0x140143b81\nxor     r8d, r8d                                                       ; +0x226, 0x140143b86\nlea     rdx, [rsp+98h+var_60]                                          ; +0x229, 0x140143b89\nmov     rcx, [rdi+90h]                                                 ; +0x22e, 0x140143b8e\ncall    TextGameObject__updateTextObject                               ; +0x235, 0x140143b95\nnop                                                                    ; +0x23a, 0x140143b9a\nmov     rdx, qword ptr [rsp+98h+var_30+8]                              ; +0x23b, 0x140143b9b\ncmp     rdx, 0Fh                                                       ; +0x240, 0x140143ba0\njbe     short loc_140143BEA                                            ; +0x244, 0x140143ba4\ninc     rdx                                                            ; +0x246, 0x140143ba6\nmov     rcx, [rsp+98h+String]; Block                                   ; +0x249, 0x140143ba9\nmov     rax, rcx                                                       ; +0x24e, 0x140143bae\ncmp     rdx, 1000h                                                     ; +0x251, 0x140143bb1\njb      short loc_140143BE5                                            ; +0x258, 0x140143bb8\nadd     rdx, 27h ; '''                                                 ; +0x25a, 0x140143bba\nmov     rcx, [rcx-8]                                                   ; +0x25e, 0x140143bbe\nsub     rax, rcx                                                       ; +0x262, 0x140143bc2\nsub     rax, 8                                                         ; +0x265, 0x140143bc5\ncmp     rax, 1Fh                                                       ; +0x269, 0x140143bc9\njbe     short loc_140143BE5                                            ; +0x26d, 0x140143bcd\nmov     [rsp+98h+Reserved], rbp; Reserved                              ; +0x26f, 0x140143bcf\nxor     r9d, r9d; LineNo                                               ; +0x274, 0x140143bd4\nxor     r8d, r8d; FileName                                             ; +0x277, 0x140143bd7\nxor     edx, edx; FunctionName                                         ; +0x27a, 0x140143bda\nxor     ecx, ecx; Expression                                           ; +0x27c, 0x140143bdc\ncall    cs:_invoke_watson                                              ; +0x27e, 0x140143bde\ndb 0CCh                                                                ; +0x284, 0x140143be4\ncall    j_j_free                                                       ; +0x285, 0x140143be5\nmov     rcx, [rsp+98h+var_20]                                          ; +0x28a, 0x140143bea\nxor     rcx, rsp; StackCookie                                          ; +0x28f, 0x140143bef\ncall    __security_check_cookie                                        ; +0x292, 0x140143bf2\nmov     rbx, [rsp+98h+arg_10]                                          ; +0x297, 0x140143bf7\nadd     rsp, 80h                                                       ; +0x29f, 0x140143bff\npop     rdi                                                            ; +0x2a6, 0x140143c06\npop     rsi                                                            ; +0x2a7, 0x140143c07\npop     rbp                                                            ; +0x2a8, 0x140143c08\nretn                                                                   ; +0x2a9, 0x140143c09", "xrefs": ["<???> @ 0x140739660", "<???> @ 0x140917420"], "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"}