// // CCTextInputNode::onTextFieldDetachWithIME from 0x10006ae00 to 0x10006b518 (1816 bytes) // // 2 xrefs: // > sub_10006B5B0 @ 0x10006b5bb // > @ 0x100aba2e8 // // This function is hookable on this platform (idp: pc, 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 12:19:45 +0000 // __int64 __fastcall CCTextInputNode::onTextFieldDetachWithIME(_QWORD *a1, __int64 a2) { _QWORD *v2; // rax __int64 v3; // rdi const char *v4; // r14 size_t v5; // rax size_t v6; // rbx char *v7; // r15 char v8; // r15 size_t v9; // r12 char *v10; // rbx char *v11; // r14 unsigned int i; // r15d __int64 v13; // rax __int64 v14; // rax const char *CString; // rbx __int64 v16; // r14 signed __int64 v17; // rax signed __int64 v18; // r13 void *v19; // r12 int v20; // r15d size_t v21; // r14 char *v22; // rax char *v23; // r12 __int64 v24; // rax __int64 v25; // rax char *v26; // rsi unsigned int v27; // r12d unsigned int v28; // eax __int64 v29; // rax const char *v30; // rax const char *v31; // rbx char *v32; // r13 signed __int64 v33; // r15 signed __int64 v34; // rax signed __int64 v35; // r14 signed __int64 v36; // rdx void *v37; // r15 char *v38; // r13 int v39; // r12d size_t v40; // rdx char *v41; // rax char *v42; // r15 bool v43; // al unsigned __int8 v44; // al char *v45; // rbx size_t v46; // rax size_t v47; // r14 char *v48; // r15 size_t v49; // r12 const char *v50; // r14 size_t v51; // rax std::string::size_type v52; // rbx char *data; // r15 size_t v54; // r12 _QWORD *v55; // rax __int64 v56; // rbx _QWORD *v57; // rbx __int64 v58; // rdi _QWORD *v59; // rsi __int64 v60; // rdi __int64 v62; // [rsp+8h] [rbp-D8h] _QWORD v63[2]; // [rsp+10h] [rbp-D0h] BYREF void *v64; // [rsp+20h] [rbp-C0h] std::string v65; // [rsp+28h] [rbp-B8h] BYREF __int128 v66; // [rsp+40h] [rbp-A0h] BYREF char *v67; // [rsp+50h] [rbp-90h] void *__s; // [rsp+58h] [rbp-88h] __int64 v69; // [rsp+60h] [rbp-80h] __int128 __dst; // [rsp+68h] [rbp-78h] BYREF void *__p; // [rsp+78h] [rbp-68h] char *v72; // [rsp+80h] [rbp-60h] _QWORD *v73; // [rsp+88h] [rbp-58h] __int128 v74; // [rsp+90h] [rbp-50h] BYREF void *v75; // [rsp+A0h] [rbp-40h] unsigned int v76; // [rsp+B4h] [rbp-2Ch] v2 = a1; v3 = a1[71]; v73 = v2; if ( v3 ) { (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 344LL))(v3, 0); v2 = v73; } if ( *((_BYTE *)v2 + 608) != 1 ) goto LABEL_85; v4 = (const char *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1248LL))(a2); v5 = strlen(v4); if ( v5 >= 0xFFFFFFFFFFFFFFF8LL ) LABEL_105: sub_100003630(); v6 = v5; if ( v5 >= 0x17 ) { v9 = 26; if ( (v5 | 7) != 0x17 ) v9 = (v5 | 7) + 1; v7 = (char *)operator new(v9); __p = v7; *(_QWORD *)&__dst = v9 + 1; *((_QWORD *)&__dst + 1) = v6; LABEL_12: memcpy(v7, v4, v6); v7[v6] = 0; v8 = __dst; if ( (__dst & 1) == 0 ) goto LABEL_8; goto LABEL_13; } LOBYTE(__dst) = 2 * v5; v7 = (char *)&__dst + 1; if ( v5 ) goto LABEL_12; BYTE1(__dst) = 0; v8 = __dst; if ( (__dst & 1) == 0 ) { LABEL_8: v75 = __p; v74 = __dst; goto LABEL_14; } LABEL_13: sub_10001AD30(&v74, __p, *((unsigned __int64 *)&__dst + 1)); LABEL_14: v10 = (char *)v75; v11 = (char *)&v74 + ((unsigned __int8)v74 >> 1) + 1; if ( (v74 & 1) != 0 ) v11 = (char *)v75 + *((_QWORD *)&v74 + 1); else v10 = (char *)&v74 + 1; for ( ; v10 != v11; ++v10 ) *v10 = __tolower((unsigned __int8)*v10); if ( (v8 & 1) != 0 ) operator delete(__p); v69 = sub_10006D8B0(); v62 = sub_10006E5C0(); for ( i = 0; ; i = v76 + 2 ) { v13 = sub_10006D8B0(); if ( i >= (unsigned int)sub_1007FEF90(v13) ) break; v14 = sub_1007FEFE0(v69, i); CString = (const char *)cocos2d::CCString::getCString(v14); v76 = i; if ( (v74 & 1) != 0 ) { __s = v75; v16 = *((_QWORD *)&v74 + 1); v17 = strlen(CString); if ( !v17 ) goto LABEL_37; } else { v16 = (unsigned __int8)v74 >> 1; __s = (char *)&v74 + 1; v17 = strlen(CString); if ( !v17 ) { LABEL_37: v24 = sub_1007FEFE0(v69, v76 | 1); v25 = cocos2d::CCString::getCString(v24); v26 = (char *)&v74 + 1; if ( (v74 & 1) != 0 ) v26 = (char *)v75; sub_100078050(&__dst, v26, CString, v25); if ( (v74 & 1) != 0 ) operator delete(v75); v75 = __p; v74 = __dst; continue; } } v18 = v17; if ( v16 >= v17 ) { v19 = __s; v72 = (char *)__s + v16; v20 = *CString; do { v21 = v16 - v18 + 1; if ( !v21 ) break; v22 = (char *)memchr(v19, v20, v21); if ( !v22 ) break; v23 = v22; if ( !memcmp(v22, CString, v18) ) { if ( v23 == v72 || v23 - (_BYTE *)__s == -1 ) break; goto LABEL_37; } v19 = v23 + 1; v16 = v72 - (_BYTE *)v19; } while ( v72 - (_BYTE *)v19 >= v18 ); } } v76 = 0; v27 = 0; LABEL_44: while ( v27 < (unsigned int)sub_1007FEF90(v62) ) { v29 = sub_1007FEFE0(v62, v27); v30 = (const char *)cocos2d::CCString::getCString(v29); v31 = v30; if ( (v74 & 1) != 0 ) { v32 = (char *)v75; v33 = *((_QWORD *)&v74 + 1); v34 = strlen(v30); if ( !v34 ) goto LABEL_59; } else { v33 = (unsigned __int8)v74 >> 1; v32 = (char *)&v74 + 1; v34 = strlen(v30); if ( !v34 ) goto LABEL_59; } v35 = v34; if ( v33 >= v34 ) { v36 = v33; LODWORD(v72) = v27; v37 = v32; v38 = &v32[v36]; v39 = *v31; v69 = (__int64)v37; while ( 1 ) { v40 = v36 - v35 + 1; if ( !v40 ) { v27 = (_DWORD)v72 + 1; goto LABEL_44; } v41 = (char *)memchr(v37, v39, v40); if ( !v41 ) { v27 = (_DWORD)v72 + 1; goto LABEL_44; } v42 = v41; if ( !memcmp(v41, v31, v35) ) break; v37 = v42 + 1; v36 = v38 - (_BYTE *)v37; if ( v38 - (_BYTE *)v37 < v35 ) { v27 = (_DWORD)v72 + 1; goto LABEL_44; } } v43 = v42 == v38; v32 = (char *)v69; v27 = (unsigned int)v72; if ( !v43 && &v42[-v69 + 1] != nullptr ) { LABEL_59: sub_100078050(&__dst, v32, v31, " "); if ( (v74 & 1) != 0 ) operator delete(v75); v28 = (unsigned int)__p; v75 = __p; v74 = __dst; LOBYTE(v28) = 1; v76 = v28; } } ++v27; } if ( (v76 & 1) == 0 ) { LOWORD(v66) = 0; if ( (v74 & 1) != 0 ) operator delete(v75); v44 = 0; LABEL_63: if ( !(v44 >> 1) ) goto LABEL_82; LABEL_69: if ( (v44 & 1) != 0 ) v45 = v67; else v45 = (char *)&v66 + 1; v46 = strlen(v45); if ( v46 >= 0xFFFFFFFFFFFFFFF8LL ) sub_100003630(); v47 = v46; if ( v46 >= 0x17 ) { v49 = 26; if ( (v46 | 7) != 0x17 ) v49 = (v46 | 7) + 1; v48 = (char *)operator new(v49); v64 = v48; v63[0] = v49 | 1; v63[1] = v47; } else { LOBYTE(v63[0]) = 2 * v46; v48 = (char *)v63 + 1; if ( !v46 ) { LABEL_80: v48[v47] = 0; CCTextInputNode::setString(v73, (__int64)v63); if ( (v63[0] & 1) != 0 ) operator delete(v64); goto LABEL_82; } } memmove(v48, v45, v47); goto LABEL_80; } v66 = v74; v67 = (char *)v75; v44 = v74; if ( (v74 & 1) == 0 ) goto LABEL_63; if ( *((_QWORD *)&v66 + 1) ) goto LABEL_69; LABEL_82: if ( (v66 & 1) != 0 ) operator delete(v67); v2 = v73; LABEL_85: v50 = (const char *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v2[72] + 1248LL))(v2[72]); v51 = strlen(v50); if ( v51 >= 0xFFFFFFFFFFFFFFF8LL ) goto LABEL_105; v52 = v51; if ( v51 >= 0x17 ) { v54 = 26; if ( (v51 | 7) != 0x17 ) v54 = (v51 | 7) + 1; data = (char *)operator new(v54); v65.__r_.__value_.__r.__words[2] = (std::string::size_type)data; v65.__r_.__value_.__r.__words[0] = v54 + 1; v65.__r_.__value_.__l.__size_ = v52; goto LABEL_92; } v65.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v51); data = v65.__r_.__value_.__s.__data_; if ( v51 ) LABEL_92: memmove(data, v50, v52); data[v52] = 0; CCTextInputNode::updateLabel((__int64)v73, &v65); if ( (*(_BYTE *)&v65.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v65.__r_.__value_.__l.__data_); v55 = v73; v56 = v73[85]; if ( v56 ) { v73[85] = 0; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v56 + 528LL))(v56, 1); cocos2d::CCObject::release(v56); v55 = v73; } *((_BYTE *)v55 + 460) = 0; v57 = v55; if ( (_QWORD *)qword_100BE7A80 == v55 ) qword_100BE7A80 = 0; PlatformToolbox::setKeyboardState(0); v58 = v57[73]; v59 = v57; if ( v58 ) { (*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v58 + 16LL))(v58, v57); v59 = v73; } *((_BYTE *)v59 + 676) = 0; if ( *((_BYTE *)v59 + 610) == 1 ) { v60 = v59[73]; if ( v60 ) (*(void (__fastcall **)(__int64))(*(_QWORD *)v60 + 32LL))(v60); } return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source