// // sub_978A4C from 0x978a4c to 0x978ae4 (152 bytes) // // 0 xrefs: // // 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:06:00 +0000 // int __fastcall sub_978A4C(unsigned __int8 *a1, unsigned __int8 *a2, unsigned int a3) { unsigned int v3; // r3 signed int v4; // r4 unsigned __int8 *v5; // r12 unsigned int v6; // r3 unsigned __int8 *v7; // r5 unsigned int v8; // r0 unsigned __int8 *v9; // lr unsigned __int8 *v10; // r8 unsigned __int8 *v11; // r4 int v12; // r6 unsigned int v13; // r6 unsigned __int8 *v14; // r4 int v15; // r7 int v16; // t1 int result; // r0 v3 = *a1; if ( (v3 & 1) != 0 ) { v5 = *((unsigned __int8 **)a1 + 2); v4 = *((_DWORD *)a1 + 1); } else { v4 = v3 >> 1; v5 = a1 + 1; } v7 = *((unsigned __int8 **)a2 + 2); v6 = *((_DWORD *)a2 + 1); v8 = *a2; if ( (v8 & 1) == 0 ) v6 = v8 >> 1; if ( v4 < a3 ) a3 = v4; if ( v4 - a3 > v6 ) v4 = v6 + a3; v9 = &v5[v4]; if ( (v8 & 1) == 0 ) v7 = a2 + 1; if ( v6 && v4 >= (int)v6 ) { v10 = &v5[v4]; LABEL_15: v11 = v10 + 1; while ( &v5[v6] != v11 ) { v12 = *(v11 - 2); --v11; if ( v12 == v7[v6 - 1] ) { v10 = v11 - 1; v13 = v6; v14 = v11 - 1; while ( v13 != 1 ) { v15 = v7[v13-- - 2]; v16 = *--v14; if ( v16 != v15 ) goto LABEL_15; } goto LABEL_23; } } } v14 = v9; LABEL_23: result = v14 - v5; if ( v14 == v9 ) result = -1; if ( !v6 ) return v14 - v5; return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source