CCHAR __stdcall RtlFindMostSignificantBit(ULONGLONG Set){ bool v1; __int64 v2; CCHAR result; v1 = !_BitScanReverse64((unsigned __int64 *)&v2, Set); result = -1; if( !v1 ) return v2; return result; }