Redslev
Redslev

Reputation: 57

Renaming win32api functions for obfuscation

Is it possible to rename win32api funtions in c++?

I'm curious because I want to obfuscate my program's function names.

I'm open to any method to rename.

Say I have a function:

somewin32apifunc();

How could I rename it to:

renamedwin32apifunc();

Upvotes: 0

Views: 636

Answers (1)

Andreas Wenzel
Andreas Wenzel

Reputation: 24736

You cannot rename functions in the function import table, but you can circumvent it altogether by calling LoadLibrary and GetProcAddress yourself on kernel32.dll, user32.dll, etc. Then, you can call the Win32 API functions through the returned function pointers.

That way, the only two functions that will have to be be imported will be LoadLibraryA and GetProcAddress.

This will make it harder (but by no means impossible!) to reverse-engineer your executable file.

See this question for more general information on protecting your executable file from reverse-engineering.

Upvotes: 1

Related Questions