// // cocos2d::CCGrid3D::calculateVertexPoints from 0xd4e4b4 to 0xd4ea18 (1380 bytes) // // 2 xrefs: // > @ 0x1046f8 // > @ 0x1517000 // // 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:39 +0000 // __int64 __fastcall cocos2d::CCGrid3D::calculateVertexPoints(cocos2d::CCGrid3D *this) { float v2; // s11 float v3; // s10 __int64 ContentSizeInPixels; // x0 void *v5; // x2 void *v6; // x0 void *v7; // x0 void *v8; // x0 float v9; // s13 float v10; // s12 float v11; // s15 float v12; // s9 __int64 v13; // x23 char *v14; // x27 void *v15; // x24 float *v16; // x0 float *v17; // x28 char *v18; // x0 __int128 v19; // q3 float v20; // s0 float v21; // s8 int v22; // w20 float v23; // s9 float v24; // s0 float v25; // s13 float v26; // s11 float v27; // s12 float v28; // s5 float v29; // s6 float v30; // s9 float v31; // s4 __int64 v32; // x2 int v33; // w3 float v34; // s13 int v35; // w8 int v36; // w4 int v37; // w1 float v38; // s12 unsigned __int64 v39; // x26 int v40; // w0 float v41; // s0 float *v42; // x2 float v43; // w4 int v44; // w3 float v45; // s0 float *v46; // x3 float v47; // s0 float v48; // w9 int v49; // w8 float v50; // s0 float *v51; // x1 float v52; // s0 float v53; // w4 int v54; // w3 float v55; // s0 float *v56; // x3 float *v57; // x1 float v58; // s0 float v59; // w9 int v60; // w8 char *v62; // [xsp+A8h] [xbp+A8h] float v63; // [xsp+B8h] [xbp+B8h] int v64; // [xsp+BCh] [xbp+BCh] __int128 v65; // [xsp+E0h] [xbp+E0h] signed __int64 v66; // [xsp+F0h] [xbp+F0h] unsigned __int64 v67; // [xsp+F8h] [xbp+F8h] signed __int64 v68; // [xsp+100h] [xbp+100h] float v69; // [xsp+10Ch] [xbp+10Ch] __int64 v70; // [xsp+118h] [xbp+118h] int v71; // [xsp+120h] [xbp+120h] float v72; // [xsp+128h] [xbp+128h] BYREF float v73; // [xsp+12Ch] [xbp+12Ch] float v74; // [xsp+130h] [xbp+130h] BYREF float v75; // [xsp+134h] [xbp+134h] float v76; // [xsp+138h] [xbp+138h] BYREF float v77; // [xsp+13Ch] [xbp+13Ch] float v78; // [xsp+140h] [xbp+140h] BYREF float v79; // [xsp+144h] [xbp+144h] float v80; // [xsp+148h] [xbp+148h] float v81; // [xsp+14Ch] [xbp+14Ch] int v82; // [xsp+150h] [xbp+150h] float v83; // [xsp+154h] [xbp+154h] float v84; // [xsp+158h] [xbp+158h] int v85; // [xsp+15Ch] [xbp+15Ch] float v86; // [xsp+160h] [xbp+160h] float v87; // [xsp+164h] [xbp+164h] int v88; // [xsp+168h] [xbp+168h] float v89; // [xsp+16Ch] [xbp+16Ch] float v90; // [xsp+170h] [xbp+170h] int v91; // [xsp+174h] [xbp+174h] v2 = (float)(*(unsigned int (__fastcall **)(_QWORD))(**((_QWORD **)this + 9) + 88LL))(*((_QWORD *)this + 9)); v3 = (float)(*(unsigned int (__fastcall **)(_QWORD))(**((_QWORD **)this + 9) + 96LL))(*((_QWORD *)this + 9)); ContentSizeInPixels = cocos2d::CCTexture2D::getContentSizeInPixels(*((cocos2d::CCTexture2D **)this + 9)); v5 = *((void **)this + 16); v69 = *(float *)(ContentSizeInPixels + 4); if ( v5 ) { free(v5); *((_QWORD *)this + 16) = 0; } v6 = *((void **)this + 17); if ( v6 ) { free(v6); *((_QWORD *)this + 17) = 0; } v7 = *((void **)this + 15); if ( v7 ) { free(v7); *((_QWORD *)this + 15) = 0; } v8 = *((void **)this + 18); if ( v8 ) free(v8); v9 = *((float *)this + 16); v10 = *((float *)this + 17); v64 = 1; v11 = 0.0; v12 = (float)(v9 + 1.0) * (float)(v10 + 1.0); v13 = (unsigned int)v12; v14 = (char *)malloc(12 * v13); *((_QWORD *)this + 16) = v14; v15 = malloc(12 * v13); *((_QWORD *)this + 17) = v15; v16 = (float *)malloc(8 * v13); *((_QWORD *)this + 15) = v16; v17 = v16; v18 = (char *)malloc((unsigned __int64)(float)((float)((float)(v9 * v10) + (float)(v9 * v10)) * 6.0)); *((_QWORD *)this + 18) = v18; if ( v9 > 0.0 ) { v62 = v18; v20 = v10; v63 = v2; do { if ( v20 > 0.0 ) { *(float *)&v19 = (float)v64; v21 = 0.0; v22 = 0; while ( 1 ) { ++v22; v23 = *((float *)this + 21); v24 = v20 + 1.0; v25 = v11 + (float)(v21 * v9); v26 = v21 * v23; v27 = *((float *)this + 20); v28 = v21 + (float)(v24 * *(float *)&v19); v29 = v21 + (float)(v11 * v24); v21 = (float)v22; v30 = v23 + v26; v65 = v19; v81 = v26; v31 = (float)v22 + (float)(v24 * *(float *)&v19); v84 = v26; v87 = v30; v32 = 12LL * (int)v25; v33 = (unsigned __int16)(unsigned int)v28; v34 = v11 * v27; WORD1(v70) = (unsigned int)v28; v35 = (unsigned __int16)(unsigned int)v29; HIWORD(v70) = WORD1(v70); LOWORD(v70) = (unsigned int)v29; v36 = (unsigned __int16)(unsigned int)v31; v37 = (unsigned __int16)(unsigned int)(float)((float)v22 + (float)(v11 * v24)); WORD2(v70) = (unsigned int)(float)((float)v22 + (float)(v11 * v24)); LOWORD(v71) = (unsigned int)v31; HIWORD(v71) = WORD2(v70); v38 = v27 + (float)(v11 * v27); *(_QWORD *)&v62[v32] = v70; *(_DWORD *)&v62[v32 + 8] = v71; v66 = (unsigned int)(2 * v35) | ((unsigned __int64)(unsigned int)(2 * v33) << 32); v39 = (unsigned int)(3 * v35) | ((unsigned __int64)(unsigned int)(3 * v33) << 32); v67 = (unsigned int)(3 * v36) | ((unsigned __int64)(unsigned int)(3 * v37) << 32); v68 = (unsigned int)(2 * v36) | ((unsigned __int64)(unsigned int)(2 * v37) << 32); v80 = v34; v83 = v38; v86 = v38; v89 = v34; v90 = v30; v82 = 0; v85 = 0; v88 = 0; v91 = 0; cocos2d::CCPoint::CCPoint(&v72, v34, v26); cocos2d::CCPoint::CCPoint(&v74, v38, v26); cocos2d::CCPoint::CCPoint(&v76, v38, v30); cocos2d::CCPoint::CCPoint(&v78, v34, v30); v40 = *((unsigned __int8 *)this + 96); v41 = v72 / v63; v42 = (float *)&v14[4 * (int)v39]; v43 = v81; v44 = v82; *v42 = v80; v19 = v65; v42[1] = v43; *((_DWORD *)v42 + 2) = v44; v17[(int)v66] = v41; v45 = v73; if ( v40 ) v45 = v69 - v73; v46 = (float *)&v14[4 * SHIDWORD(v39)]; v17[(int)v66 + 1] = v45 / v3; v47 = v74 / v63; v48 = v84; v49 = v85; *v46 = v83; v46[1] = v48; *((_DWORD *)v46 + 2) = v49; v17[SHIDWORD(v66)] = v47; v50 = v75; if ( v40 ) v50 = v69 - v75; *(float *)((char *)v17 + (v66 >> 32 << 32 >> 30) + 4) = v50 / v3; v51 = (float *)&v14[4 * (int)v67]; v52 = v76 / v63; v53 = v87; v54 = v88; *v51 = v86; v51[1] = v53; *((_DWORD *)v51 + 2) = v54; v17[(int)v68] = v52; v55 = v77; if ( v40 ) v55 = v69 - v77; v56 = (float *)&v14[4 * SHIDWORD(v67)]; v17[(int)v68 + 1] = v55 / v3; v57 = (float *)((char *)v17 + (v68 >> 32 << 32 >> 30)); v58 = v78 / v63; v59 = v90; v60 = v91; *v56 = v89; v56[1] = v59; *((_DWORD *)v56 + 2) = v60; v17[SHIDWORD(v68)] = v58; if ( v40 ) { v57[1] = (float)(v69 - v79) / v3; v20 = *((float *)this + 17); if ( v20 <= v21 ) goto LABEL_23; } else { v57[1] = v79 / v3; v20 = *((float *)this + 17); if ( v20 <= v21 ) { LABEL_23: v9 = *((float *)this + 16); v11 = *(float *)&v65; goto LABEL_24; } } v9 = *((float *)this + 16); } } v11 = (float)v64; LABEL_24: ++v64; } while ( v11 < v9 ); v15 = *((void **)this + 17); v14 = *((char **)this + 16); v12 = (float)(v9 + 1.0) * (float)(v20 + 1.0); } memcpy(v15, v14, (unsigned __int64)(float)(v12 * 12.0)); return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source