s4-registry: fixed byte order assumptions