remember since the address such as 00505858 is a pointer(j=jump) and that data moves you WILL have to port it differently then you re find the offset(distance from the pointer location to where it jumps too) and then wa-la thats your code. The subroutine part is very easy to do.