// // HardStreak::updateStroke from 0x958e34 to 0x95992c (2808 bytes) // // 7 xrefs: // > PlayerObject::updateEffects @ 0x74ea94 // > HardStreak::resumeStroke @ 0x959948 // > HardStreak::firstSetup @ 0x9599b4 // > @ 0xb4388 // > HardStreak::scheduleAutoUpdate @ 0x958508 // > HardStreak::stopStroke @ 0x958554 // > @ 0x1545278 // // 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:57:26 +0000 // __int64 __fastcall HardStreak::updateStroke(HardStreak *this, float a2) { int v4; // w1 const cocos2d::CCPoint *v5; // x0 cocos2d::CCArray *v6; // x0 unsigned __int64 v7; // x1 long double v8; // q0 __int64 v9; // x0 unsigned int *v10; // x1 __int64 *v11; // x19 __int64 v12; // x0 char *v13; // x21 __int64 v14; // x1 long double v15; // q0 char *v16; // x0 long double v17; // q0 char *v18; // x0 long double v19; // q0 cocos2d::CCPoint *v20; // x19 cocos2d::CCPoint *v21; // x1 __int64 v22; // x27 int v23; // w25 long double v24; // q0 __int64 v25; // x19 __int64 v26; // x21 char *v27; // x0 char *v28; // x1 char *v29; // x19 const cocos2d::CCPoint *v30; // x1 __int64 v31; // x24 __int64 v32; // x21 int v33; // w19 __int64 v34; // x23 __n128 v35; // q0 __int64 v36; // x2 const cocos2d::CCPoint *v37; // x1 float v38; // s0 char *v39; // x23 float v40; // s0 float v41; // s0 __int64 v42; // x19 const cocos2d::CCPoint *v43; // x1 float v44; // s10 float v45; // s0 float v46; // s13 float v47; // s0 float v48; // s8 float v49; // s8 float v50; // s8 unsigned __int8 *v51; // x0 int v52; // w2 float v53; // s1 __int64 v54; // x1 float v55; // s0 float v56; // s0 __int64 v57; // x22 int v58; // w24 __int64 v59; // x23 int v60; // w27 __int64 j; // x19 long double v62; // q0 long double v63; // q0 float v64; // s8 __int64 v65; // x21 long double v66; // q0 char *v67; // x19 const cocos2d::CCPoint *v68; // x1 long double v69; // q0 cocos2d::CCPoint *v70; // x19 cocos2d::CCPoint *v71; // x21 cocos2d::CCPoint *v72; // x0 cocos2d::CCPoint *v73; // x1 char *v74; // x2 char *v75; // x0 int v76; // [xsp+ACh] [xbp+ACh] int i; // [xsp+B0h] [xbp+B0h] unsigned __int64 v78; // [xsp+B8h] [xbp+B8h] int v79; // [xsp+D0h] [xbp+D0h] int v80; // [xsp+D4h] [xbp+D4h] char v81[8]; // [xsp+E0h] [xbp+E0h] BYREF char v82[8]; // [xsp+E8h] [xbp+E8h] BYREF char v83[8]; // [xsp+F0h] [xbp+F0h] BYREF __int64 v84; // [xsp+F8h] [xbp+F8h] BYREF char v85[8]; // [xsp+100h] [xbp+100h] BYREF __int64 v86; // [xsp+108h] [xbp+108h] BYREF char v87[8]; // [xsp+110h] [xbp+110h] BYREF __int64 v88; // [xsp+118h] [xbp+118h] BYREF __int64 v89; // [xsp+120h] [xbp+120h] BYREF void *v90; // [xsp+128h] [xbp+128h] BYREF cocos2d::CCPoint *v91; // [xsp+130h] [xbp+130h] char *v92; // [xsp+138h] [xbp+138h] BYREF void *v93; // [xsp+140h] [xbp+140h] BYREF char *v94; // [xsp+148h] [xbp+148h] void *v95; // [xsp+158h] [xbp+158h] BYREF char *v96; // [xsp+160h] [xbp+160h] _DWORD v97[2]; // [xsp+170h] [xbp+170h] BYREF __int64 v98; // [xsp+178h] [xbp+178h] BYREF __int64 v99; // [xsp+180h] [xbp+180h] BYREF __int64 v100; // [xsp+188h] [xbp+188h] BYREF cocos2d::CCPoint *v101; // [xsp+190h] [xbp+190h] BYREF cocos2d::CCPoint *v102; // [xsp+198h] [xbp+198h] cocos2d::CCPoint *v103; // [xsp+1A0h] [xbp+1A0h] char *v104; // [xsp+1A8h] [xbp+1A8h] if ( !*((_BYTE *)this + 442) ) return _stack_chk_guard; cocos2d::CCDrawNode::clear(this); if ( !(unsigned int)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 52)) || !(*(unsigned __int8 (__fastcall **)(HardStreak *))(*(_QWORD *)this + 896LL))(this) ) { return _stack_chk_guard; } if ( *((_BYTE *)this + 440) ) v4 = 1; else v4 = 2; v76 = v4; v5 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(HardStreak *))(*(_QWORD *)this + 192LL))(this); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v81, v5); v90 = nullptr; v6 = *((cocos2d::CCArray **)this + 52); v91 = nullptr; v92 = nullptr; v7 = (unsigned int)cocos2d::CCArray::count(v6) + 1; if ( v7 > (v92 - (_BYTE *)v90) >> 3 ) { std::__split_buffer::__split_buffer( (__int64 *)&v101, v7, (v91 - (cocos2d::CCPoint *)v90) >> 3, (__int64)&v92); v70 = (cocos2d::CCPoint *)v90; v71 = v91; if ( v90 == v91 ) { v90 = v102; v75 = v92; v91 = v103; v102 = v70; v103 = v70; v92 = v104; v104 = v75; v101 = v70; } else { v72 = v102; do { v72 = (cocos2d::CCPoint *)((char *)v72 - 8); v71 = (cocos2d::CCPoint *)((char *)v71 - 8); if ( v72 ) { cocos2d::CCPoint::CCPoint(v72, v71); v72 = (cocos2d::CCPoint *)((char *)v102 - 8); } v102 = v72; } while ( v70 != v71 ); v70 = (cocos2d::CCPoint *)v90; v73 = v91; v90 = v72; v74 = v92; v91 = v103; v102 = v70; v103 = v73; v92 = v104; v104 = v74; v101 = v70; if ( v70 != v73 ) v103 = (cocos2d::CCPoint *)((char *)v73 + 8 * ~((unsigned __int64)((cocos2d::CCPoint *)((char *)v73 - 8) - v70) >> 3)); } if ( v70 ) operator delete(v70); } v9 = *((_QWORD *)this + 52); if ( v9 ) { v10 = *(unsigned int **)(v9 + 56); if ( *v10 ) { v11 = *((__int64 **)v10 + 2); v12 = 8LL * *v10 - 8; v13 = (char *)v11 + v12; if ( v11 <= (__int64 *)((char *)v11 + v12) ) { v14 = *v11; if ( *v11 ) { while ( 1 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v101, (const cocos2d::CCPoint *)(v14 + 56)); cocos2d::CCPoint::operator-(&v95, &v101, v81, v15); v16 = (char *)v90; if ( v90 == v91 ) goto LABEL_86; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v82, (cocos2d::CCPoint *)((char *)v91 - 8)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v83, (const cocos2d::CCPoint *)&v95); cocos2d::CCPoint::operator-(&v88, v82, v83, v17); *(float *)&v8 = (float)(*((float *)&v88 + 1) * *((float *)&v88 + 1)) + (float)(*(float *)&v88 * *(float *)&v88); if ( *(float *)&v8 > 0.01 ) break; LABEL_15: if ( v13 >= (char *)++v11 ) { v14 = *v11; if ( *v11 ) continue; } goto LABEL_17; } v16 = (char *)v91; LABEL_86: if ( v92 == v16 ) { std::vector::__push_back_slow_path( (cocos2d::CCPoint **)&v90, (const cocos2d::CCPoint *)&v95); } else { if ( v16 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, (const cocos2d::CCPoint *)&v95); v16 = (char *)v91; } v91 = (cocos2d::CCPoint *)(v16 + 8); } goto LABEL_15; } } } } LABEL_17: cocos2d::CCPoint::operator-(&v84, (char *)this + 424, v81, v8); v18 = (char *)v90; if ( v90 != v91 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v85, (cocos2d::CCPoint *)((char *)v91 - 8)); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v87, (const cocos2d::CCPoint *)&v84); cocos2d::CCPoint::operator-(&v89, v85, v87, v19); if ( (float)((float)(*((float *)&v89 + 1) * *((float *)&v89 + 1)) + (float)(*(float *)&v89 * *(float *)&v89)) <= 0.01 ) goto LABEL_19; v18 = (char *)v91; } if ( v92 != v18 ) { if ( v18 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v18, (const cocos2d::CCPoint *)&v84); v18 = (char *)v91; } v21 = (cocos2d::CCPoint *)v90; v20 = (cocos2d::CCPoint *)(v18 + 8); v91 = (cocos2d::CCPoint *)(v18 + 8); v22 = (v18 + 8 - (_BYTE *)v90) >> 3; v23 = v22; if ( (int)v22 > 1 ) goto LABEL_20; LABEL_72: if ( !v21 ) return _stack_chk_guard; if ( v21 != v20 ) v91 = (cocos2d::CCPoint *)((char *)v20 + 8 * ~((unsigned __int64)((cocos2d::CCPoint *)((char *)v20 - 8) - v21) >> 3)); operator delete(v21); return _stack_chk_guard; } std::vector::__push_back_slow_path( (cocos2d::CCPoint **)&v90, (const cocos2d::CCPoint *)&v84); LABEL_19: v20 = v91; v21 = (cocos2d::CCPoint *)v90; v22 = (v91 - (cocos2d::CCPoint *)v90) >> 3; v23 = v22; if ( (int)v22 <= 1 ) goto LABEL_72; LABEL_20: if ( *((_BYTE *)this + 441) ) { v80 = v22 - 1; v78 = (int)v22 - 1; } else { v65 = 8LL * ((int)v22 - 2); v80 = v22 - 1; v78 = (int)v22 - 1; cocos2d::ccpDistance( (cocos2d::CCPoint *)((char *)v21 + v65), (cocos2d::CCPoint *)((char *)v21 + v65 + 8), (const cocos2d::CCPoint *)v78); if ( *(float *)&v66 > 10.0 ) { v67 = (char *)v90 + v65 + 8; cocos2d::CCPoint::operator-(&v89, v67, (char *)v90 + v65, v66); cocos2d::ccpNormalize(&v93, (cocos2d *)&v89, v68); cocos2d::CCPoint::operator*(&v93, 4.0); cocos2d::CCPoint::operator-(&v101, v67, &v95, v69); cocos2d::CCPoint::operator=(v67, &v101); } } std::vector::vector(&v93, v78); v25 = 0; do { v26 = v25 + 8; v27 = (char *)v90 + v25 + 8; v28 = (char *)v90 + v25; v29 = (char *)v93 + v25; cocos2d::CCPoint::operator-(&v89, v27, v28, v24); cocos2d::ccpNormalize(&v95, (cocos2d *)&v89, v30); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v101, -*((float *)&v95 + 1), *(float *)&v95); *(__n128 *)&v24 = cocos2d::CCPoint::operator=(v29, &v101); v25 = v26; } while ( v26 != 8 * ((unsigned int)(v80 - 1) + 1LL) ); std::vector::vector(&v95, (int)v22); v31 = 0; v32 = 0; v33 = 0; v34 = 0; while ( 1 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v86, (const cocos2d::CCPoint *)((char *)v93 + 8 * v34)); v36 = v80 == v33 ? v23 - 2 : v32; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v87, (const cocos2d::CCPoint *)((char *)v93 + 8 * v36)); cocos2d::CCPoint::operator+(&v88, &v86); cocos2d::ccpLength((cocos2d *)&v88, v37); if ( v38 >= 0.001 ) break; v35 = cocos2d::CCPoint::operator=((char *)v95 + v31, &v86); if ( ++v33 == (_DWORD)v22 ) goto LABEL_37; LABEL_26: v31 += 8; if ( v33 ) v34 = v32; else v34 = 0; ++v32; } cocos2d::CCPoint::operator*(&v88, 1.0 / v38); v39 = (char *)v95 + v31; v40 = (float)(*((float *)&v89 + 1) * *((float *)&v86 + 1)) + (float)(*(float *)&v89 * *(float *)&v86); if ( v40 <= 0.25 ) v41 = 4.0; else v41 = 1.0 / v40; cocos2d::CCPoint::operator*(&v89, v41); v35 = cocos2d::CCPoint::operator=(v39, &v101); if ( ++v33 != (_DWORD)v22 ) goto LABEL_26; LABEL_37: v42 = 8LL * ((int)v22 - 2); v79 = v22 - 2; cocos2d::CCPoint::operator-(&v101, (char *)v90 + 8 * v78, (char *)v90 + v42, *(long double *)&v35); cocos2d::ccpNormalize(&v86, (cocos2d *)&v101, v43); v44 = (float)((float)(fabsf( (float)(*(float *)((char *)v95 + v42 + 4) * *((float *)&v86 + 1)) + (float)(*(float *)((char *)v95 + v42) * *(float *)&v86)) * 3.0) * *((float *)this + 108)) * *((float *)this + 109); cocos2d::ccpDistance( (cocos2d *)((char *)v90 + v42), (const cocos2d::CCPoint *)((char *)v90 + 8 * v78), (const cocos2d::CCPoint *)((char *)v95 + v42)); v46 = v45; for ( i = 0; i != v76; ++i ) { v47 = *((float *)this + 108); v48 = *((float *)this + 109); if ( i ) { v49 = (float)(v47 + v47) * v48; if ( v49 < 1.0 ) v50 = 0.5; else v50 = v49 * 0.5; v51 = (unsigned __int8 *)&unk_1168980; } else { v64 = (float)(v47 * 6.0) * v48; if ( v64 < 1.0 ) v50 = 0.5; else v50 = v64 * 0.5; v51 = (unsigned __int8 *)(*(__int64 (__fastcall **)(HardStreak *))(*(_QWORD *)this + 944LL))(this); } v52 = v51[1]; v53 = (float)v51[2]; v54 = *(_QWORD *)this; v55 = (float)*v51; HIDWORD(v102) = 1.0; *(float *)&v102 = v53 / 255.0; *((float *)&v101 + 1) = (float)v52 / 255.0; *(float *)&v101 = v55 / 255.0; if ( i ) v56 = (float)((float)(*(unsigned __int8 (__fastcall **)(HardStreak *))(v54 + 896))(this) / 255.0) * 0.65; else v56 = (float)(*(unsigned __int8 (__fastcall **)(HardStreak *))(v54 + 896))(this) / 255.0; v57 = 0; v58 = 1; *((float *)&v102 + 1) = v56; do { if ( v79 == v58 - 1 && v44 > v46 ) { v60 = v58; v59 = v57 + 8; } else { cocos2d::CCPoint::operator*((char *)v95 + v57, v50); v59 = v57 + 8; v60 = v58; cocos2d::CCPoint::operator*((char *)v95 + v57 + 8, v50); for ( j = 0; j != 8; j += 2 ) cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v97[j]); cocos2d::CCPoint::operator-(&v89, (char *)v90 + v57, v87, v62); cocos2d::CCPoint::operator=(v97, &v89); cocos2d::CCPoint::operator+(&v89, (char *)v90 + v57); cocos2d::CCPoint::operator=(&v98, &v89); cocos2d::CCPoint::operator+(&v89, (char *)v90 + v59); *(__n128 *)&v63 = cocos2d::CCPoint::operator=(&v99, &v89); cocos2d::CCPoint::operator-(&v89, (char *)v90 + v59, &v88, v63); cocos2d::CCPoint::operator=(&v100, &v89); HardStreak::appendQuad((__int64)this, v97, (float *)&v101); } ++v58; v57 = v59; } while ( v60 < v80 ); } if ( v95 ) { if ( v95 != v96 ) v96 += 8 * ~((unsigned __int64)(v96 - 8 - (_BYTE *)v95) >> 3); operator delete(v95); } if ( v93 ) { if ( v93 != v94 ) v94 += 8 * ~((unsigned __int64)(v94 - 8 - (_BYTE *)v93) >> 3); operator delete(v93); } if ( v90 ) { if ( v90 != v91 ) v91 = (cocos2d::CCPoint *)((char *)v91 + 8 * ~((unsigned __int64)((cocos2d::CCPoint *)((char *)v91 - 8) - (cocos2d::CCPoint *)v90) >> 3)); operator delete(v90); return _stack_chk_guard; } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source