1. A method for comparing a first subroutine and a second subroutine in functionality, comprising: defining a plurality of instruction sets, each of which being associated with a corresponding instruction set process; performing a capturing process to obtain a first program section and a second program section respectively from the first subroutine and the second subroutine, and respectively categorizing the first program section and the second program section to one of the instruction sets; performing a program section comparison process to select and perform one of the instruction set processes according to the instruction set to which the first program section is categorized and the instruction set to which the second program section is categorized, so as to compare whether the first program section and the second program section are identical in functionality; and setting a first branch pointer to a value within a predetermined range; wherein, the capturing process comprises performing a machine code capturing process, the machine capturing process comprising: when the value of the first branch pointer falls within the predetermined range, obtaining a machine code from the first subroutine according to a first pointer, and updating the first pointer to point to a next machine code in the first subroutine; when the first branch pointer is not within the predetermined range, obtaining a machine code from the first subroutine according to the first branch pointer, and updating the first branch pointer to point to a next machine code in the first subroutine; after the machine code is obtained from the first subroutine, adding the machine code to the first program section; and when the first program section cannot be categorized to any of the instruction sets, iterating the machine code capturing process.