// // sub_595870 from 0x595870 to 0x5968d0 (4192 bytes) // // 2 xrefs: // > CCTextInputNode::onTextFieldDetachWithIME @ 0x5a3ee8 // > CCTextInputNode::onTextFieldDetachWithIME @ 0x5a3f00 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // __int64 sub_595870() { const std::string *v0; // x1 cocos2d::CCArray *v1; // x26 const std::string *v2; // x1 cocos2d::CCObject *v3; // x28 const std::string *v4; // x1 __int64 v5; // x24 const std::string *v6; // x1 const std::string *v7; // x1 const std::string *v8; // x1 const std::string *v9; // x1 const std::string *v10; // x1 const std::string *v11; // x1 const std::string *v12; // x1 __int64 v13; // x27 const std::string *v14; // x1 __int64 v15; // x25 const std::string *v16; // x1 __int64 v17; // x23 const std::string *v18; // x1 const std::string *v19; // x1 const std::string *v20; // x1 const std::string *v21; // x1 const std::string *v22; // x1 const std::string *v23; // x1 const std::string *v24; // x1 const std::string *v25; // x1 const std::string *v26; // x1 const std::string *v27; // x1 __int64 v28; // x20 const std::string *v29; // x1 __int64 v30; // x19 const std::string *v31; // x1 __int64 v32; // x0 __int64 v33; // x20 char *v34; // x0 void *v35; // x0 void *v36; // x0 void *v37; // x0 void *v38; // x0 void *v39; // x0 void *v40; // x0 bool (__fastcall **p_canEncode)(cocos2d::CCObject *__hidden); // x0 char *v42; // x0 void *v43; // x0 void *v44; // x0 void *v45; // x0 void *v46; // x0 void *v47; // x0 void *v48; // x0 bool (__fastcall **v49)(cocos2d::CCObject *__hidden); // x0 char *v50; // x0 void *v51; // x0 void *v52; // x0 void *v53; // x0 void *v54; // x0 void *v55; // x0 void *v56; // x0 bool (__fastcall **v57)(cocos2d::CCObject *__hidden); // x0 unsigned int *v59; // x1 int v60; // w2 unsigned int *v61; // x1 int v62; // w2 unsigned int *v63; // x1 int v64; // w2 unsigned int *v65; // x1 int v66; // w2 unsigned int *v67; // x1 int v68; // w2 unsigned int *v69; // x1 int v70; // w2 unsigned int *v71; // x1 int v72; // w2 unsigned int *p_setTag; // x1 int setTag; // w2 unsigned int *v75; // x1 int v76; // w2 unsigned int *v77; // x1 int v78; // w2 unsigned int *v79; // x1 int v80; // w2 unsigned int *v81; // x1 int v82; // w2 unsigned int *v83; // x1 int v84; // w2 unsigned int *v85; // x1 int v86; // w2 unsigned int *v87; // x1 int v88; // w2 unsigned int *v89; // x1 int v90; // w2 unsigned int *v91; // x1 int v92; // w2 unsigned int *v93; // x1 int v94; // w2 unsigned int *v95; // x1 int v96; // w2 unsigned int *v97; // x1 int v98; // w2 unsigned int *v99; // x1 int v100; // w2 unsigned int *v101; // x1 int v102; // w2 unsigned int *v103; // x1 int v104; // w2 unsigned int *v105; // x1 int v106; // w2 __int64 v107; // [xsp+F8h] [xbp+68h] __int64 v108; // [xsp+100h] [xbp+70h] __int64 v109; // [xsp+108h] [xbp+78h] __int64 v110; // [xsp+110h] [xbp+80h] __int64 v111; // [xsp+118h] [xbp+88h] __int64 v112; // [xsp+120h] [xbp+90h] __int64 v113; // [xsp+128h] [xbp+98h] __int64 v114; // [xsp+130h] [xbp+A0h] __int64 v115; // [xsp+138h] [xbp+A8h] __int64 v116; // [xsp+140h] [xbp+B0h] __int64 v117; // [xsp+148h] [xbp+B8h] __int64 v118; // [xsp+150h] [xbp+C0h] __int64 v119; // [xsp+158h] [xbp+C8h] __int64 v120; // [xsp+160h] [xbp+D0h] __int64 v121; // [xsp+168h] [xbp+D8h] cocos2d::CCString v122; // [xsp+238h] [xbp+1A8h] BYREF cocos2d::CCString v123; // [xsp+278h] [xbp+1E8h] BYREF cocos2d::CCString v124; // [xsp+2B8h] [xbp+228h] BYREF sub_D153B8((int)&v122, "13"); v1 = (cocos2d::CCArray *)cocos2d::CCString::create(&v122, v0); sub_D153B8((int)&v122.m_uID, "b"); v3 = (cocos2d::CCObject *)cocos2d::CCString::create((cocos2d::CCString *)&v122.m_uID, v2); sub_D153B8((int)&v122.m_nTag, "i3"); v5 = cocos2d::CCString::create((cocos2d::CCString *)&v122.m_nTag, v4); sub_D153B8((int)&v122.m_uAutoReleaseCount, "b"); v121 = cocos2d::CCString::create((cocos2d::CCString *)&v122.m_uAutoReleaseCount, v6); sub_D153B8((int)&v122.m_uIndexInArray, "l3"); v120 = cocos2d::CCString::create((cocos2d::CCString *)&v122.m_uIndexInArray, v7); sub_D153B8((int)&v122.m_unknown2, "b"); v119 = cocos2d::CCString::create((cocos2d::CCString *)&v122.m_unknown2, v8); sub_D153B8((int)&v122.m_uOrderOfArrival, "0"); v118 = cocos2d::CCString::create((cocos2d::CCString *)&v122.m_uOrderOfArrival, v9); sub_D153B8((int)&v122.m_sString, "o"); v117 = cocos2d::CCString::create((cocos2d::CCString *)&v122.m_sString, v10); sub_D153B8((int)&v123, "1"); v116 = cocos2d::CCString::create(&v123, v11); sub_D153B8((int)&v123.m_uID, "i"); v13 = cocos2d::CCString::create((cocos2d::CCString *)&v123.m_uID, v12); sub_D153B8((int)&v123.m_nTag, &byte_F78BA8); v15 = cocos2d::CCString::create((cocos2d::CCString *)&v123.m_nTag, v14); sub_D153B8((int)&v123.m_uAutoReleaseCount, "r"); v17 = cocos2d::CCString::create((cocos2d::CCString *)&v123.m_uAutoReleaseCount, v16); sub_D153B8((int)&v123.m_uIndexInArray, "3"); v115 = cocos2d::CCString::create((cocos2d::CCString *)&v123.m_uIndexInArray, v18); sub_D153B8((int)&v123.m_unknown2, "e"); v114 = cocos2d::CCString::create((cocos2d::CCString *)&v123.m_unknown2, v19); sub_D153B8((int)&v123.m_uOrderOfArrival, &byte_F2CA20); v113 = cocos2d::CCString::create((cocos2d::CCString *)&v123.m_uOrderOfArrival, v20); sub_D153B8((int)&v123.m_sString, &byte_F7A380); v112 = cocos2d::CCString::create((cocos2d::CCString *)&v123.m_sString, v21); sub_D153B8((int)&v124, "5"); v111 = cocos2d::CCString::create(&v124, v22); sub_D153B8((int)&v124.m_uID, "s"); v110 = cocos2d::CCString::create((cocos2d::CCString *)&v124.m_uID, v23); sub_D153B8((int)&v124.m_nTag, "7"); v109 = cocos2d::CCString::create((cocos2d::CCString *)&v124.m_nTag, v24); sub_D153B8((int)&v124.m_uAutoReleaseCount, "t"); v108 = cocos2d::CCString::create((cocos2d::CCString *)&v124.m_uAutoReleaseCount, v25); sub_D153B8((int)&v124.m_uIndexInArray, "8"); v107 = cocos2d::CCString::create((cocos2d::CCString *)&v124.m_uIndexInArray, v26); sub_D153B8((int)&v124.m_unknown2, "b"); v28 = cocos2d::CCString::create((cocos2d::CCString *)&v124.m_unknown2, v27); sub_D153B8((int)&v124.m_uOrderOfArrival, "9"); v30 = cocos2d::CCString::create((cocos2d::CCString *)&v124.m_uOrderOfArrival, v29); sub_D153B8((int)&v124.m_sString, "g"); v32 = cocos2d::CCString::create((cocos2d::CCString *)&v124.m_sString, v31); v33 = cocos2d::CCArray::create( v1, v3, v5, v121, v120, v119, v118, v117, v116, v13, v15, v17, v115, v114, v113, v112, v111, v110, v109, v108, v107, v28, v30, v32, 0); v34 = (char *)v124.m_sString.m_data.m_data - 24; if ( (__int64 *)v124.m_sString.m_data.m_data - 3 != &qword_124B6B0 ) { if ( &pthread_create ) { v59 = (unsigned int *)((char *)v124.m_sString.m_data.m_data - 8); do v60 = __ldaxr(v59); while ( __stlxr(v60 - 1, v59) ); } else { v60 = *((_DWORD *)v124.m_sString.m_data.m_data - 2); *((_DWORD *)v124.m_sString.m_data.m_data - 2) = v60 - 1; } if ( v60 <= 0 ) operator delete(v34); } v35 = (void *)(*(_QWORD *)&v124.m_uOrderOfArrival - 24LL); if ( (__int64 *)(*(_QWORD *)&v124.m_uOrderOfArrival - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v61 = (unsigned int *)(*(_QWORD *)&v124.m_uOrderOfArrival - 8LL); do v62 = __ldaxr(v61); while ( __stlxr(v62 - 1, v61) ); } else { v62 = *(_DWORD *)(*(_QWORD *)&v124.m_uOrderOfArrival - 8LL); *(_DWORD *)(*(_QWORD *)&v124.m_uOrderOfArrival - 8LL) = v62 - 1; } if ( v62 <= 0 ) operator delete(v35); } v36 = (void *)(*(_QWORD *)&v124.m_unknown2 - 24LL); if ( (__int64 *)(*(_QWORD *)&v124.m_unknown2 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v63 = (unsigned int *)(*(_QWORD *)&v124.m_unknown2 - 8LL); do v64 = __ldaxr(v63); while ( __stlxr(v64 - 1, v63) ); } else { v64 = *(_DWORD *)(*(_QWORD *)&v124.m_unknown2 - 8LL); *(_DWORD *)(*(_QWORD *)&v124.m_unknown2 - 8LL) = v64 - 1; } if ( v64 <= 0 ) operator delete(v36); } v37 = (void *)(*(_QWORD *)&v124.m_uIndexInArray - 24LL); if ( (__int64 *)(*(_QWORD *)&v124.m_uIndexInArray - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v65 = (unsigned int *)(*(_QWORD *)&v124.m_uIndexInArray - 8LL); do v66 = __ldaxr(v65); while ( __stlxr(v66 - 1, v65) ); } else { v66 = *(_DWORD *)(*(_QWORD *)&v124.m_uIndexInArray - 8LL); *(_DWORD *)(*(_QWORD *)&v124.m_uIndexInArray - 8LL) = v66 - 1; } if ( v66 <= 0 ) operator delete(v37); } v38 = (void *)(*(_QWORD *)&v124.m_uAutoReleaseCount - 24LL); if ( (__int64 *)(*(_QWORD *)&v124.m_uAutoReleaseCount - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v67 = (unsigned int *)(*(_QWORD *)&v124.m_uAutoReleaseCount - 8LL); do v68 = __ldaxr(v67); while ( __stlxr(v68 - 1, v67) ); } else { v68 = *(_DWORD *)(*(_QWORD *)&v124.m_uAutoReleaseCount - 8LL); *(_DWORD *)(*(_QWORD *)&v124.m_uAutoReleaseCount - 8LL) = v68 - 1; } if ( v68 <= 0 ) operator delete(v38); } v39 = (void *)(*(_QWORD *)&v124.m_nTag - 24LL); if ( (__int64 *)(*(_QWORD *)&v124.m_nTag - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v69 = (unsigned int *)(*(_QWORD *)&v124.m_nTag - 8LL); do v70 = __ldaxr(v69); while ( __stlxr(v70 - 1, v69) ); } else { v70 = *(_DWORD *)(*(_QWORD *)&v124.m_nTag - 8LL); *(_DWORD *)(*(_QWORD *)&v124.m_nTag - 8LL) = v70 - 1; } if ( v70 <= 0 ) operator delete(v39); } v40 = (void *)(*(_QWORD *)&v124.m_uID - 24LL); if ( (__int64 *)(*(_QWORD *)&v124.m_uID - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v71 = (unsigned int *)(*(_QWORD *)&v124.m_uID - 8LL); do v72 = __ldaxr(v71); while ( __stlxr(v72 - 1, v71) ); } else { v72 = *(_DWORD *)(*(_QWORD *)&v124.m_uID - 8LL); *(_DWORD *)(*(_QWORD *)&v124.m_uID - 8LL) = v72 - 1; } if ( v72 <= 0 ) operator delete(v40); } p_canEncode = &v124.__vftable[-1].canEncode; if ( (__int64 *)&v124.__vftable[-1].canEncode != &qword_124B6B0 ) { if ( &pthread_create ) { p_setTag = (unsigned int *)&v124.__vftable[-1].setTag; do setTag = __ldaxr(p_setTag); while ( __stlxr(setTag - 1, p_setTag) ); } else { setTag = (int)v124.__vftable[-1].setTag; LODWORD(v124.__vftable[-1].setTag) = setTag - 1; } if ( setTag <= 0 ) operator delete(p_canEncode); } v42 = (char *)v123.m_sString.m_data.m_data - 24; if ( (__int64 *)v123.m_sString.m_data.m_data - 3 != &qword_124B6B0 ) { if ( &pthread_create ) { v75 = (unsigned int *)((char *)v123.m_sString.m_data.m_data - 8); do v76 = __ldaxr(v75); while ( __stlxr(v76 - 1, v75) ); } else { v76 = *((_DWORD *)v123.m_sString.m_data.m_data - 2); *((_DWORD *)v123.m_sString.m_data.m_data - 2) = v76 - 1; } if ( v76 <= 0 ) operator delete(v42); } v43 = (void *)(*(_QWORD *)&v123.m_uOrderOfArrival - 24LL); if ( (__int64 *)(*(_QWORD *)&v123.m_uOrderOfArrival - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v77 = (unsigned int *)(*(_QWORD *)&v123.m_uOrderOfArrival - 8LL); do v78 = __ldaxr(v77); while ( __stlxr(v78 - 1, v77) ); } else { v78 = *(_DWORD *)(*(_QWORD *)&v123.m_uOrderOfArrival - 8LL); *(_DWORD *)(*(_QWORD *)&v123.m_uOrderOfArrival - 8LL) = v78 - 1; } if ( v78 <= 0 ) operator delete(v43); } v44 = (void *)(*(_QWORD *)&v123.m_unknown2 - 24LL); if ( (__int64 *)(*(_QWORD *)&v123.m_unknown2 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v79 = (unsigned int *)(*(_QWORD *)&v123.m_unknown2 - 8LL); do v80 = __ldaxr(v79); while ( __stlxr(v80 - 1, v79) ); } else { v80 = *(_DWORD *)(*(_QWORD *)&v123.m_unknown2 - 8LL); *(_DWORD *)(*(_QWORD *)&v123.m_unknown2 - 8LL) = v80 - 1; } if ( v80 <= 0 ) operator delete(v44); } v45 = (void *)(*(_QWORD *)&v123.m_uIndexInArray - 24LL); if ( (__int64 *)(*(_QWORD *)&v123.m_uIndexInArray - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v81 = (unsigned int *)(*(_QWORD *)&v123.m_uIndexInArray - 8LL); do v82 = __ldaxr(v81); while ( __stlxr(v82 - 1, v81) ); } else { v82 = *(_DWORD *)(*(_QWORD *)&v123.m_uIndexInArray - 8LL); *(_DWORD *)(*(_QWORD *)&v123.m_uIndexInArray - 8LL) = v82 - 1; } if ( v82 <= 0 ) operator delete(v45); } v46 = (void *)(*(_QWORD *)&v123.m_uAutoReleaseCount - 24LL); if ( (__int64 *)(*(_QWORD *)&v123.m_uAutoReleaseCount - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v83 = (unsigned int *)(*(_QWORD *)&v123.m_uAutoReleaseCount - 8LL); do v84 = __ldaxr(v83); while ( __stlxr(v84 - 1, v83) ); } else { v84 = *(_DWORD *)(*(_QWORD *)&v123.m_uAutoReleaseCount - 8LL); *(_DWORD *)(*(_QWORD *)&v123.m_uAutoReleaseCount - 8LL) = v84 - 1; } if ( v84 <= 0 ) operator delete(v46); } v47 = (void *)(*(_QWORD *)&v123.m_nTag - 24LL); if ( (__int64 *)(*(_QWORD *)&v123.m_nTag - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v85 = (unsigned int *)(*(_QWORD *)&v123.m_nTag - 8LL); do v86 = __ldaxr(v85); while ( __stlxr(v86 - 1, v85) ); } else { v86 = *(_DWORD *)(*(_QWORD *)&v123.m_nTag - 8LL); *(_DWORD *)(*(_QWORD *)&v123.m_nTag - 8LL) = v86 - 1; } if ( v86 <= 0 ) operator delete(v47); } v48 = (void *)(*(_QWORD *)&v123.m_uID - 24LL); if ( (__int64 *)(*(_QWORD *)&v123.m_uID - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v87 = (unsigned int *)(*(_QWORD *)&v123.m_uID - 8LL); do v88 = __ldaxr(v87); while ( __stlxr(v88 - 1, v87) ); } else { v88 = *(_DWORD *)(*(_QWORD *)&v123.m_uID - 8LL); *(_DWORD *)(*(_QWORD *)&v123.m_uID - 8LL) = v88 - 1; } if ( v88 <= 0 ) operator delete(v48); } v49 = &v123.__vftable[-1].canEncode; if ( (__int64 *)&v123.__vftable[-1].canEncode != &qword_124B6B0 ) { if ( &pthread_create ) { v89 = (unsigned int *)&v123.__vftable[-1].setTag; do v90 = __ldaxr(v89); while ( __stlxr(v90 - 1, v89) ); } else { v90 = (int)v123.__vftable[-1].setTag; LODWORD(v123.__vftable[-1].setTag) = v90 - 1; } if ( v90 <= 0 ) operator delete(v49); } v50 = (char *)v122.m_sString.m_data.m_data - 24; if ( (__int64 *)v122.m_sString.m_data.m_data - 3 != &qword_124B6B0 ) { if ( &pthread_create ) { v91 = (unsigned int *)((char *)v122.m_sString.m_data.m_data - 8); do v92 = __ldaxr(v91); while ( __stlxr(v92 - 1, v91) ); } else { v92 = *((_DWORD *)v122.m_sString.m_data.m_data - 2); *((_DWORD *)v122.m_sString.m_data.m_data - 2) = v92 - 1; } if ( v92 <= 0 ) operator delete(v50); } v51 = (void *)(*(_QWORD *)&v122.m_uOrderOfArrival - 24LL); if ( (__int64 *)(*(_QWORD *)&v122.m_uOrderOfArrival - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v93 = (unsigned int *)(*(_QWORD *)&v122.m_uOrderOfArrival - 8LL); do v94 = __ldaxr(v93); while ( __stlxr(v94 - 1, v93) ); } else { v94 = *(_DWORD *)(*(_QWORD *)&v122.m_uOrderOfArrival - 8LL); *(_DWORD *)(*(_QWORD *)&v122.m_uOrderOfArrival - 8LL) = v94 - 1; } if ( v94 <= 0 ) operator delete(v51); } v52 = (void *)(*(_QWORD *)&v122.m_unknown2 - 24LL); if ( (__int64 *)(*(_QWORD *)&v122.m_unknown2 - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v95 = (unsigned int *)(*(_QWORD *)&v122.m_unknown2 - 8LL); do v96 = __ldaxr(v95); while ( __stlxr(v96 - 1, v95) ); } else { v96 = *(_DWORD *)(*(_QWORD *)&v122.m_unknown2 - 8LL); *(_DWORD *)(*(_QWORD *)&v122.m_unknown2 - 8LL) = v96 - 1; } if ( v96 <= 0 ) operator delete(v52); } v53 = (void *)(*(_QWORD *)&v122.m_uIndexInArray - 24LL); if ( (__int64 *)(*(_QWORD *)&v122.m_uIndexInArray - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v97 = (unsigned int *)(*(_QWORD *)&v122.m_uIndexInArray - 8LL); do v98 = __ldaxr(v97); while ( __stlxr(v98 - 1, v97) ); } else { v98 = *(_DWORD *)(*(_QWORD *)&v122.m_uIndexInArray - 8LL); *(_DWORD *)(*(_QWORD *)&v122.m_uIndexInArray - 8LL) = v98 - 1; } if ( v98 <= 0 ) operator delete(v53); } v54 = (void *)(*(_QWORD *)&v122.m_uAutoReleaseCount - 24LL); if ( (__int64 *)(*(_QWORD *)&v122.m_uAutoReleaseCount - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v99 = (unsigned int *)(*(_QWORD *)&v122.m_uAutoReleaseCount - 8LL); do v100 = __ldaxr(v99); while ( __stlxr(v100 - 1, v99) ); } else { v100 = *(_DWORD *)(*(_QWORD *)&v122.m_uAutoReleaseCount - 8LL); *(_DWORD *)(*(_QWORD *)&v122.m_uAutoReleaseCount - 8LL) = v100 - 1; } if ( v100 <= 0 ) operator delete(v54); } v55 = (void *)(*(_QWORD *)&v122.m_nTag - 24LL); if ( (__int64 *)(*(_QWORD *)&v122.m_nTag - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v101 = (unsigned int *)(*(_QWORD *)&v122.m_nTag - 8LL); do v102 = __ldaxr(v101); while ( __stlxr(v102 - 1, v101) ); } else { v102 = *(_DWORD *)(*(_QWORD *)&v122.m_nTag - 8LL); *(_DWORD *)(*(_QWORD *)&v122.m_nTag - 8LL) = v102 - 1; } if ( v102 <= 0 ) operator delete(v55); } v56 = (void *)(*(_QWORD *)&v122.m_uID - 24LL); if ( (__int64 *)(*(_QWORD *)&v122.m_uID - 24LL) != &qword_124B6B0 ) { if ( &pthread_create ) { v103 = (unsigned int *)(*(_QWORD *)&v122.m_uID - 8LL); do v104 = __ldaxr(v103); while ( __stlxr(v104 - 1, v103) ); } else { v104 = *(_DWORD *)(*(_QWORD *)&v122.m_uID - 8LL); *(_DWORD *)(*(_QWORD *)&v122.m_uID - 8LL) = v104 - 1; } if ( v104 <= 0 ) operator delete(v56); } v57 = &v122.__vftable[-1].canEncode; if ( (__int64 *)&v122.__vftable[-1].canEncode != &qword_124B6B0 ) { if ( &pthread_create ) { v105 = (unsigned int *)&v122.__vftable[-1].setTag; do v106 = __ldaxr(v105); while ( __stlxr(v106 - 1, v105) ); } else { v106 = (int)v122.__vftable[-1].setTag; LODWORD(v122.__vftable[-1].setTag) = v106 - 1; } if ( v106 <= 0 ) operator delete(v57); } return v33; }
GD Web Decomp Icon

GD Web Decomp

Raw Source