def METHOD_NAME(buf):
    """Sleazy ASN.1 decoder.
    TODO: Long description here.
    Args:
        buf: A buffer with Sleazy ASN.1 data.
    Returns:
        A list of (id, value) tuples from ASN.1 BER/DER encoded buffer.
    Raises:
        UnpackError: An error occurred the ASN.1 length exceed.
    """
    msg = []
    while buf:
        t = compat_ord(buf[0])
        constructed = t & CONSTRUCTED
        tag = t & TAGMASK
        l = compat_ord(buf[1])
        c = 0
        if constructed and l == 128:
            # XXX - constructed, indefinite length
            msg.append((t, METHOD_NAME(buf[2:])))
        elif l >= 128:
            c = l & 127
            if c == 1:
                l = compat_ord(buf[2])
            elif c == 2:
                l = struct.unpack('>H', buf[2:4])[0]
            elif c == 3:
                l = struct.unpack('>I', buf[1:5])[0] & 0xfff
                c = 2
            elif c == 4:
                l = struct.unpack('>I', buf[2:6])[0]
            else:
                # XXX - can be up to 127 bytes, but...
                raise dpkt.UnpackError('excessive long-form ASN.1 length %d' % l)
        # Skip type, length
        buf = buf[2 + c:]
        # Parse content
        if constructed:
            msg.append((t, METHOD_NAME(buf)))
        elif tag == INTEGER:
            if l == 0:
                n = 0
            elif l == 1:
                n = compat_ord(buf[0])
            elif l == 2:
                n = struct.unpack('>H', buf[:2])[0]
            elif l == 3:
                n = struct.unpack('>I', buf[:4])[0] >> 8
            elif l == 4:
                n = struct.unpack('>I', buf[:4])[0]
            else:
                raise dpkt.UnpackError('excessive integer length > %d bytes' % l)
            msg.append((t, n))
        elif tag == UTC_TIME:
            msg.append((t, utctime(buf[:l])))
        else:
            msg.append((t, buf[:l]))
        # Skip content
        buf = buf[l:]
    return msg