Class UnmanglerService
java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.mangling.UnmanglerService
The service offers access to a set of
IManglingEngine
for a INativeCodeUnit
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
importUnmangledRoutineName
(INativeMethodItem routine, String mangledName, IUnmangledRoutine unmangledRoutine, boolean changeRoutineName) Applies unmangled routine declaration to a native routine item.boolean
importUnmangledRoutinePrototype
(INativeMethodItem routine, IUnmangledRoutine unmangledRoutine) Applies unmangled routine declaration to a native routine item.void
registerEngine
(int manglingEngineId) Unmangle a mangled string.unmangleData
(String mangledName, boolean returnFirstResult) Unmangle a mangled string representing a data.unmangleRoutine
(String mangledName, boolean returnFirstResult) Unmangle a mangled string representing a routine.
-
Field Details
-
MANGLING_ENGINE_MSVC
public static final int MANGLING_ENGINE_MSVC- See Also:
-
MANGLING_ENGINE_MSVCPP
public static final int MANGLING_ENGINE_MSVCPP- See Also:
-
MANGLING_ENGINE_MSVCPP_V2
public static final int MANGLING_ENGINE_MSVCPP_V2- See Also:
-
MANGLING_ENGINE_CXXA
public static final int MANGLING_ENGINE_CXXA- See Also:
-
-
Constructor Details
-
UnmanglerService
-
-
Method Details
-
registerEngine
public void registerEngine(int manglingEngineId) -
importUnmangledRoutineName
public boolean importUnmangledRoutineName(INativeMethodItem routine, String mangledName, IUnmangledRoutine unmangledRoutine, boolean changeRoutineName) Applies unmangled routine declaration to a native routine item. This method only takes care of applying the name-related changes, i.e. setting the new routine name and the related attributes.See
UnmanglerService#importUnmangledRoutinePrototype(INativeCodeUnit, INativeMethodItem, IUnmangledRoutine)
.- Parameters:
routine
-mangledName
- the mangled declaration for this routineunmangledRoutine
- the unmangled declaration for this routine (computed from the mangled name)changeRoutineName
- if true the name of the routine will be changed, otherwise it will be kept as-is and only the attributes will be set- Returns:
- true if the import was successfully done, false otherwise
-
importUnmangledRoutinePrototype
public boolean importUnmangledRoutinePrototype(INativeMethodItem routine, IUnmangledRoutine unmangledRoutine) Applies unmangled routine declaration to a native routine item. This method only takes care of applying the prototype change.important:
- only strict C prototypes are applied
- mangled prototypes usually do not contain attributes, such as noreturn. Therefore the typelib prototype should be preferred to this one, if existing.
See
UnmanglerService#importUnmangledRoutineName(INativeMethodItem, IUnmangledRoutine)
.- Parameters:
routine
-unmangledRoutine
-- Returns:
- true if the import was successfully done, false otherwise (e.g. because the prototype application failed)
-
unmangleRoutine
Unmangle a mangled string representing a routine.- Parameters:
mangledName
-returnFirstResult
- if true the first engine to provide a result will have the last word, otherwise a result is returned only if all engines agree (or provide no result)- Returns:
- unmangled string if the given string can be unmangled as a routine, null otherwise
-
unmangleData
Unmangle a mangled string representing a data.- Parameters:
mangledName
-returnFirstResult
- if true the first engine to provide a result will have the last word, otherwise a result is returned only if all engines agree (or provide no result)- Returns:
- unmangled string if the given string can be unmangled as a data, null otherwise
-
unmangle
Unmangle a mangled string.- Parameters:
mangledName
-returnFirstResult
- if true the first engine to provide a result will have the last word, otherwise a result is returned only if all engines agree (or provide no result)- Returns:
- unmangled string if the given string can be unmangled, null otherwise
-