First let me say that I am not a lawyer, and you should not, under any circumstances, rely on me for legal advice. I am also assuming you are in the United States, where most everything computer-related falls under the DMCA. Now that the disclaimer is out of the way, on to my answer.
As others have stated in the comments, you should consult an attorney.
That said, you might find the FAQ section of DigitalConsumer.org helpful. Specifically, you should read the question titled But I thought the DMCA had a special exemption for reverse engineering?. I have pasted an excerpt below for your convenience.
Section 1201(f) of the DMCA states
that "a person who has lawfully
obtained the right to use a copy of a
computer program may circumvent a
technological measure that effectively
controls access to a particular
portion of that program for the sole
purpose of identifying and analyzing
those elements of the program that are
necessary to achieve interoperability
of an independently created computer
program with other programs." Doesn't
this solve the reverse-engineering
problem?
This exemption is inadequate for
several reasons. First,
reverse-engineering has many
legitimate uses beyond strict
interoperability that are not allowed
by the DMCA. Significantly, one might
reverse-engineer in order to build a
competitive product, but such
reverse-engineering is not permitted.
Other legitimate uses that are not
exempted include: verifying proper
operation of a program; discovering
undocumented features; or correcting
bugs in the external specifications of
an application.
Second, "interoperability" is narrowly
defined by the DMCA as meaning "the
ability of computers to exchange
information, and of such programs
mutually to use the information which
has been exchanged." By restricting
interoperability to information
exchange, the DMCA excludes other
legitimate types of interoperability
such as API-level replacements for
computer libraries...
Also keep in mind the potential bias of a site named DigitalConsumer.org. They are bound to give you a somewhat skewed interpretation of what limitations the DMCA places on developers. That gets me back to my original advice: consult an attorney.