// // sub_10020D788 from 0x10020d788 to 0x10020d8d0 (328 bytes) // // 1 xrefs: // > sub_10020CA70 @ 0x10020d028 // // 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_10020D788(__int64 *a1, __int64 *a2, __int64 (__fastcall **a3)(__int64 *, __int64 *)) { __int64 v6; // x25 __int64 v7; // x23 __int64 (__fastcall *v8)(__int64 *, __int64 *); // x9 __int64 v9; // x8 __int64 *v10; // x24 __int64 *v11; // x22 __int64 (__fastcall *v12)(__int64 *, __int64 *); // x8 __int64 v13; // t1 __int64 (__fastcall *v14)(__int64 *, __int64 *); // x8 __int64 v15; // t1 __int64 *v16; // x22 __int64 *v17; // x25 __int64 v18; // x8 __int64 (__fastcall *v19)(__int64 *, __int64 *); // x8 __int64 v20; // t1 __int64 (__fastcall *v21)(__int64 *, __int64 *); // x8 __int64 v22; // t1 __int64 v24; // [xsp+0h] [xbp-50h] BYREF __int64 v25; // [xsp+8h] [xbp-48h] BYREF v6 = 0; v7 = *a1; do { v8 = *a3; v9 = a1[v6 + 1]; v24 = v7; v25 = v9; ++v6; } while ( (v8(&v25, &v24) & 1) != 0 ); v10 = &a1[v6]; v11 = &a1[v6 - 1]; if ( v6 == 1 ) { do { if ( v10 >= a2 ) break; v14 = *a3; v15 = *--a2; v24 = v7; v25 = v15; } while ( (v14(&v25, &v24) & 1) == 0 ); } else { do { v12 = *a3; v13 = *--a2; v24 = v7; v25 = v13; } while ( !(unsigned int)v12(&v25, &v24) ); } if ( v10 < a2 ) { v16 = &a1[v6]; v17 = a2; do { v18 = *v16; *v16 = *v17; *v17 = v18; do { v19 = *a3; v20 = v16[1]; ++v16; v24 = v7; v25 = v20; } while ( (v19(&v25, &v24) & 1) != 0 ); do { v21 = *a3; v22 = *--v17; v24 = v7; v25 = v22; } while ( !(unsigned int)v21(&v25, &v24) ); } while ( v16 < v17 ); v11 = v16 - 1; } if ( v11 != a1 ) *a1 = *v11; *v11 = v7; return v11; }
GD Web Decomp Icon

GD Web Decomp

Raw Source