// // sub_4FE54 from 0x4fe54 to 0x5006e (538 bytes) // // 3 xrefs: // > sub_4FCE8 @ 0x4fd84 // > sub_4FE54 @ 0x5005e // > sub_5006E @ 0x50144 // // 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 11:40:43 +0000 // int __fastcall sub_4FE54(_DWORD *a1, _DWORD *a2, _DWORD *a3) { _DWORD *v3; // r9 _DWORD *v4; // r11 int v6; // r0 unsigned int v7; // r5 _DWORD *v8; // r6 unsigned int v9; // r11 unsigned int v10; // r4 unsigned int v11; // r0 unsigned int v12; // r5 unsigned int v13; // r8 unsigned int v14; // r0 bool v15; // cc _DWORD *v16; // r8 unsigned int v17; // r5 int v18; // r0 int v19; // r0 _DWORD *v20; // r9 _DWORD *v21; // r1 bool v22; // zf _DWORD *v23; // r0 int v24; // r0 _DWORD *v25; // r0 _DWORD *v26; // t1 int v27; // r0 int result; // r0 int v29; // r0 int v30; // r1 int v31; // r0 int v32; // r0 _DWORD *v33; // r6 int v34; // r0 _DWORD *v35; // r5 int v36; // r1 char v38; // [sp+Ch] [bp-2Ch] int v39; // [sp+10h] [bp-28h] unsigned int v40; // [sp+14h] [bp-24h] unsigned int v41; // [sp+18h] [bp-20h] v3 = a3 + 8; v4 = a3; while ( 1 ) { v6 = a2[6]; v38 = v6; v39 = v6 & 4; if ( (v6 & 4) != 0 ) { v12 = 0; v10 = 0; v13 = 0; while ( v12 != 3 ) { v14 = sub_4FD90(a2[v12 + 8] ^ v3[v12]); v15 = v14 > v10; if ( v14 > v10 ) v15 = v14 > v4[7]; if ( v15 && v14 > a2[7] ) { v13 = v12; v10 = v14; } ++v12; } v17 = v13; v16 = a1; } else { v7 = a2[7]; v40 = v6 & 3; v8 = v4; v9 = 0; v10 = 0; v41 = 0; while ( v9 != 3 ) { v11 = sub_4FD90((a2[v9 + 8] ^ v3[v9]) & -v7); if ( v10 < v11 && v11 > v8[7] && (v11 > v7 || v9 < v40 && v11 == v7) ) { v10 = v11; v41 = v9; } ++v9; } v16 = a1; v4 = v8; v17 = v41; } if ( v10 ) break; if ( v4[7] >= a2[7] || v39 ) { v27 = sub_50966(v16, a2, v4); return sub_50190(v27); } v18 = 12; if ( v4[(v38 & 3) + 8] < a2[(v38 & 3) + 8] ) v18 = 13; a2 = (_DWORD *)a2[v18]; } v19 = sub_503BC(v16); *(_DWORD *)(v19 + 28) = v10; v20 = (_DWORD *)v19; v21 = a2; *(_DWORD *)(v19 + 24) |= v17; v22 = (v4[v17 + 8] & v10) == 0; v23 = v4; if ( (v4[v17 + 8] & v10) == 0 ) v23 = a2; v20[12] = v23; if ( v22 ) v21 = v4; v20[13] = v21; v20[11] = a2[11]; v23[11] = v20; v21[11] = v20; v24 = v20[11]; if ( v24 ) { v26 = *(_DWORD **)(v24 + 52); v25 = (_DWORD *)(v24 + 52); if ( v26 != a2 ) --v25; } else { v25 = v16; } *v25 = v20; if ( !v17 ) { v31 = -v10; v20[8] = v4[8] & -v10 | v10; v30 = v4[9]; goto LABEL_43; } v29 = -(v10 >> 1); v20[8] = v4[8] & v29 | (v10 >> 1); v30 = v4[9]; if ( v17 == 1 ) { v31 = -v10; LABEL_43: v20[9] = v30 & v31 | v10; goto LABEL_45; } v20[9] = v29 & v30 | (v10 >> 1); v31 = -v10; LABEL_45: v32 = v31 & v4[10] | v10; v20[10] = v32; v33 = (_DWORD *)a2[14]; a2[14] = 0; result = sub_50190(v32); while ( v33 ) { v33[11] = 0; v34 = v33[6]; v35 = (_DWORD *)v33[14]; v33[14] = 0; v33[6] = v34 & 0xFFFFFFEF; v36 = v20[11]; if ( !v36 ) v36 = *v16; result = sub_4FE54(v16, v36, v33); v33 = v35; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source