1

I loaded a dynamic library file to IDA. I can clearly see the function signatures from the "Function name list". There are RTTI items in the "Structures" tab as well, but I don't really understand it. I would like to generate a.hpp header file from the library, so I could use this DLL from my C++ projects.

My final goal would be to rewrite this library in a way, that it can be used from the programs, that depend on the original dll.

I tried to use the IDA ClassInformer PlugIn, but I get this result:

>> Class Informer: v: 2.5, built: Jul 13 2018, By Sirmabus
Working..
** Failed to load the IDA TypeDescriptor type, generating one **

Processing C/C++ ctor & dtor tables..
-------------------------------------------------
0000000010705194 I: "_initterm", 6 bytes.
00000000107061B8 import: "__imp__initterm".
 
0000000010705194 processInitterm: "_initterm" 
  0000000010704FF2 "_initterm" xref.
  ** arguments not located!
 
00000000107061B8 processInitterm: "__imp__initterm" 
 
Processing time: 2.52 milliseconds.

Scanning for for RTTI Complete Object Locators..
-------------------------------------------------
 N: ".data", A: 000000001080A000 - 000000001080C000, S: 8 KB.
 N: ".rdata", A: 00000000108061CC - 000000001080A000, S: 15.6 KB.
 N: ".idata", A: 0000000010806000 - 00000000108061CC, S: 460 bytes.
 N: ".text", A: 0000000010801000 - 0000000010806000, S: 20 KB.
     Total COL: 0
COL scan time: 0.001

Scanning for Virtual Function Tables..
-------------------------------------------------
 N: ".data", A: 000000001080A000 - 000000001080C000, S: 8 KB.
 N: ".rdata", A: 00000000108061CC - 000000001080A000, S: 15.6 KB.
 N: ".idata", A: 0000000010806000 - 00000000108061CC, S: 460 bytes.
 N: ".text", A: 0000000010801000 - 0000000010806000, S: 20 KB.
Vftable scan time: 0.003
 

=========== Stats ===========
  RTTI vftables: 0
Processing time: 6.27 milliseconds
Done.

It does not show anything. What do I wrong?

1 Answer 1

1

If you expect something like full class definitions with field and method names, it’s simply not possible: all such information is not necessary for program execution and is discarded by the compiler. Sometimes runtime type information (RTTI) with class names may remain if the program uses classes with virtual functions and RTTI has not been disabled by the developer. However, it seems your target is lacking even that. So probably the only way is to analyze the code and try to recover possible classes by manual inspection.

See also: Why are machine code decompilers less capable than for example those for the CLR and JVM?

It may also be the case that the target doesn’t use any classes but consists only of standalone functions, each one doing its own job.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.