import struct


def read_uint32(fp, pos):
    """Read 4 little-endian bytes into an unsigned 32-bit integer. Return value, position + 4."""
    fp.seek(pos)
    val = struct.unpack("<I", fp.read(4))[0]
    return val, pos + 4