// // CCTextInputNode::onTextFieldInsertText from 0x6c4f64 to 0x6c5650 (1772 bytes) // // 3 xrefs: // > `non-virtual thunk to'CCTextInputNode::onTextFieldInsertText @ 0x6c5654 // > @ 0x69058 // > @ 0x141ff20 // // 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 12:51:20 +0000 // __int64 __fastcall CCTextInputNode::onTextFieldInsertText( CCTextInputNode *this, _DWORD *a2, unsigned __int8 *a3, int a4, int a5, long double a6) { int v8; // w1 unsigned int v9; // w21 _BOOL4 v11; // w23 _DWORD *v12; // x0 int v13; // w21 int v14; // w21 const char *v15; // x0 size_t v16; // x0 int v17; // w0 _QWORD *v18; // x0 int v19; // w1 _BOOL8 v20; // x0 unsigned int v21; // w21 __int64 v22; // x1 int v23; // w1 _BYTE *v24; // x0 char v25; // w1 int v26; // t1 size_t v27; // x0 int v28; // w1 int v29; // w23 int v30; // w0 int v31; // w2 int v32; // w1 _BOOL4 v33; // w1 int v34; // w0 size_t v35; // x1 char *v36; // x2 size_t v37; // x3 int v38; // w22 int v39; // w0 __int64 v40; // x22 int v41; // w1 __int64 v42; // x2 __int64 v43; // x0 char *v44; // [xsp+58h] [xbp+58h] char *v45; // [xsp+58h] [xbp+58h] __int64 v46; // [xsp+68h] [xbp+68h] BYREF size_t v47; // [xsp+70h] [xbp+70h] void *v48; // [xsp+78h] [xbp+78h] __int64 v49; // [xsp+80h] [xbp+80h] BYREF size_t v50; // [xsp+88h] [xbp+88h] void *v51; // [xsp+90h] [xbp+90h] __int64 v52; // [xsp+98h] [xbp+98h] BYREF size_t v53; // [xsp+A0h] [xbp+A0h] void *v54; // [xsp+A8h] [xbp+A8h] __int64 v55; // [xsp+B0h] [xbp+B0h] BYREF size_t v56; // [xsp+B8h] [xbp+B8h] void *v57; // [xsp+C0h] [xbp+C0h] switch ( a5 ) { case 285: v11 = 1; LABEL_12: *((float *)this + 162) = -1.0; goto LABEL_13; case 286: v11 = 0; goto LABEL_12; case 283: v8 = -1; LABEL_9: v9 = 1; CCTextInputNode::moveCursorVertical(this, v8); return v9; case 284: v8 = 1; goto LABEL_9; } if ( ((a5 - 38) & 0xFFFFFFFD) == 0 ) { if ( a5 == 38 ) v8 = -1; else v8 = 1; goto LABEL_9; } LODWORD(a6) = -1.0; v11 = a5 == 37; *((float *)this + 162) = -1.0; if ( (a5 & 0xFFFFFFFD) == 0x25 ) { LABEL_13: v12 = *((_DWORD **)this + 72); v13 = v12[188]; if ( v11 ) { if ( v13 >= 0 ) { v14 = v13 - (v13 != 0); if ( *((int *)this + 126) > 0 ) { LABEL_18: v15 = (const char *)(*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)v12 + 1248LL))(v12); v55 = 0; v44 = (char *)v15; v56 = 0; v57 = nullptr; v16 = strlen(v15); std::string::__init(&v55, v44, v16); v17 = sub_6B7D64((__int64)&v55, v14); v18 = CCTextInputNode::emoteTokenContaining(this, v17); if ( v18 ) { if ( v11 ) v19 = *(_DWORD *)v18; else v19 = v18[1] + *v18; v14 = sub_6B75E4((__int64)&v55, v19); } if ( (v55 & 1) != 0 ) operator delete(v57); v12 = *((_DWORD **)this + 72); } LABEL_25: v12[188] = v14; v9 = 1; CCTextInputNode::updateBlinkLabel(this); return v9; } v14 = v12[178] - 1; } else if ( v13 < 0 || (v14 = v13 + 1, v14 >= v12[178]) ) { v14 = -1; goto LABEL_25; } if ( (v14 & 0x80000000) == 0 && *((int *)this + 126) > 0 ) goto LABEL_18; goto LABEL_25; } v20 = a4 > 1; v9 = a3 != nullptr && v20; if ( a3 != nullptr && v20 ) { v46 = 0; v47 = 0; v48 = nullptr; std::string::__init(&v46, a3, a4); if ( *((int *)this + 126) > 0 ) { EmoteSprite::translateUnicodeEmoji(&v52, &v46); if ( (v46 & 1) != 0 ) { *(_BYTE *)v48 = 0; v47 = 0; } else { LOWORD(v46) = 0; } std::string::reserve(&v46, 0); v48 = v54; v46 = v52; v47 = v53; } sub_6C2C04((unsigned __int8 *)&v46, *((_BYTE *)this + 625), (__int64)this + 472, *((_BYTE *)this + 624), &v49); if ( (v49 & 1) != 0 ) { if ( !v50 ) { LABEL_59: operator delete(v51); goto LABEL_60; } } else if ( !((int)(unsigned __int8)v49 >> 1) ) { LABEL_60: if ( (v46 & 1) != 0 ) operator delete(v48); return v9; } v45 = (char *)(*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)a2 + 1248LL))(a2); v52 = 0; v53 = 0; v54 = nullptr; v27 = strlen(v45); std::string::__init(&v52, v45, v27); v28 = *(_DWORD *)(*((_QWORD *)this + 72) + 752LL); if ( v28 < 0 ) { v30 = (unsigned __int8)v52; v31 = v52 & 1; v29 = (unsigned __int8)v52 >> 1; if ( v31 ) v29 = v53; } else { v29 = sub_6B7D64((__int64)&v52, v28); v30 = (unsigned __int8)v52; v31 = v52 & 1; } if ( v31 ) { v32 = v53; if ( v29 > (int)v53 ) { LABEL_71: v33 = v32 > 0; goto LABEL_72; } } else { v32 = v30 >> 1; if ( v29 > v30 >> 1 ) goto LABEL_71; } v33 = v29 > 0; LABEL_72: if ( !v33 ) { v35 = 0; v29 = 0; LABEL_76: if ( (v49 & 1) != 0 ) { v36 = (char *)v51; v37 = v50; } else { v37 = (unsigned __int8)v49 >> 1; v36 = (char *)&v49 + 1; } std::string::insert(&v52, v35, v36, v37); v38 = *((_DWORD *)this + 148); if ( v38 > 0 && v38 < (int)sub_6B7CD0((__int64)&v52) ) { v39 = sub_6B7D64((__int64)&v52, v38); std::string::resize((unsigned __int8 *)&v52, v39, 0); } v55 = 0; v56 = 0; v57 = nullptr; if ( (v52 & 1) != 0 ) { std::string::__init(&v55, v54, v53); } else { v57 = v54; v55 = v52; v56 = v53; } CCTextInputNode::setString(this, (char *)&v55); if ( (v55 & 1) != 0 ) operator delete(v57); v40 = *((_QWORD *)this + 72); if ( (*(_DWORD *)(v40 + 752) & 0x80000000) == 0 ) { v41 = (unsigned __int8)v49 >> 1; if ( (v49 & 1) != 0 ) v41 = v50; *(_DWORD *)(v40 + 752) = sub_6B75E4((__int64)&v52, v29 + v41); CCTextInputNode::updateBlinkLabel(this); } if ( (v52 & 1) != 0 ) operator delete(v54); if ( (v49 & 1) == 0 ) goto LABEL_60; goto LABEL_59; } if ( v31 ) { v34 = v53; if ( v29 <= (int)v53 ) { LABEL_75: v35 = v29; goto LABEL_76; } } else { v34 = v30 >> 1; if ( v29 <= v34 ) goto LABEL_75; } v29 = v34; goto LABEL_75; } v21 = *a3; if ( v21 == 10 ) { v9 = *((unsigned __int8 *)this + 624); if ( *((_BYTE *)this + 624) ) { if ( a5 != 13 || (v43 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)v20), *(_BYTE *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v43 + 192LL))(v43) + 128)) ) { v55 = 0; v56 = 0; v57 = nullptr; std::string::__init(&v55, &byte_11AAA48, 1u); CCTextInputNode::insertAtCursor((__int64)this, (__int64)&v55); if ( (v55 & 1) != 0 ) operator delete(v57); } else { return 1; } } else if ( a5 == 13 ) { if ( *((_DWORD *)this + 175) == 5 ) { v42 = *(_QWORD *)this; *((_BYTE *)this + 676) = 1; v9 = 1; (*(void (__fastcall **)(CCTextInputNode *, _QWORD, long double))(v42 + 1160))(this, 0, a6); } else { *((_BYTE *)this + 676) = 0; return 1; } } else { *((_BYTE *)this + 676) = 1; } } else { if ( *((_BYTE *)this + 625) && ((v21 & 0x80) != 0 || (unsigned __int8)sub_6B7A78(v21, *((_BYTE *)this + 624))) ) return 1; v22 = (*((_BYTE *)this + 472) & 1) != 0 ? *((_QWORD *)this + 60) : *((_BYTE *)this + 472) >> 1; if ( v22 && std::string::find((__int64)this + 472, v21, 0) == -1 ) return 1; v23 = a2[178]; if ( v23 >= *((_DWORD *)this + 148) && *((_DWORD *)this + 148) > 0 ) { return 1; } else { v9 = (unsigned __int8)(v21 - 48) <= 9u && v23 >= *((_DWORD *)this + 168) && *((_DWORD *)this + 168) > 0; if ( v9 ) { v24 = (_BYTE *)(*(__int64 (__fastcall **)(_DWORD *, long double))(*(_QWORD *)a2 + 1248LL))(a2, a6); if ( v24 && (unsigned __int8)(*v24 - 48) <= 9u ) { while ( 1 ) { v26 = (unsigned __int8)*++v24; v25 = v26; if ( !v26 ) break; if ( (unsigned __int8)(v25 - 48) > 9u ) return 0; } } else { return 0; } } } } return v9; }
GD Web Decomp Icon

GD Web Decomp

Raw Source