// // sub_1004FCD7C from 0x1004fcd7c to 0x1004fce84 (264 bytes) // // 10 xrefs: // > sub_100430904 @ 0x1004309c0 // > sub_100430904 @ 0x1004309f4 // > sub_100430904 @ 0x100430a28 // > sub_100430904 @ 0x100430a60 // > sub_100430B04 @ 0x100430c7c // > sub_100430B04 @ 0x100430ffc // > sub_100430B04 @ 0x1004310f0 // > sub_100430B04 @ 0x100431184 // > sub_100431230 @ 0x1004314b0 // > sub_100431230 @ 0x100431620 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // unsigned __int64 __fastcall sub_1004FCD7C(__int64 a1, __int64 a2, __int16 a3, int a4) { unsigned int v4; // w10 __int64 v5; // x8 int v6; // w11 unsigned __int64 result; // x0 unsigned int v8; // w12 unsigned int *v9; // x9 int v10; // w11 __int64 v11; // x14 __int64 v12; // x13 unsigned int v13; // w15 unsigned int *v14; // x16 unsigned int v15; // t1 v4 = __rbit32(*(_DWORD *)(a1 + 104) & a4); v5 = *(_QWORD *)(a1 + 64); v6 = a3 & 0x7FFF; result = (unsigned int)*(__int16 *)(a1 + 98); v8 = result - v6; v9 = (unsigned int *)(v5 + 4LL * (a3 & 0x7FFF)); if ( (unsigned int)(result - v6) >= 4 ) { v11 = 0; v12 = 0; v13 = v8 >> 2; do { v14 = &v9[v12]; if ( *v14 > v4 ) return (unsigned int)(v6 + v12); if ( v14[1] > v4 ) return (unsigned int)(v6 + v12 + 1); if ( v14[2] > v4 ) return (unsigned int)(v6 + v12 + 2); if ( v14[3] > v4 ) return (unsigned int)(v6 + v12 + 3); v12 += 4; v11 -= 16; --v13; } while ( v13 ); v9 = (unsigned int *)((char *)v9 - v11); v10 = v8 & 3; if ( (v8 & 3) != 0 ) goto LABEL_3; } else { v10 = result - (a3 & 0x7FFF); if ( (v8 & 3) != 0 ) { LABEL_3: if ( *v9 > v4 ) return ((unsigned __int64)v9 - v5) >> 2; if ( v10 != 1 ) { if ( v9[1] > v4 ) return ((unsigned __int64)++v9 - v5) >> 2; if ( v10 != 2 ) { v15 = v9[2]; v9 += 2; if ( v15 > v4 ) return ((unsigned __int64)v9 - v5) >> 2; } } } } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source