I have a question about the function GetHighestIndexEntry in

I read the ICQ database specs file import-ICQ_Db_Specs.txt
but I could not figure out what happens in the function.

It is a short one, so i will post it here:

static int GetHighestIndexEntry(void)
        struct TIdxIndexEntry *entry;
        DWORD ofs;

        for(;;) {
                entry=(struct TIdxIndexEntry*)(pIdx+ofs);
                if(entry->entryIdLow==(DWORD)-2) return ((struct TIdxDatEntry*)entry)->entryId;
                if(entry->ofsHigher>=0xF0000000) ofs=entry->ofsInHere;
                else ofs=entry->ofsHigher;
There seem to be two different entry types in the idx-file,
called TIdxDatEntry and TIdxIndexEntry, is that correct?
I could not find anything about the latter one in the specs file, but
from the definition I got an idea that it does.

From what I read in the specs, the function is trying
to "walk the main chain" through the idx file.

If it finds an entry with entryIdLow==-2, which means it is a TIdxDatEntry
and casts the current TIdxIndexEntry to an TIdxDatEntry and
returns its entryId. Is this correct so far?

But what is the entryId at that point?
Later a for loop runs from 2001 to this entryId...

And what is the value 0xF0000000 ?
I suppose it means 4026531840, but what special meaning
does this value have?

Well, thats all for now. I would really appreciate your help
and hope that there is still someone who knows about this
ancient stuff.