// // cocos2d::CCTextFieldTTF::insertText from 0x100263150 to 0x1002633ac (604 bytes) // // 2 xrefs: // > sub_10026347C @ 0x100263480 // > @ 0x100911c88 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:01:40 +0000 // void __fastcall cocos2d::CCTextFieldTTF::insertText(__int64 a1, void *a2, std::string::size_type a3, __int64 a4) { std::string::size_type v5; // x21 std::string::size_type v7; // x0 std::string::size_type v8; // x22 char v9; // w23 __int64 v10; // x0 std::string *v11; // x2 std::string *p_dst; // x8 std::string::value_type v13; // w9 int v14; // w21 std::string::value_type *v15; // x8 int v16; // t1 __int128 *v17; // x8 __int128 v18; // q0 int v19; // w1 std::string::size_type v20; // x25 int v21; // w24 std::string::size_type v22; // x22 std::string::size_type v23; // x1 std::string *v24; // x2 std::string::size_type size; // x3 std::string *v26; // x1 std::string::size_type v27; // x2 std::string *p_p; // x1 __int64 v29; // x0 std::string __p; // [xsp+0h] [xbp-70h] BYREF std::string __dst; // [xsp+18h] [xbp-58h] BYREF v5 = a3; sub_10008F3D0(&__dst, a2, (int)a3); if ( (*(_BYTE *)(a1 + 756) & 1) != 0 || (v7 = std::string::find(&__dst, 10, 0), v8 = v7, (_DWORD)v7 == -1) ) { v9 = 1; } else { std::string::erase(&__dst, (int)v7, 0xFFFFFFFFFFFFFFFFLL); v9 = 0; v5 = v8; } if ( (int)v5 < 1 ) goto LABEL_44; v10 = *(_QWORD *)(a1 + 704); if ( v10 ) { v11 = (__dst.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ? &__dst : (std::string *)__dst.__r_.__value_.__r.__words[0]; if ( ((*(__int64 (__fastcall **)(__int64, __int64, std::string *, std::string::size_type, __int64))(*(_QWORD *)v10 + 16LL))( v10, a1, v11, v5, a4) & 1) != 0 ) goto LABEL_49; } p_dst = &__dst; if ( (__dst.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL ) p_dst = (std::string *)__dst.__r_.__value_.__r.__words[0]; v13 = p_dst->__r_.__value_.__s.__data_[0]; if ( p_dst->__r_.__value_.__s.__data_[0] ) { v14 = 0; v15 = &p_dst->__r_.__value_.__s.__data_[1]; do { if ( (v13 & 0xC0) != 0x80 ) ++v14; v16 = (unsigned __int8)*v15++; v13 = v16; } while ( v16 ); } else { v14 = 0; } *(_DWORD *)(a1 + 712) += v14; v17 = *(__int128 **)(a1 + 720); if ( *((char *)v17 + 23) < 0 ) { sub_1000097D0(&__p, *(void **)v17, *((_QWORD *)v17 + 1)); } else { v18 = *v17; __p.__r_.__value_.__r.__words[2] = *((_QWORD *)v17 + 2); *(_OWORD *)&__p.__r_.__value_.__l.__data_ = v18; } v19 = *(_DWORD *)(a1 + 752); if ( v19 < 0 ) { LOBYTE(v21) = *((_BYTE *)&__dst.__r_.__value_.__s + 23); v22 = __dst.__r_.__value_.__r.__words[0]; } else { v20 = HIBYTE(__dst.__r_.__value_.__r.__words[2]); v21 = SHIBYTE(__dst.__r_.__value_.__r.__words[2]); v22 = __dst.__r_.__value_.__r.__words[0]; if ( v19 < *(_DWORD *)(a1 + 712) ) { v23 = (int)sub_1002633E4(&__p); if ( v21 >= 0 ) v24 = &__dst; else v24 = (std::string *)v22; if ( v21 >= 0 ) size = v20; else size = __dst.__r_.__value_.__l.__size_; std::string::insert(&__p, v23, (const std::string::value_type *)v24, size); *(_DWORD *)(a1 + 752) += v14; goto LABEL_40; } } if ( (v21 & 0x80u) == 0 ) v26 = &__dst; else v26 = (std::string *)v22; if ( (v21 & 0x80u) == 0 ) v27 = (unsigned __int8)v21; else v27 = __dst.__r_.__value_.__l.__size_; std::string::append(&__p, (const std::string::value_type *)v26, v27); LABEL_40: if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) p_p = &__p; else p_p = (std::string *)__p.__r_.__value_.__r.__words[0]; (*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)a1 + 1240LL))(a1, p_p); if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 ) { operator delete(__p.__r_.__value_.__l.__data_); if ( (v9 & 1) != 0 ) goto LABEL_49; goto LABEL_45; } LABEL_44: if ( (v9 & 1) != 0 ) goto LABEL_49; LABEL_45: v29 = *(_QWORD *)(a1 + 704); if ( !v29 || ((*(__int64 (__fastcall **)(__int64, __int64, const char *, __int64, __int64))(*(_QWORD *)v29 + 16LL))( v29, a1, "\n", 1, a4) & 1) == 0 ) { (*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 1264LL))(a1); } LABEL_49: if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 ) operator delete(__dst.__r_.__value_.__l.__data_); }
GD Web Decomp Icon

GD Web Decomp

Raw Source