// // WebPGetInfo from 0x90fc74 to 0x90ffb8 (836 bytes) // // 2 xrefs: // > WebPDecodeYUV @ 0x91000c // > sub_91006C @ 0x9100a6 // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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:04:26 +0000 // int __fastcall WebPGetInfo(unsigned __int8 *a1, unsigned int a2, int *a3, int *a4) { int v10; // r3 unsigned int v11; // r5 unsigned __int8 *v12; // r4 unsigned int v13; // r11 unsigned int v14; // r0 unsigned int v15; // r3 int v16; // r1 unsigned int v17; // r2 bool v18; // cf int v19; // r9 unsigned __int8 v20; // r8 int v21; // r2 unsigned int v22; // r10 int v23; // r1 int v24; // r12 int v25; // r3 int v26; // r2 int v27; // r0 int v28; // r12 int v29; // r0 int v30; // r11 unsigned int v31; // r0 unsigned int v32; // lr bool v33; // zf unsigned int v34; // lr int v35; // r3 _BOOL4 v36; // r0 unsigned int v37; // r2 unsigned int v38; // r1 unsigned int v39; // [sp+Ch] [bp-78h] int v40; // [sp+Ch] [bp-78h] __int64 v41; // [sp+10h] [bp-74h] unsigned int v42; // [sp+10h] [bp-74h] int v43; // [sp+10h] [bp-74h] int v44; // [sp+10h] [bp-74h] int v45; // [sp+18h] [bp-6Ch] unsigned int v46; // [sp+1Ch] [bp-68h] unsigned __int8 *v47; // [sp+24h] [bp-60h] BYREF unsigned int v48; // [sp+28h] [bp-5Ch] BYREF int v49; // [sp+2Ch] [bp-58h] BYREF int v50[5]; // [sp+30h] [bp-54h] BYREF unsigned __int8 *v51; // [sp+44h] [bp-40h] BYREF unsigned int v52; // [sp+48h] [bp-3Ch] BYREF unsigned int v53; // [sp+4Ch] [bp-38h] unsigned int v54; // [sp+50h] [bp-34h] _BOOL4 v55; // [sp+54h] [bp-30h] int v56; // [sp+58h] [bp-2Ch] int v57; // [sp+5Ch] [bp-28h] int v58; // [sp+60h] [bp-24h] BYREF int v59; // [sp+64h] [bp-20h] int v60; // [sp+68h] [bp-1Ch] int v61; // [sp+6Ch] [bp-18h] int v62; // [sp+70h] [bp-14h] int v63; // [sp+74h] [bp-10h] int v64; // [sp+78h] [bp-Ch] int v65; // [sp+7Ch] [bp-8h] if ( !a1 ) return 0; v47 = a1; v48 = a2; v56 = 0; v57 = 0; v58 = 0; v59 = 0; v60 = 0; v61 = 0; v62 = 0; v63 = 0; v64 = 0; v65 = 0; v49 = 0; v50[0] = 0; if ( a2 <= 0xB ) return 0; v50[3] = 0; v50[4] = 0; v51 = nullptr; v52 = 0; v53 = 0; v54 = 0; v55 = 0; v50[1] = (int)a1; v50[2] = a2; if ( !memcmp(a1, "RIFF", 4u) ) { if ( memcmp(a1 + 8, "WEBP", 4u) ) return 0; v10 = a1[4] | (a1[5] << 8) | ((a1[6] | (a1[7] << 8)) << 16); if ( (unsigned int)(v10 - 12) > 0xFFFFFFEA ) return 0; v11 = a2 - 12; v12 = a1 + 12; v48 = a2 - 12; v47 = a1 + 12; v54 = v10; if ( a2 - 12 <= 7 ) return 0; v13 = 1; } else { v13 = 0; v12 = a1; v10 = 0; v11 = a2; } v39 = v10; v14 = memcmp(v12, "VP8X", 4u); v15 = v39; if ( v14 ) { if ( !v13 ) { v22 = 0; v20 = 0; v40 = 0; v45 = 0; LABEL_30: v42 = v15; LOBYTE(v19) = v13; v27 = memcmp(v12, "ALPH", 4u); v15 = v42; if ( v27 ) { v24 = 0; goto LABEL_34; } v28 = 0; goto LABEL_32; } v22 = 0; v14 = v13; v21 = 0; v40 = 0; v45 = 0; v24 = 0; v20 = 0; v23 = 0; LOBYTE(v19) = 0; } else { if ( (v12[4] | (v12[5] << 8) | ((v12[6] | (v12[7] << 8)) << 16)) != 0xA || v11 <= 0x11 ) return 0; v45 = ((v12[17] << 16) | (v12[16] << 8) | v12[15]) + 1; v40 = ((v12[14] << 16) | (v12[13] << 8) | v12[12]) + 1; v41 = v45 * (__int64)v40; v16 = v12[8] | (v12[9] << 8); v17 = v16 | ((v12[10] | (v12[11] << 8)) << 16); v18 = HIDWORD(v41) != 0; if ( HIDWORD(v41) == 1 ) v18 = 1; if ( v18 ) return 0; v12 += 18; v11 -= 18; v47 = v12; v48 = v11; if ( !v13 ) return 0; v19 = (v17 >> 1) & 1; v20 = v16 & 1; v21 = (v17 >> 4) & 1; v22 = v13; v23 = v19; v24 = 1; } v58 = v21; v59 = v23; v49 = v40; v50[0] = v45; if ( !v24 ) { if ( v11 <= 3 ) return 0; if ( v13 >= v14 ) goto LABEL_34; LOBYTE(v13) = v19; goto LABEL_30; } v19 = (unsigned __int8)(v20 | v19); if ( !v19 ) { if ( v11 <= 3 ) goto LABEL_36; v20 = 0; v28 = 1; LABEL_32: v43 = v28; v29 = sub_90F328(&v47, &v48, v15, &v51, &v52); v24 = v43; if ( v29 ) { if ( v29 != 7 ) return 0; goto LABEL_35; } v15 = v54; v11 = v48; v12 = v47; LABEL_34: v46 = v15; v44 = v24; v30 = memcmp(v12, "VP8 ", 4u); v31 = memcmp(v12, "VP8L", 4u); v24 = v44; if ( v11 <= 7 ) goto LABEL_35; v32 = __clz(v31); v33 = v31 == 0; if ( v31 ) v33 = v30 == 0; v34 = v32 >> 5; if ( v33 ) { v37 = v12[4] | (v12[5] << 8) | ((v12[6] | (v12[7] << 8)) << 16); if ( v46 > 0xB && v37 > v46 - 12 ) return 0; v36 = v34; v38 = v11 - 8; v47 = v12 + 8; v48 = v11 - 8; v53 = v37; v55 = v34; } else { v36 = VP8LCheckSignature(v12, v11); v37 = v48; v24 = v44; v53 = v48; v38 = v48; v55 = v36; } if ( v37 > 0xFFFFFFF6 ) return 0; if ( !(v20 | (unsigned __int8)v19) ) { if ( v36 ) v35 = 2; else v35 = 1; v60 = v35; } if ( v36 ) { if ( v38 > 4 ) { if ( !VP8LGetInfo(v47, v38, &v49, v50, &v58) ) return 0; LABEL_53: if ( !v22 ) goto LABEL_36; v26 = v49; if ( v49 == v40 ) { v25 = v50[0]; if ( v50[0] == v45 ) goto LABEL_20; } return 0; } } else if ( v38 > 9 ) { if ( !VP8GetInfo(v47, v38, v37, &v49, v50) ) return 0; goto LABEL_53; } LABEL_35: if ( v24 ) { LABEL_36: v26 = v49; v25 = v50[0]; goto LABEL_20; } return 0; } v25 = v45; v26 = v40; LABEL_20: if ( a3 ) *a3 = v26; if ( a4 ) *a4 = v25; return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source