Answered in Discord, find
var _crc=buffer_crc32(_buf,_pos,_len)
and replace it with
var _crc=buffer_crc32(_buf,_pos,_len)^$FFFFFFFF