// // cocos2d::tgaRGBtogreyscale from 0xd92cf0 to 0xd92dc0 (208 bytes) // // 1 xrefs: // > @ 0x89a40 // // 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:08:20 +0000 // unsigned __int8 *__fastcall cocos2d::tgaRGBtogreyscale(unsigned __int8 *result) { unsigned int v1; // w1 unsigned __int8 *v2; // x22 unsigned int v3; // w19 int v4; // w20 unsigned __int8 *v5; // x21 unsigned __int8 *v6; // x0 unsigned __int8 *v7; // x4 __int64 v8; // x5 int v9; // w3 int v10; // w2 int v11; // w1 v1 = result[5]; if ( v1 != 8 ) { v2 = result; v3 = v1 >> 3; v4 = *((__int16 *)result + 4) * *((__int16 *)result + 3); result = (unsigned __int8 *)malloc(v4); v5 = result; if ( result ) { if ( v4 <= 0 ) { v6 = *((unsigned __int8 **)v2 + 2); } else { v6 = *((unsigned __int8 **)v2 + 2); v7 = v6; v8 = 0; do { v9 = v7[1]; v10 = *v7; v11 = v7[2]; v7 += (unsigned __int8)v3; v5[v8++] = (unsigned int)((double)v9 * 0.59 + (double)v10 * 0.3 + (double)v11 * 0.11); } while ( v4 > (int)v8 ); } free(v6); *((_QWORD *)v2 + 2) = v5; v2[5] = 8; result = (_BYTE *)(&dword_0 + 3); v2[4] = 3; } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source