// // sub_1004FE518 from 0x1004fe518 to 0x1004fe784 (620 bytes) // // 2 xrefs: // > sub_100502A98 @ 0x100502b30 // > sub_100502CDC @ 0x100502e68 // // 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 // __int64 __fastcall sub_1004FE518(__int64 *a1, unsigned int **a2, int a3) { __int64 v6; // x25 __int64 v7; // x24 unsigned int v9; // w8 int v10; // w1 unsigned int v11; // w8 bool v12; // cc int v13; // w0 int v14; // w22 __int64 v15; // x8 __int64 v16; // x9 __int64 v17; // x26 __int64 v18; // x27 size_t v19; // x23 size_t v20; // x28 int v21; // w8 int v22; // w8 __int64 v23; // x8 __int64 v24; // x9 __int64 v25; // x8 __int64 v26; // x8 __int64 v27; // x8 __int64 v28; // x8 v6 = *a1; v7 = *(_QWORD *)(*a1 + 48); if ( sub_1004FBC80(a2, 1) ) return 4294967161LL; v9 = *(_DWORD *)(v7 + 8); if ( v9 >= 2 ) { v10 = 0; v11 = v9 - 1; do { ++v10; v12 = v11 > 1; v11 >>= 1; } while ( v12 ); } else { v10 = 0; } v13 = sub_1004FBC80(a2, v10); v14 = v13; if ( v13 == -1 || *(_DWORD *)(v7 + 8) <= v13 ) return 4294967160LL; v15 = a1[6]; v16 = *(unsigned __int8 *)(*(_QWORD *)(v7 + 32) + 2LL * v13); a1[5] = v15; a1[6] = v16; if ( *(int *)(v6 + 4) >= 1 ) { v17 = 0; v18 = 0; v19 = 4LL * (*(int *)(v7 + 4 * v15) >> 2); v20 = v19; do { memcpy((void *)(a1[2] + v17), (const void *)(a1[1] + v20), v19); ++v18; v17 += 2048; v20 += 4096LL; } while ( v18 < *(int *)(v6 + 4) ); v16 = a1[6]; } if ( v16 ) { sub_1004FBC80(a2, 1); if ( (unsigned int)sub_1004FBC80(a2, 1) == -1 ) return 4294967160LL; } if ( a3 ) sub_100500178(a1, a2, *(_QWORD *)(v7 + 40) + 40LL * *(unsigned __int8 *)(*(_QWORD *)(v7 + 32) + 2LL * v14 + 1)); v21 = *((_DWORD *)a1 + 6); *((_DWORD *)a1 + 6) = 0; if ( v21 == -1 ) v22 = 0; else v22 = *(_DWORD *)(v7 + 4 * a1[6]) / 4 + *(_DWORD *)(v7 + 4 * a1[5]) / 4; *((_DWORD *)a1 + 7) = v22; v23 = a1[8]; v24 = v23 + 1; if ( v23 == -1 ) { v25 = 0; a1[7] = -1; a1[8] = v24; } else { v26 = a1[9]; a1[8] = v24; if ( v26 == -1 ) v25 = 0; else v25 = v26 + *(_DWORD *)(v7 + 4 * a1[6]) / 4 + *(_DWORD *)(v7 + 4 * a1[5]) / 4; } a1[9] = v25; v27 = a1[7]; if ( v27 == -1 ) v28 = 0; else v28 = v27 + *(_DWORD *)(v7 + 4 * a1[6]) / 4 + *(_DWORD *)(v7 + 4 * a1[5]) / 4; a1[7] = v28; return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source