// // sub_67F688 from 0x67f688 to 0x67f864 (476 bytes) // // 2 xrefs: // > sub_67F688 @ 0x67f798 // > addTargetIDsFromTrigger @ 0x67f91c // // 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_67F688(char *a1, char *a2, __int64 a3) { __int64 v4; // x2 bool v5; // cc char *v7; // x19 __int64 result; // x0 int v9; // w2 int v10; // w5 __int64 v11; // x0 int v12; // w3 int v13; // w4 int v14; // w3 char *v15; // x5 _DWORD *v16; // x0 int *v17; // x0 int v18; // t1 char *v19; // x0 char *v20; // x0 int v21; // t1 char *v22; // x0 int v23; // w2 __int64 v24; // x21 __int64 i; // x22 int v26; // t1 v4 = a2 - a1; v5 = a2 - a1 <= 67; v7 = a2; result = (__int64)a2; if ( !v5 ) { if ( a3 ) { while ( 1 ) { v9 = *((_DWORD *)a1 + 1); --a3; v10 = *((_DWORD *)a2 - 1); v11 = (__int64)(((result - (__int64)a1) >> 2) + ((unsigned __int64)(result - (_QWORD)a1) >> 63)) >> 1; v12 = *(_DWORD *)&a1[4 * v11]; if ( v9 >= v12 ) { if ( v9 >= v10 ) { if ( v12 < v10 ) { LABEL_6: v13 = *(_DWORD *)a1; *(_DWORD *)a1 = v10; *((_DWORD *)a2 - 1) = v13; v14 = *((_DWORD *)a1 + 1); v9 = *(_DWORD *)a1; goto LABEL_7; } LABEL_22: v23 = *(_DWORD *)a1; *(_DWORD *)a1 = v12; *(_DWORD *)&a1[4 * v11] = v23; v13 = *((_DWORD *)a2 - 1); v14 = *((_DWORD *)a1 + 1); v9 = *(_DWORD *)a1; goto LABEL_7; } } else { if ( v12 < v10 ) goto LABEL_22; if ( v9 < v10 ) goto LABEL_6; } v14 = *(_DWORD *)a1; *((_DWORD *)a1 + 1) = *(_DWORD *)a1; *(_DWORD *)a1 = v9; v13 = *((_DWORD *)a2 - 1); LABEL_7: v15 = a2; v16 = a1 + 4; if ( v14 < v9 ) { LABEL_8: v17 = v16 + 1; do { v7 = (char *)v17; v18 = *v17++; v14 = v18; } while ( v18 < v9 ); v19 = v15 - 4; if ( v13 <= v9 ) goto LABEL_16; goto LABEL_11; } while ( 1 ) { v7 = (char *)v16; v19 = v15 - 4; if ( v13 <= v9 ) { LABEL_16: v15 = v19; v22 = v7; if ( v15 <= v7 ) break; goto LABEL_14; } LABEL_11: v20 = v15 - 8; do { v15 = v20; v21 = *(_DWORD *)v20; v20 -= 4; v13 = v21; } while ( v21 > v9 ); v22 = v7; if ( v15 <= v7 ) break; LABEL_14: *(_DWORD *)v22 = v13; v16 = v22 + 4; *(_DWORD *)v15 = v14; v13 = *((_DWORD *)v15 - 1); v14 = *((_DWORD *)v7 + 1); v9 = *(_DWORD *)a1; if ( v14 < *(_DWORD *)a1 ) goto LABEL_8; } sub_67F688(v22); v4 = v7 - a1; result = (__int64)v7; if ( v7 - a1 <= 67 ) return result; if ( !a3 ) break; a2 = v7; } } v24 = v4 >> 2; for ( i = ((v4 >> 2) - 2) >> 1; ; --i ) { std::__adjust_heap<__gnu_cxx::__normal_iterator>,long,int,__gnu_cxx::__ops::_Iter_less_iter>( (__int64)a1, i, v24, *(_DWORD *)&a1[4 * i]); if ( !i ) break; } do { v26 = *((_DWORD *)v7 - 1); v7 -= 4; *(_DWORD *)v7 = *(_DWORD *)a1; result = std::__adjust_heap<__gnu_cxx::__normal_iterator>,long,int,__gnu_cxx::__ops::_Iter_less_iter>( (__int64)a1, 0, (v7 - a1) >> 2, v26); } while ( v7 - a1 > 7 ); } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source