Patent ID: 6978466

Claim:
A method comprising: intercepting an operating system thread creation request for a function comprising: intercepting an operating system thread creation request for a first function including: intercepting a call to an operating system thread creation function having a reference to said first function and a function parameter, and creating a thread for a second function including: determining a stack pointer offset, creating a data structure having said reference to said first function, said function parameter, and said stack pointer offset, and generating a call to said operating system thread creation function having a reference to said second function and a reference to said data structure, creating a thread in response to intercepting said operating system thread creation request comprises creating a thread for said second function, creating a thread in response to intercepting said operating system thread creation request, said thread including a stack; modifying an initial stack pointer of said stack; and executing said second function utilizing said thread in response to modifying said initial stack pointer of said stack; wherein intercepting said operating system thread creation request for a function comprises: linking a dynamic-link library to a process, said process including a reference table; initializing said dynamic-link library; and wherein said reference table includes a reference corresponding to said operating system thread creation function and initializing said dynamic-link library comprises replacing said reference corresponding to said operating system thread creation function with a reference corresponding to a substitute thread creation function.