Click here to Skip to main content
15,885,979 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
some external method in PE files appear in complex view such this:

?ymdm_video_device_register_callback@@YAPAUtag_service_callback_handle@@PAUtag_service_handle@@P6AXHPAX1@Z1@Z 

It is equivalent in Explorer Suite http://www.ntcore.com/exsuite.php[^] is:

struct tag_service_callback_handle * __cdecl ymdm_video_device_register_callback(struct tag_service_handle *,void (__cdecl*)(int,void *,void *),void *)


how can i translate first complex model to second
Posted
Updated 15-Feb-13 8:06am
v2
Comments
Sergey Alexandrovich Kryukov 15-Feb-13 14:07pm    
I wonder why? Even if you can translate it, what's the use? You cannot fully rely on naming model: it doesn't carry complete unambiguous information on the signature and parameter types.
With C++, people conduct this information using header files (it's a shame, but this is the C/C++ technology, very archaic...).
—SA
ibrahim_ragab 16-Feb-13 5:48am    
in reverse engineering and de_compilers we need to return it back

Translation from the second item to the first is called "name decoration" or (almost) "name mangling". Microsoft provides a tool for undecorating names called "undname.exe". To use it, open the command prompt for your compiler (eg. for VS2010, Start -> Microsoft Visual Studio 2010 -> Visual Studio Tools -> Visual Studio Command Prompt (VS2010)).

If you give the first item above to it as a parameter, it tells you the undecorated name:

d:\vs2010\VC>undname ?ymdm_video_device_register_callback@@YAPAUtag_service_callback_handle@@PAUtag_service_handle@@P6AXHPAX1@Z1@Z
Microsoft (R) C++ Name Undecorator
Copyright (C) Microsoft Corporation. All rights reserved.

Undecoration of :- "?ymdm_video_device_register_callback@@YAPAUtag_service_callback_handle@@PAUtag_service_handle@@P6AXHPAX1@Z1@Z"
is :- "struct tag_service_callback_handle * __cdecl ymdm_video_device_register_callback(struct tag_service_handle *,void (__cdecl*)(int,void *,void *)
,void *)"

d:\vs2010\VC>

[The lines above are wrapping - the undname command needs to be on one line...]
 
Share this answer
 
Comments
ibrahim_ragab 20-Feb-13 7:19am    
thank you my brother
Please see my comment to the question: I don't think it would make any sense. For some background, please see: http://en.wikipedia.org/wiki/Name_mangling[^].

Yes, I understand that you may be well familiar with this topic, but, first, see the references in this article; second, look critically at your problem.

—SA
 
Share this answer
 
Comments
ibrahim_ragab 16-Feb-13 4:43am    
thank you very much
Sergey Alexandrovich Kryukov 16-Feb-13 19:09pm    
You are welcome.
Good luck, call again.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900