{"type": "func", "start": 4296933616, "end": 4296934015, "name": "EditLevelLayer::textChanged", "pseudocode": "// \n// EditLevelLayer::textChanged from 0x1001e00f0 to 0x1001e027f (399 bytes)\n// \n// 2 xrefs:\n// > sub_1001E02C0 @ 0x1001e02cc\n// > <???> @ 0x100ade990\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:26:28 +0000\n// \n\nvoid __fastcall EditLevelLayer::textChanged(__int64 a1, _QWORD *a2)\n{\n  int v3; // eax\n  unsigned int v4; // eax\n  std::string *v5; // rdi\n  __int64 v6; // rbx\n  const char *data; // r14\n  size_t v8; // rax\n  std::string::size_type v9; // r15\n  char *v10; // r12\n  size_t v11; // r13\n  void *v12; // rdi\n  __int128 v13; // [rsp+0h] [rbp-70h] BYREF\n  void *__p; // [rsp+10h] [rbp-60h]\n  std::string __dst; // [rsp+18h] [rbp-58h] BYREF\n  std::string __str; // [rsp+30h] [rbp-40h] BYREF\n\n  v3 = (*(__int64 (__fastcall **)(_QWORD *))(*a2 + 64LL))(a2);\n  if ( v3 == 1 )\n  {\n    v6 = *(_QWORD *)(a1 + 472);\n    CCTextInputNode::getString(&__str, (__int64)a2);\n    if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )\n      data = __str.__r_.__value_.__l.__data_;\n    else\n      data = __str.__r_.__value_.__s.__data_;\n    v8 = strlen(data);\n    if ( v8 >= 0xFFFFFFFFFFFFFFF8LL )\n      sub_100003630();\n    v9 = v8;\n    if ( v8 >= 0x17 )\n    {\n      v11 = 26;\n      if ( (v8 | 7) != 0x17 )\n        v11 = (v8 | 7) + 1;\n      v10 = (char *)operator new(v11);\n      __dst.__r_.__value_.__r.__words[2] = (std::string::size_type)v10;\n      __dst.__r_.__value_.__r.__words[0] = v11 | 1;\n      __dst.__r_.__value_.__l.__size_ = v9;\n    }\n    else\n    {\n      __dst.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v8);\n      v10 = __dst.__r_.__value_.__s.__data_;\n      if ( !v8 )\n        goto LABEL_17;\n    }\n    memmove(v10, data, v9);\nLABEL_17:\n    v10[v9] = 0;\n    std::string::operator=((std::string *)(v6 + 344), &__dst);\n    if ( (*(_BYTE *)&__dst.__r_.__value_.__s.0 & 1) == 0 )\n      goto LABEL_24;\n    v12 = __dst.__r_.__value_.__l.__data_;\n    goto LABEL_23;\n  }\n  if ( v3 != 2 )\n    return;\n  CCTextInputNode::getString(&__str, (__int64)a2);\n  v4 = EmoteSprite::maxEmotesComment();\n  v5 = (std::string *)(a1 + 560);\n  if ( (int)EmoteSprite::effectiveLength(&__str, v4) < 181 )\n  {\n    std::string::operator=(v5, &__str);\n    goto LABEL_24;\n  }\n  if ( (*(_BYTE *)&v5->__r_.__value_.__s.0 & 1) != 0 )\n  {\n    sub_10001AD30(&v13, *(const void **)(a1 + 576), *(_QWORD *)(a1 + 568));\n  }\n  else\n  {\n    __p = *(void **)(a1 + 576);\n    v13 = *(_OWORD *)&v5->__r_.__value_.__l.0;\n  }\n  CCTextInputNode::setString(a2, (__int64)&v13);\n  if ( (v13 & 1) == 0 )\n    goto LABEL_24;\n  v12 = __p;\nLABEL_23:\n  operator delete(v12);\nLABEL_24:\n  if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )\n    operator delete(__str.__r_.__value_.__l.__data_);\n}", "assembly": "; \n; EditLevelLayer::textChanged from 0x1001e00f0 to 0x1001e027f (399 bytes)\n; \n; 2 xrefs:\n; > sub_1001E02C0 @ 0x1001e02cc\n; > <???> @ 0x100ade990\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:26:28 +0000\n; \npush    rbp                                                            ; +0x0, 0x1001e00f0\nmov     rbp, rsp                                                       ; +0x1, 0x1001e00f1\npush    r15                                                            ; +0x4, 0x1001e00f4\npush    r14                                                            ; +0x6, 0x1001e00f6\npush    r13                                                            ; +0x8, 0x1001e00f8\npush    r12                                                            ; +0xa, 0x1001e00fa\npush    rbx                                                            ; +0xc, 0x1001e00fc\nsub     rsp, 48h                                                       ; +0xd, 0x1001e00fd\nmov     r14, rsi                                                       ; +0x11, 0x1001e0101\nmov     rbx, rdi                                                       ; +0x14, 0x1001e0104\nmov     rax, [rsi]                                                     ; +0x17, 0x1001e0107\nmov     rdi, rsi                                                       ; +0x1a, 0x1001e010a\ncall    qword ptr [rax+40h]                                            ; +0x1d, 0x1001e010d\ncmp     eax, 1                                                         ; +0x20, 0x1001e0110\njz      short loc_1001E0169                                            ; +0x23, 0x1001e0113\ncmp     eax, 2                                                         ; +0x25, 0x1001e0115\njnz     loc_1001E026B                                                  ; +0x28, 0x1001e0118\nlea     rdi, [rbp+__str]                                               ; +0x2e, 0x1001e011e\nmov     rsi, r14                                                       ; +0x32, 0x1001e0122\ncall    CCTextInputNode__getString                                     ; +0x35, 0x1001e0125\ncall    EmoteSprite__maxEmotesComment                                  ; +0x3a, 0x1001e012a\nlea     rdi, [rbp+__str]                                               ; +0x3f, 0x1001e012f\nmov     esi, eax                                                       ; +0x43, 0x1001e0133\ncall    EmoteSprite__effectiveLength                                   ; +0x45, 0x1001e0135\nlea     rdi, [rbx+230h]; this                                          ; +0x4a, 0x1001e013a\ncmp     eax, 0B5h                                                      ; +0x51, 0x1001e0141\njl      loc_1001E021F                                                  ; +0x56, 0x1001e0146\ntest    byte ptr [rdi], 1                                              ; +0x5c, 0x1001e014c\njnz     loc_1001E022A                                                  ; +0x5f, 0x1001e014f\nmov     rax, [rdi+10h]                                                 ; +0x65, 0x1001e0155\nmov     [rbp+__p], rax                                                 ; +0x69, 0x1001e0159\nmovups  xmm0, xmmword ptr [rdi]                                        ; +0x6d, 0x1001e015d\nmovaps  [rbp+var_70], xmm0                                             ; +0x70, 0x1001e0160\njmp     loc_1001E0241                                                  ; +0x74, 0x1001e0164\nmov     rbx, [rbx+1D8h]                                                ; +0x79, 0x1001e0169\nlea     rdi, [rbp+__str]                                               ; +0x80, 0x1001e0170\nmov     rsi, r14                                                       ; +0x84, 0x1001e0174\ncall    CCTextInputNode__getString                                     ; +0x87, 0x1001e0177\ntest    byte ptr [rbp+__str.__r_.__value_], 1                          ; +0x8c, 0x1001e017c\njz      short loc_1001E0188                                            ; +0x90, 0x1001e0180\nmov     r14, qword ptr [rbp+__str.__r_.__value_+10h]                   ; +0x92, 0x1001e0182\njmp     short loc_1001E018C                                            ; +0x96, 0x1001e0186\nlea     r14, [rbp+__str.__r_.__value_+1]                               ; +0x98, 0x1001e0188\nmov     rdi, r14; __s                                                  ; +0x9c, 0x1001e018c\ncall    _strlen                                                        ; +0x9f, 0x1001e018f\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xa4, 0x1001e0194\njnb     loc_1001E027A                                                  ; +0xa8, 0x1001e0198\nmov     r15, rax                                                       ; +0xae, 0x1001e019e\ncmp     rax, 17h                                                       ; +0xb1, 0x1001e01a1\njnb     short loc_1001E01B9                                            ; +0xb5, 0x1001e01a5\nlea     eax, [r15+r15]                                                 ; +0xb7, 0x1001e01a7\nmov     byte ptr [rbp+__dst], al                                       ; +0xbb, 0x1001e01ab\nlea     r12, [rbp+__dst+1]                                             ; +0xbe, 0x1001e01ae\ntest    r15, r15                                                       ; +0xc2, 0x1001e01b2\njnz     short loc_1001E01ED                                            ; +0xc5, 0x1001e01b5\njmp     short loc_1001E01FB                                            ; +0xc7, 0x1001e01b7\nmov     rax, r15                                                       ; +0xc9, 0x1001e01b9\nor      rax, 7                                                         ; +0xcc, 0x1001e01bc\nlea     rcx, [rax+1]                                                   ; +0xd0, 0x1001e01c0\ncmp     rax, 17h                                                       ; +0xd4, 0x1001e01c4\nmov     r13d, 1Ah                                                      ; +0xd8, 0x1001e01c8\ncmovnz  r13, rcx                                                       ; +0xde, 0x1001e01ce\nmov     rdi, r13; __sz                                                 ; +0xe2, 0x1001e01d2\ncall    __Znwm; operator new(ulong)                                    ; +0xe5, 0x1001e01d5\nmov     r12, rax                                                       ; +0xea, 0x1001e01da\nmov     [rbp+var_48], rax                                              ; +0xed, 0x1001e01dd\nor      r13, 1                                                         ; +0xf1, 0x1001e01e1\nmov     [rbp+__dst], r13                                               ; +0xf5, 0x1001e01e5\nmov     [rbp+var_50], r15                                              ; +0xf9, 0x1001e01e9\nmov     rdi, r12; __dst                                                ; +0xfd, 0x1001e01ed\nmov     rsi, r14; __src                                                ; +0x100, 0x1001e01f0\nmov     rdx, r15; __len                                                ; +0x103, 0x1001e01f3\ncall    _memmove                                                       ; +0x106, 0x1001e01f6\nmov     byte ptr [r12+r15], 0                                          ; +0x10b, 0x1001e01fb\nadd     rbx, 158h                                                      ; +0x110, 0x1001e0200\nlea     rsi, [rbp+__dst]; __str                                        ; +0x117, 0x1001e0207\nmov     rdi, rbx; this                                                 ; +0x11b, 0x1001e020b\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x11e, 0x1001e020e\ntest    byte ptr [rbp+__dst], 1                                        ; +0x123, 0x1001e0213\njz      short loc_1001E025C                                            ; +0x127, 0x1001e0217\nmov     rdi, [rbp+var_48]                                              ; +0x129, 0x1001e0219\njmp     short loc_1001E0257                                            ; +0x12d, 0x1001e021d\nlea     rsi, [rbp+__str]; __str                                        ; +0x12f, 0x1001e021f\ncall    __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x133, 0x1001e0223\njmp     short loc_1001E025C                                            ; +0x138, 0x1001e0228\nmov     rdx, [rbx+238h]                                                ; +0x13a, 0x1001e022a\nmov     rsi, [rbx+240h]                                                ; +0x141, 0x1001e0231\nlea     rdi, [rbp+var_70]                                              ; +0x148, 0x1001e0238\ncall    sub_10001AD30                                                  ; +0x14c, 0x1001e023c\nlea     rsi, [rbp+var_70]                                              ; +0x151, 0x1001e0241\nmov     rdi, r14                                                       ; +0x155, 0x1001e0245\ncall    CCTextInputNode__setString                                     ; +0x158, 0x1001e0248\ntest    byte ptr [rbp+var_70], 1                                       ; +0x15d, 0x1001e024d\njz      short loc_1001E025C                                            ; +0x161, 0x1001e0251\nmov     rdi, [rbp+__p]; __p                                            ; +0x163, 0x1001e0253\ncall    __ZdlPv; operator delete(void *)                               ; +0x167, 0x1001e0257\ntest    byte ptr [rbp+__str.__r_.__value_], 1                          ; +0x16c, 0x1001e025c\njz      short loc_1001E026B                                            ; +0x170, 0x1001e0260\nmov     rdi, qword ptr [rbp+__str.__r_.__value_+10h]; __p              ; +0x172, 0x1001e0262\ncall    __ZdlPv; operator delete(void *)                               ; +0x176, 0x1001e0266\nadd     rsp, 48h                                                       ; +0x17b, 0x1001e026b\npop     rbx                                                            ; +0x17f, 0x1001e026f\npop     r12                                                            ; +0x180, 0x1001e0270\npop     r13                                                            ; +0x182, 0x1001e0272\npop     r14                                                            ; +0x184, 0x1001e0274\npop     r15                                                            ; +0x186, 0x1001e0276\npop     rbp                                                            ; +0x188, 0x1001e0278\nretn                                                                   ; +0x189, 0x1001e0279\ncall    sub_100003630                                                  ; +0x18a, 0x1001e027a", "xrefs": ["sub_1001E02C0 @ 0x1001e02cc", "<???> @ 0x100ade990"], "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"}