def hex_to_tcp_state(hex):
    """
    For converting tcp state hex codes to human readable strings.
    :param hex: TCP status hex code (as a string)
    :return: String containing the human readable state
    """
    states = {
        '01': 'TCP_ESTABLISHED',
        '02': 'TCP_SYN_SENT',
        '03': 'TCP_SYN_RECV',
        '04': 'TCP_FIN_WAIT1',
        '05': 'TCP_FIN_WAIT2',
        '06': 'TCP_TIME_WAIT',
        '07': 'TCP_CLOSE',
        '08': 'TCP_CLOSE_WAIT',
        '09': 'TCP_LAST_ACK',
        '0A': 'TCP_LISTEN',
        '0B': 'TCP_CLOSING'
    }
    return states[hex]