The algorithm is obtained by decompiling the game file.
compile with:
javac codes.java starsector_codes.java
and run
java StarsectorCodes
above command will print all code, better use
java StarsectorCodes | head
to get first 10 codes, or
java StarsectorCodes | head -n $RANDOM | tail -n 1
to get random one