It's building a (potentially gigantic) index to use on the devices_seen array. It's building the index by shifting the elements of the data.auidata array (which I'm guessing are unsigned chars) and bitwise-oring them into an unsigned 64 bit value. An example of the same kind of thing:
modID starts at 0 and is then set equal to 0 (bitwise-ored) with the first element of data.auiData (casted as uint64_t) which is then shifted by 32. I think shifting it by 32 just means add 32 zeros to the value, right?