With full knowledge of the CONTEXT, there are pretty reliable ways of figuring out which is the circuit ground/common pin, and working out from there to find the power bus(es), which are input and output terminals, etc. There are many videos on YouTube showing reverse-engineering techniques, from figuring out the basics (Ground, Power, inputs and outputs), through discovering internal serial terminal nodes, and offloading firmware code and reverse-engineering and hacking the code.