// // GJTransformControl::ccTouchMoved from 0x1401a7410 to 0x1401a7ca8 (2200 bytes) // // 2 xrefs: // > @ 0x140750430 // > @ 0x140919c04 // // 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 11:27:50 +0000 // // Hidden C++ exception states: #wind=2 __int64 __fastcall GJTransformControl::ccTouchMoved(__int64 a1, __int64 a2) { __int64 result; // rax __int16 v5; // ax __int64 v6; // rax __int64 v7; // r15 __int64 v8; // rax struct cocos2d::CCObject *v9; // r14 int v10; // r8d __int64 v11; // rcx int v12; // esi __int64 v13; // rax __int64 v14; // rax __int64 v15; // r9 __int64 v16; // rax __int64 v17; // rax int v18; // eax __int64 v19; // rax struct cocos2d::CCObject *v20; // rsi __int64 v21; // rbx __int64 v22; // rax __int64 v23; // rax const struct cocos2d::CCPoint *v24; // rax __int64 v25; // rax __int64 v26; // rbx __int64 v27; // rax __int64 v28; // rax float v29; // xmm6_4 float v30; // xmm1_4 __int64 v31; // rax float v32; // xmm2_4 struct cocos2d::CCObject *v33; // rsi __int64 v34; // rbx float v35; // xmm6_4 float *v36; // rax __int64 v37; // rax const struct cocos2d::CCPoint *v38; // rax __int64 v39; // rax __int64 v40; // rbx float *v41; // rax __int64 v42; // rax float v43; // xmm6_4 float v44; // xmm1_4 __int64 v45; // rax float v46; // xmm2_4 struct cocos2d::CCObject *v47; // rsi __int64 v48; // rbx __int64 v49; // rax const struct cocos2d::CCPoint *v50; // rax __int64 v51; // rax float v52; // xmm8_4 float v53; // xmm7_4 __int16 v54; // ax float v55; // xmm6_4 float v56; // xmm6_4 float v57; // xmm8_4 float v58; // xmm2_4 __int16 v59; // ax float v60; // xmm1_4 float v61; // xmm1_4 __int32 v62; // xmm8_4 float *v63; // rax float *v64; // rbx char v65; // dl float *v66; // rcx float v67; // xmm1_4 float v68; // xmm0_4 float *v69; // rsi float *v70; // rax __int64 v71; // rax float v72; // xmm2_4 struct cocos2d::CCObject *v73; // rax struct cocos2d::CCObject *v74; // rsi float v75; // xmm0_4 float v76; // xmm6_4 __int64 v77; // rbx __int64 v78; // rax __int64 v79; // rax struct cocos2d::CCObject *v80; // rax struct cocos2d::CCObject *v81; // rsi float v82; // xmm0_4 float v83; // xmm6_4 __int64 v84; // rbx float *v85; // rax __int64 v86; // rax float v87; // xmm7_4 float v88; // xmm0_4 __int64 v89; // rcx void *v90; // [rsp+20h] [rbp-40h] BYREF char v91[8]; // [rsp+28h] [rbp-38h] BYREF float v92; // [rsp+90h] [rbp+30h] BYREF float v93; // [rsp+94h] [rbp+34h] float v94; // [rsp+A8h] [rbp+48h] BYREF float v95; // [rsp+ACh] [rbp+4Ch] if ( *(_QWORD *)(a1 + 264) ) return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(*(_QWORD *)(a1 + 264) + 320LL) + 16LL))(*(_QWORD *)(a1 + 264) + 320LL); cocos2d::CCTouch::getLocation(a2, &v92); v5 = *(_WORD *)(a1 + 116); if ( v5 == 12 || v5 == 1 ) { v7 = a1 - 320; cocos2d::CCNode::convertToNodeSpace(a1 - 320, &v94, &v92); cocos2d::CCPoint::operator=(&v92, v8); } else { cocos2d::CCNode::convertToNodeSpace(*(_QWORD *)(a1 + 88), &v94, &v92); cocos2d::CCPoint::operator=(&v92, v6); v7 = a1 - 320; } result = *(unsigned int *)(a2 + 56); if ( *(_DWORD *)(a1 + 112) == (_DWORD)result ) { v9 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 192), 0); v10 = *(__int16 *)(a1 + 116); switch ( *(_WORD *)(a1 + 116) ) { case 1: cocos2d::CCPoint::operator+(&v92, &v94, a1 + 128); v11 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v90 = operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v90); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v11 = qword_14090BFD0; } if ( !(unsigned __int8)GameManager::getGameVariable(v11, "0242") ) { v12 = *(_DWORD *)(a1 + 312); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v90, (const struct cocos2d::CCPoint *)&v94); v14 = GJTransformControl::snapToNearestVertex(a1 - 320, v91, v13); cocos2d::CCPoint::operator=(&v94, v14); if ( *(_BYTE *)(a1 + 282) && !*(_DWORD *)(a1 + 312) ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v91, (const struct cocos2d::CCPoint *)&v94); LOBYTE(v15) = 1; v17 = GJTransformControl::snapToGrid(a1 - 320, &v90, v16, v15); cocos2d::CCPoint::operator=(&v94, v17); } v18 = *(_DWORD *)(a1 + 312); if ( v18 ) { if ( v18 != v12 ) { v19 = EditorSFXManager::sharedState(); EditorSFXManager::playAction(v19, 275); } } } (*(void (__fastcall **)(struct cocos2d::CCObject *, float *))(*(_QWORD *)v9 + 184LL))(v9, &v94); return GJTransformControl::updateButtons(a1 - 320, 0, 0); case 2: case 3: v20 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 192), v10 - 1); v21 = *(_QWORD *)v20; v22 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v20 + 200LL))(v20); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v94, v92 + *(float *)(a1 + 128), *(float *)(v22 + 4)); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v21 + 184))(v20, v23); if ( *(_BYTE *)(a1 + 282) ) { v24 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v20 + 200LL))(v20); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v91, v24); GJTransformControl::snapToGrid(v7, &v94, v25, 0); v26 = *(_QWORD *)v20; v27 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v20 + 200LL))(v20); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v91, v94, *(float *)(v27 + 4)); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v26 + 184))(v20, v28); } v29 = *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v9 + 200LL))(v9); v30 = *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v20 + 200LL))(v20) - v29; v31 = 136; if ( *(_WORD *)(a1 + 116) != 3 ) v31 = 144; v32 = *(float *)(v31 + a1) - v29; if ( fabs(v32) > 0.0099999998 ) { *(float *)(a1 + 272) = v30 / v32; (***(void (__fastcall ****)(_QWORD))(a1 + 120))(*(_QWORD *)(a1 + 120)); } return GJTransformControl::updateButtons(a1 - 320, 0, 0); case 4: case 5: v33 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 192), v10 - 1); v34 = *(_QWORD *)v33; v35 = v93 + *(float *)(a1 + 132); v36 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v33 + 200LL))(v33); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v94, *v36, v35); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v34 + 184))(v33, v37); if ( *(_BYTE *)(a1 + 282) ) { v38 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v33 + 200LL))(v33); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v91, v38); GJTransformControl::snapToGrid(v7, &v94, v39, 0); v40 = *(_QWORD *)v33; v41 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v33 + 200LL))(v33); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v91, *v41, v95); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v40 + 184))(v33, v42); } v43 = *(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v9 + 200LL))(v9) + 4); v44 = *(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v33 + 200LL))(v33) + 4) - v43; v45 = 140; if ( *(_WORD *)(a1 + 116) != 4 ) v45 = 148; v46 = *(float *)(v45 + a1) - v43; if ( fabs(v46) > 0.0099999998 ) { *(float *)(a1 + 276) = v44 / v46; (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 120) + 8LL))(*(_QWORD *)(a1 + 120)); } return GJTransformControl::updateButtons(a1 - 320, 0, 0); case 6: case 7: case 8: case 9: v47 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 192), v10 - 1); v48 = *(_QWORD *)v47; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v94, v92 + *(float *)(a1 + 128), v93 + *(float *)(a1 + 132)); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v48 + 184))(v47, v49); if ( *(_BYTE *)(a1 + 282) ) { v50 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v47 + 200LL))(v47); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v91, v50); GJTransformControl::snapToGrid(v7, &v94, v51, 0); (*(void (__fastcall **)(struct cocos2d::CCObject *, float *))(*(_QWORD *)v47 + 184LL))(v47, &v94); } v52 = *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v9 + 200LL))(v9); v53 = *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v47 + 200LL))(v47) - v52; v54 = *(_WORD *)(a1 + 116); if ( v54 == 7 || v54 == 9 ) v55 = *(float *)(a1 + 136); else v55 = *(float *)(a1 + 144); v56 = v55 - v52; v57 = *(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v9 + 200LL))(v9) + 4); v58 = *(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v47 + 200LL))(v47) + 4) - v57; v59 = *(_WORD *)(a1 + 116); if ( v59 == 6 || v59 == 7 ) v60 = *(float *)(a1 + 140); else v60 = *(float *)(a1 + 148); v61 = v60 - v57; v62 = _mm_load_si128((const __m128i *)&xmmword_140836C90).m128i_i32[0]; v63 = (float *)(a1 + 272); if ( COERCE_FLOAT(LODWORD(v56) & v62) > 0.0099999998 ) *v63 = v53 / v56; v64 = (float *)(a1 + 276); if ( COERCE_FLOAT(LODWORD(v61) & v62) > 0.0099999998 ) *v64 = v58 / v61; v65 = *(_BYTE *)(a1 + 280); v66 = (float *)(a1 + 272); if ( v65 ) { v67 = *(float *)(a1 + 168); if ( v67 != 0.0 ) { v68 = *(float *)(a1 + 172); v66 = (float *)(a1 + 272); if ( v68 != 0.0 ) { *v64 = (float)(v68 * *v63) / v67; LABEL_55: (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 120) + 16LL))(*(_QWORD *)(a1 + 120)); return GJTransformControl::updateButtons(a1 - 320, 0, 0); } } } v69 = v66; v70 = (float *)(a1 + 276); if ( !v65 ) { v71 = cocos2d::CCDirector::sharedDirector(v66); if ( !*(_BYTE *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v71 + 176LL))(v71) + 152) ) goto LABEL_55; v70 = (float *)(a1 + 276); } v72 = *v69; if ( COERCE_FLOAT(*(_DWORD *)v69 & v62) < COERCE_FLOAT(*(_DWORD *)v64 & v62) ) v72 = *v64; *v69 = v72; *v70 = v72; goto LABEL_55; case 0xA: v73 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 192), v10 - 1); v74 = v73; v75 = v92 + *(float *)(a1 + 128); v76 = -100.0; if ( v75 >= -100.0 ) v76 = fminf(100.0, v75); v77 = *(_QWORD *)v73; v78 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v73 + 200LL))(v73); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v94, v76, *(float *)(v78 + 4)); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v77 + 184))(v74, v79); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 120) + 64LL))(*(_QWORD *)(a1 + 120)); return GJTransformControl::updateButtons(a1 - 320, 0, 0); case 0xB: v80 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 192), v10 - 1); v81 = v80; v82 = v93 + *(float *)(a1 + 132); v83 = -100.0; if ( v82 >= -100.0 ) v83 = fminf(100.0, v82); v84 = *(_QWORD *)v80; v85 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v80 + 200LL))(v80); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v94, *v85, v83); (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v84 + 184))(v81, v86); (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 120) + 72LL))(*(_QWORD *)(a1 + 120)); return GJTransformControl::updateButtons(a1 - 320, 0, 0); case 0xC: v87 = (float)((float)((float)-(float)(atan2f(v93 + *(float *)(a1 + 132), v92 + *(float *)(a1 + 128)) * 57.29578) * 100.0) / 100.0) - *(float *)(a1 + 292); if ( *(_BYTE *)(a1 + 282) ) { v88 = roundf(v87 / 45.0) * 45.0; if ( fabs(v88 - v87) < 4.0 ) v87 = v88; } if ( v87 != *(float *)(a1 + 288) ) { *(float *)(a1 + 288) = v87; (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 96) + 352LL))(*(_QWORD *)(a1 + 96)); v89 = *(_QWORD *)(a1 + 120); if ( v89 ) { if ( !*(_BYTE *)(a1 + 283) ) (*(void (__fastcall **)(__int64))(*(_QWORD *)v89 + 40LL))(v89); } } return GJTransformControl::updateButtons(a1 - 320, 0, 0); default: return GJTransformControl::updateButtons(a1 - 320, 0, 0); } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source