Perhaps I do not understand the nature of your question, however, it seems you could do this with what is already available on the operating system. Presuming you're using Windows...
1. Hold down the Windows key and tap 'R'.
2. Type 'cmd' and hit the Enter key.
3. Type 'cd' , then a space, then the path to the folder in which your file resides, and hit the Enter key.
4. Type 'move', then a space, then the name of the file you want to rename, then another space, then the name you want the file to be (with changed extension), then hit the Enter key.
The file will have a different extension, but the bits inside will not be changed.
I don't understand what you mean by 'function'. Files don't have 'function's, although they may have verbs. An extension tends to be tied to a particular verb, so it might not be possible to do what you ask without having to create a new verb for the new extension.