// // cocos2d::CCMotionStreak::update from 0xd68850 to 0xd68ee4 (1684 bytes) // // 2 xrefs: // > @ 0x8f4e8 // > @ 0x1526ce8 // // 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 13:07:55 +0000 // __int64 __fastcall cocos2d::CCMotionStreak::update(cocos2d::CCMotionStreak *this, float a2) { float v4; // s8 unsigned int v5; // w27 unsigned int v6; // w21 float *v7; // x26 __int64 v8; // x1 __int64 v9; // x0 float v10; // s1 unsigned int v11; // w28 __int64 v12; // x3 unsigned int v13; // w26 unsigned int v14; // w27 unsigned int v15; // w20 unsigned int v16; // w24 unsigned int v17; // w21 char v18; // w0 unsigned int v19; // w3 __int64 v20; // x0 float v21; // s0 unsigned int v22; // w0 __int64 v23; // x0 __int64 v24; // x6 __int64 v25; // x5 __int64 v26; // x4 __int64 v27; // x0 __int64 v28; // x2 int v29; // w23 __int64 v30; // x0 float v31; // s0 __int64 v32; // x1 int v33; // w0 float v34; // s0 float v35; // s2 unsigned int v36; // w24 unsigned int v37; // w23 float v38; // s0 __int64 v39; // x0 __int64 v40; // x4 float v41; // s0 float *v42; // x2 unsigned int v43; // w1 unsigned int v44; // w2 unsigned int v45; // w0 float v46; // s2 float v47; // s1 __int64 v48; // x4 __int64 v49; // x1 float v50; // s0 float v51; // s0 float *v52; // x4 unsigned int v53; // w1 int v54; // w0 _BOOL4 v55; // w27 float v56; // s0 float *v57; // [xsp+78h] [xbp+78h] float v58; // [xsp+88h] [xbp+88h] BYREF float v59; // [xsp+8Ch] [xbp+8Ch] int v60; // [xsp+90h] [xbp+90h] BYREF int v61; // [xsp+98h] [xbp+98h] BYREF float v62; // [xsp+A0h] [xbp+A0h] BYREF float v63; // [xsp+A4h] [xbp+A4h] if ( !*((_BYTE *)this + 353) ) return _stack_chk_guard; v4 = a2 * *((float *)this + 95); v57 = (float *)((char *)this + 472); cocos2d::CCPoint::operator-((float *)this + 118, (float *)this + 114, &v58); if ( !*((_DWORD *)this + 98) ) { LABEL_7: v11 = 0; cocos2d::CCPoint::operator=((float *)this + 114, v57); cocos2d::CCNode::setPosition((__int64)this, (_DWORD *)this + 114); cocos2d::CCPoint::operator=(&v58, flt_1560480); v12 = *((unsigned int *)this + 98); if ( !(_DWORD)v12 ) goto LABEL_17; goto LABEL_8; } if ( fabsf(v58) > 8192.0 || fabsf(v59) > 8192.0 ) { v5 = 1; v6 = 0; do { v7 = (float *)(*((_QWORD *)this + 50) + 8LL * v6); cocos2d::CCPoint::operator-(v7, &v58, &v62); cocos2d::CCPoint::operator=(v7, &v62); v8 = 16LL * (v6 & 0x7FFFFFFF); v9 = 8LL * v5; ++v6; v5 += 2; *(float *)(*((_QWORD *)this + 52) + v8) = *(float *)(*((_QWORD *)this + 52) + v8) - v58; v10 = v58; *(float *)(*((_QWORD *)this + 52) + v8 + 4) = *(float *)(*((_QWORD *)this + 52) + v8 + 4) - v59; *(float *)(*((_QWORD *)this + 52) + v9) = *(float *)(*((_QWORD *)this + 52) + v9) - v10; *(float *)(*((_QWORD *)this + 52) + v9 + 4) = *(float *)(*((_QWORD *)this + 52) + v9 + 4) - v59; } while ( v6 < *((_DWORD *)this + 98) ); goto LABEL_7; } LABEL_8: v13 = 1; v11 = 0; v14 = 1; v15 = 0; do { while ( 1 ) { *(float *)(*((_QWORD *)this + 51) + 4LL * v15) = *(float *)(*((_QWORD *)this + 51) + 4LL * v15) - v4; v20 = *((_QWORD *)this + 51); v21 = *(float *)(v20 + 4LL * v15); if ( v21 > 0.0 ) break; v19 = *((_DWORD *)this + 98); ++v15; ++v11; v14 += 2; v13 += 8; if ( v15 >= v19 ) goto LABEL_16; } v16 = v15 - v11; v17 = 8 * (v15 - v11); if ( v11 ) { *(float *)(v20 + 4LL * v16) = v21; cocos2d::CCPoint::operator=( (float *)(*((_QWORD *)this + 50) + 8LL * v16), (float *)(*((_QWORD *)this + 50) + 8LL * v15)); *(_QWORD *)(*((_QWORD *)this + 52) + 16LL * v16) = *(_QWORD *)(*((_QWORD *)this + 52) + 16LL * v15); *(_QWORD *)(*((_QWORD *)this + 52) + 8LL * (2 * v16 + 1)) = *(_QWORD *)(*((_QWORD *)this + 52) + 8LL * v14); *(_BYTE *)(*((_QWORD *)this + 53) + v17) = *(_BYTE *)(*((_QWORD *)this + 53) + 8LL * (v15 & 0x1FFFFFFF)); *(_BYTE *)(*((_QWORD *)this + 53) + v17 + 1) = *(_BYTE *)(*((_QWORD *)this + 53) + v13); *(_BYTE *)(*((_QWORD *)this + 53) + v17 + 2) = *(_BYTE *)(*((_QWORD *)this + 53) + v13 + 1); *(_BYTE *)(*((_QWORD *)this + 53) + v17 + 4) = *(_BYTE *)(*((_QWORD *)this + 53) + 4LL * (v14 & 0x3FFFFFFF)); *(_BYTE *)(*((_QWORD *)this + 53) + v17 + 5) = *(_BYTE *)(*((_QWORD *)this + 53) + v13 + 4); *(_BYTE *)(*((_QWORD *)this + 53) + v17 + 6) = *(_BYTE *)(*((_QWORD *)this + 53) + v13 + 5); } v18 = -1; if ( !*((_BYTE *)this + 468) ) v18 = (unsigned int)(float)(*(float *)(*((_QWORD *)this + 51) + 4LL * v16) * 255.0); ++v15; v14 += 2; v13 += 8; *(_BYTE *)(*((_QWORD *)this + 53) + v17 + 3) = v18; *(_BYTE *)(*((_QWORD *)this + 53) + v17 + 7) = v18; v19 = *((_DWORD *)this + 98); } while ( v15 < v19 ); LABEL_16: v12 = v19 - v11; LABEL_17: v22 = *((_DWORD *)this + 97); *((_DWORD *)this + 98) = v12; if ( v22 <= (unsigned int)v12 || !*((_BYTE *)this + 354) ) goto LABEL_39; if ( !(_DWORD)v12 ) goto LABEL_20; cocos2d::CCPoint::CCPoint(&v60, (const cocos2d::CCPoint *)(*((_QWORD *)this + 50) + 8LL * (unsigned int)(v12 - 1))); cocos2d::CCPoint::CCPoint(&v61, (const cocos2d::CCPoint *)&v58); cocos2d::CCPoint::operator-((float *)&v60, (float *)&v61, &v62); v12 = *((unsigned int *)this + 98); v54 = *((_DWORD *)this + 98); v55 = (float)((float)(v63 * v63) + (float)(v62 * v62)) < *((float *)this + 96); if ( (_DWORD)v12 == 1 ) { if ( (float)((float)(v63 * v63) + (float)(v62 * v62)) < *((float *)this + 96) ) goto LABEL_39; } else { cocos2d::CCPoint::CCPoint(&v60, (const cocos2d::CCPoint *)(*((_QWORD *)this + 50) + 8LL * (unsigned int)(v12 - 2))); cocos2d::CCPoint::CCPoint(&v61, (const cocos2d::CCPoint *)&v58); cocos2d::CCPoint::operator-((float *)&v60, (float *)&v61, &v62); v12 = *((unsigned int *)this + 98); if ( (float)((float)(v63 * v63) + (float)(v62 * v62)) < (float)(*((float *)this + 96) + *((float *)this + 96)) || v55 ) { goto LABEL_39; } v54 = *((_DWORD *)this + 98); if ( !(_DWORD)v12 ) { LABEL_20: cocos2d::CCPoint::operator=((float *)(*((_QWORD *)this + 50) + 8LL * (unsigned int)v12), &v58); *(float *)(*((_QWORD *)this + 51) + 4LL * *((unsigned int *)this + 98)) = 1.0; v23 = (unsigned int)(8 * *((_DWORD *)this + 98)); v24 = *((_QWORD *)this + 53) + v23; v25 = (unsigned int)(v23 + 3); v26 = (unsigned int)(v23 + 7); *(_WORD *)v24 = *((_WORD *)this + 165); *(_BYTE *)(v24 + 2) = *((_BYTE *)this + 332); v27 = *((_QWORD *)this + 53) + v23; *(_WORD *)(v27 + 4) = *((_WORD *)this + 165); *(_BYTE *)(v27 + 6) = *((_BYTE *)this + 332); *(_BYTE *)(*((_QWORD *)this + 53) + v25) = -1; *(_BYTE *)(*((_QWORD *)this + 53) + v26) = -1; v28 = *((unsigned int *)this + 98); if ( (_DWORD)v28 ) { v29 = *((unsigned __int8 *)this + 352); if ( !*((_BYTE *)this + 352) ) { LABEL_24: v12 = (unsigned int)(v28 + 1); *((_DWORD *)this + 98) = v12; goto LABEL_25; } v30 = *((_QWORD *)this + 50); v31 = *((float *)this + 94); v32 = *((_QWORD *)this + 52); if ( (unsigned int)v28 > 1 ) { cocos2d::ccVertexLineToPolygon(v30, v32, v28, 1, v31); v29 = *((unsigned __int8 *)this + 352); LODWORD(v28) = *((_DWORD *)this + 98); goto LABEL_24; } cocos2d::ccVertexLineToPolygon(v30, v32, 0, 2, v31); LODWORD(v28) = *((_DWORD *)this + 98); } v29 = *((unsigned __int8 *)this + 352); goto LABEL_24; } } if ( *((float *)this + 116) == 0.0 ) { LODWORD(v12) = v54; goto LABEL_20; } cocos2d::ccpDistance( (cocos2d *)(*((_QWORD *)this + 50) + 8LL * (unsigned int)(v54 - 1)), (const cocos2d::CCPoint *)&v58, *((const cocos2d::CCPoint **)this + 50)); if ( v56 <= *((float *)this + 116) ) { LODWORD(v12) = *((_DWORD *)this + 98); goto LABEL_20; } *((_DWORD *)this + 98) = 1; cocos2d::CCPoint::operator=((float *)this + 114, v57); cocos2d::CCNode::setPosition((__int64)this, (_DWORD *)this + 114); cocos2d::CCPoint::operator=(*((float **)this + 50), flt_1560480); **((float **)this + 51) = 1.0; v12 = *((unsigned int *)this + 98); LABEL_39: v29 = *((unsigned __int8 *)this + 352); LABEL_25: if ( !v29 ) { cocos2d::ccVertexLineToPolygon(*((_QWORD *)this + 50), *((_QWORD *)this + 52), 0, v12, *((float *)this + 94)); LODWORD(v12) = *((_DWORD *)this + 98); } v33 = *((unsigned __int8 *)this + 440); if ( *((_BYTE *)this + 440) ) { if ( v11 ) { v34 = (float)v11 + *((float *)this + 112); *((float *)this + 112) = v34; } else { v34 = *((float *)this + 112); } v35 = *((float *)this + 111); if ( (float)(v35 * v34) > 1024.0 ) *((float *)this + 112) = v34 - (float)(floorf(v35 * v34) / v35); } *((_BYTE *)this + 452) = 0; if ( (_DWORD)v12 ) { if ( *((_DWORD *)this + 99) == (_DWORD)v12 ) { if ( !v33 ) return _stack_chk_guard; } else if ( !v33 ) { v36 = 1; v37 = 0; do { v38 = (float)v37; v39 = 8LL * v36; v40 = *((_QWORD *)this + 54) + 16LL * (v37++ & 0x7FFFFFFF); *(_DWORD *)v40 = 0; v36 += 2; v41 = (float)(1.0 / (float)(unsigned int)v12) * v38; *(float *)(v40 + 4) = v41; v42 = (float *)(*((_QWORD *)this + 54) + v39); *v42 = 1.0; v42[1] = v41; v43 = *((_DWORD *)this + 98); } while ( v37 < v43 ); *((_DWORD *)this + 99) = v43; return _stack_chk_guard; } v44 = 1; v45 = 0; do { v46 = *((float *)this + 112); v47 = *((float *)this + 111); v48 = *((_QWORD *)this + 54) + 16LL * (v45 & 0x7FFFFFFF); *(_DWORD *)v48 = 0; v49 = 8LL * v44; v50 = (float)v45++ + v46; v44 += 2; v51 = v50 * v47; *(float *)(v48 + 4) = v51; v52 = (float *)(*((_QWORD *)this + 54) + v49); *v52 = 1.0; v52[1] = v51; v53 = *((_DWORD *)this + 98); } while ( v45 < v53 ); *((_DWORD *)this + 99) = v53; } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source