Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
You are indexing the table with rax*1 instead of rax*8. You are also expecting the number to be between 1 and MAX_SUBS, which looks like an off-by-one error to me. If you made it between 0 and MAX_SUBS-1, then the start would just be