Quoted By:
Compscifag here, hi.
You write a disassembler in your preferred programming language. It should decode each instruction into a mnemonic and its operands. Then you need a way to figure out where sequences of valid instructions start and end (this is a matter of trial and error), and mark out starting points of "traces" and "functions" by collecting branch and call destinations from the operands of said instructions.
There are pre-built tools for this. N64's CPU may also have some extended, non mainline MIPS instructions, but these will be documented by emulator authors.