MCPcopy Create free account

hub / github.com/RolfRolles/HexRaysDeob / functions

Functions106 in github.com/RolfRolles/HexRaysDeob

↓ 187 callersFunctionmopt_t_to_string
Produce a string for an operand type
HexRaysUtil.cpp:5
↓ 21 callersFunctionequal_mops_ignore_size
-------------------------------------------------------------------------- compare operands but ignore the sizes
HexRaysUtil.cpp:134
↓ 13 callersFunctiondebugmsg
Unflattener.cpp:16
↓ 9 callersFunctiondebugmsg
CFFlattenInfo.cpp:12
↓ 8 callersFunctionExtractNumAndNonNum
For microinstructions with two or more operands (in l and r), check to see if one of them is numeric and the other one isn't. If this is the case, ret
PatternDeobfuscateUtil.cpp:12
↓ 7 callersFunctionTunnelThroughAnd1
The obfuscation techniques upon conditional operations have "&1" miscellaneously present or not present within them. Writing pattern-matching rules fo
PatternDeobfuscateUtil.cpp:85
↓ 7 callersFunctionmcode_t_to_string
Produce a brief representation of a microinstruction, including the types of its operands.
HexRaysUtil.cpp:31
↓ 6 callersFunctionMicroMaturityToString
Produce a string describing the microcode maturity level.
HexRaysUtil.cpp:112
↓ 5 callersFunctionExtractLogicallyNegatedTerm
The obfuscator implements boolean inversion via "x ^ 1". Hex-Rays, or one of our other deobfuscation rules, could also convert these to m_lnot instruc
PatternDeobfuscateUtil.cpp:127
↓ 4 callersFunctiondebugmsg
DefUtil.cpp:7
↓ 3 callersFunctionExtractByOpcodeType
For microinstructions with two or more operands (in l and r), check to see if one of them is a mop_d (result of another microinstruction), where the p
PatternDeobfuscateUtil.cpp:51
↓ 3 callersFunctionInsertOp
Put an mop_t into an mlist_t. The op must be either a register or a stack variable.
DefUtil.cpp:19
↓ 3 callersFunctiondebugmsg
TargetUtil.cpp:5
↓ 2 callersFunctionAppendGotoOntoNonEmptyBlock
Append a goto onto a non-empty block, which is assumed not to already have a goto at the end of it.
TargetUtil.cpp:17
↓ 2 callersMethodDisplay
MicrocodeExplorer.cpp:271
↓ 2 callersFunctionDumpMBAToFile
Unflattener.cpp:26
↓ 2 callersFunctionExtractJccParts
For a block that ends in a conditional jump, extract the integer block numbers for the "taken" and "not taken" cases.
TargetUtil.cpp:192
↓ 2 callersMethodInsert
Insert a micro-operand into one of the two sets above. Remove duplicates -- meaning, if the operand we're trying to insert is already in the set, remo
PatternDeobfuscateUtil.cpp:250
↓ 2 callersMethodReplace
Plan to replace an edge from src->oldDest to src->newDest
TargetUtil.cpp:257
↓ 1 callersMethodApply
Apply the planned changes to the graph
TargetUtil.cpp:264
↓ 1 callersFunctionAreConditionsOpposite
This function checks whether two conditional terms are logically opposite. For example, "eax <s 1" and "eax >=s 1" would be considered logically oppos
PatternDeobfuscateUtil.cpp:198
↓ 1 callersFunctionAskDesiredMaturity
MicrocodeExplorer.cpp:467
↓ 1 callersMethodBuild
MicrocodeExplorer.cpp:85
↓ 1 callersMethodChangeGoto
Either change the destination of an existing goto, or add a new goto onto the end of the block to the destination. Also, plan to modify the graph stru
TargetUtil.cpp:305
↓ 1 callersFunctionChangeSingleTarget
For a block with a single successor, change its target from some old block to a new block. This is only on the graph level, not in terms of gotos.
TargetUtil.cpp:38
↓ 1 callersMethodClear
Unflattener.hpp:13
↓ 1 callersFunctionComputeDominators
Compute dominator information for the function.
CFFlattenInfo.cpp:302
↓ 1 callersFunctionDeleteBlock
Delete all instructions on a block, and remove its outgoing edges. Blocks will be deleted if we have removed edges in the graph such that the block is
TargetUtil.cpp:338
↓ 1 callersMethodFindBlockByKey
Convenience function to look up a block number by its key. This way, we can write the iterator-end check once, so clients don't have to do it.
CFFlattenInfo.cpp:382
↓ 1 callersFunctionFindForwardNumericDef
This function finds a numeric definition by searching in the forward direction.
DefUtil.cpp:185
↓ 1 callersFunctionFindForwardStackVarDef
This function is just a thin wrapper around FindForwardNumericDef, which also inserts the mov into the "chain" argument.
DefUtil.cpp:215
↓ 1 callersFunctionFindNumericDefBackwards
This function has way too many arguments. Basically, it's a wrapper around my_find_def_backwards from above. It is extended in the following ways: If
DefUtil.cpp:84
↓ 1 callersFunctionFixCallsToAllocaProbe
Find all calls to __alloca_probe, extract the parameters, and update the stack pointer differentials.
AllocaFixer.cpp:82
↓ 1 callersMethodGetAssignedAndComparisonVariables
This function computes all of the preliminary information needed for unflattening.
CFFlattenInfo.cpp:391
↓ 1 callersFunctionGetFirstBlock
This function finds the "first" block immediately before the control flow flattening dispatcher begins. The logic is simple; start at the beginning of
CFFlattenInfo.cpp:141
↓ 1 callersMethodOptimize
This function just inspects the instruction and calls the pattern-replacement functions above to perform deobfuscation.
PatternDeobfuscate.cpp:562
↓ 1 callersFunctionPruneUnreachable
The goto-to-goto elimination and unflattening phases remove edges in the control flow graph represented in the mbl_array_t *. As a result, certain blo
TargetUtil.cpp:379
↓ 1 callersFunctionRemoveSingleGotos
This function eliminates transfers to blocks with a single goto on them. Either if a given block has a goto at the end of it, where the destination is
TargetUtil.cpp:71
↓ 1 callersMethodShouldBlacklist
This method determines whether a given function is likely obfuscated. It does this by ensuring that: 1) Some minimum number of comparisons are made ag
CFFlattenInfo.cpp:27
↓ 1 callersFunctionShowMicrocodeExplorer
MicrocodeExplorer.cpp:485
↓ 1 callersMethodSimplify
Top-level functionality to simplify an XOR microinstruction. Insert the instruction, then see if any simplifications could be performed. If so, remove
PatternDeobfuscateUtil.cpp:342
↓ 1 callersFunctionSplitMblocksByJccEnding
For a block with two predecessors, figure out if one of them ends in a jcc instruction. Return pointers to the block that ends in a jcc and the one th
TargetUtil.cpp:217
↓ 1 callersFunctionis_call_block
Reverse engineered from hexrays.dll (though it's obvious). Basically: does this block end in a call instruction?
TargetUtil.cpp:55
↓ 1 callersFunctionmy_find_def_backwards
Ilfak sent me this function in response to a similar support request. It walks backwards through a block, instruction-by-instruction, looking at what
DefUtil.cpp:44
↓ 1 callersFunctionmy_find_def_forwards
This is a nearly identical version of the function above, except it works in the forward direction rather than backwards.
DefUtil.cpp:58
MethodAdd
Plan to add an edge from src->dest
TargetUtil.cpp:251
MethodAddEdge
MicrocodeExplorer.cpp:92
MethodAddLine
MicrocodeExplorer.cpp:39
MethodAddLine
MicrocodeExplorer.cpp:49
MethodBlah
PatternDeobfuscate.cpp:634
MethodCFFlattenInfo
CFFlattenInfo.hpp:52
MethodCFUnflattener
Unflattener.hpp:20
MethodClear
TargetUtil.hpp:21
MethodClear
MicrocodeExplorer.cpp:76
MethodClear
CFFlattenInfo.hpp:27
MethodDidSimplify
Were any cancellations performed?
PatternDeobfuscateUtil.cpp:333
MethodDisplay
MicrocodeExplorer.cpp:182
MethodFindBlockTargetOrLastCopy
This function attempts to locate the numeric assignment to a given variable "what" starting from the end of the block "mb". It follows definitions bac
Unflattener.cpp:82
MethodFindNonCommonConstant
Compare two sets of mop_t * (number values) element-by-element. There should be one value in the larger set that's not in the smaller set. Find and re
PatternDeobfuscate.cpp:399
MethodGetDominatedClusterHead
Find the block that dominates iDispPred, and which is one of the targets of the control flow flattening switch.
Unflattener.cpp:40
MethodGetIncrBlockNum
MicrocodeExplorer.cpp:101
MethodHandleTwoPreds
This function is used for unflattening constructs that have two successors, such as if statements. Given a block that assigns to the assignment variab
Unflattener.cpp:151
MethodHandoffVarFinder
CFFlattenInfo.cpp:215
MethodInsert
MicrocodeExplorer.cpp:106
MethodInsertConst
PatternDeobfuscateUtil.cpp:287
MethodInsertNonConst
Wrapper to insert constant and non-constant terms
PatternDeobfuscateUtil.cpp:281
MethodJZCollector
CFFlattenInfo.cpp:85
MethodJZInfo
CFFlattenInfo.hpp:6
MethodJZMapper
CFFlattenInfo.cpp:263
MethodMicrocodeGraphContainer
MicrocodeExplorer.cpp:270
MethodMicrocodeInstructionGraphContainer
MicrocodeExplorer.cpp:180
MethodNonConstSetsMatch
Compare two sets of mop_t * element-by-element. Return true if they match.
PatternDeobfuscate.cpp:371
MethodProcessErasures
Erase the now-superfluous chain of instructions that were used to copy a numeric value into the assignment variable.
Unflattener.cpp:216
MethodRemove
Plan to remove an edge from src->dest
TargetUtil.cpp:245
MethodXorSimplifier
PatternDeobfuscateUtil.hpp:15
Functionct_keyboard
MicrocodeExplorer.cpp:349
Methodfunc
This is the top-level un-flattening function for an entire graph. Hex-Rays calls this function since we register our CFUnflattener class as a block op
Unflattener.cpp:250
Methodfunc
Callback function. Do pattern-deobfuscation.
PatternDeobfuscate.cpp:606
Functioninit
--------------------------------------------------------------------------
main.cpp:29
Methodmblock_dumper_t
MicrocodeExplorer.cpp:48
Methodmblock_qstring_dumper_t
MicrocodeExplorer.cpp:38
Methodmblock_virtual_dumper_t
MicrocodeExplorer.cpp:12
Functionmgr_callback
MicrocodeExplorer.cpp:296
Functionmigr_callback
MicrocodeExplorer.cpp:207
Methodpat_AndXor
Matches patterns of the form: (a^b^c^d) & (a^b^c^d^e) => (a^b^c^d) & ~e, where e is numeric The terms don't necessarily have to be in the same order;
PatternDeobfuscate.cpp:437
Methodpat_BnotOrBnotConst
Replaces terms of the form ~(~x | n), where n is a number, with x & ~n.
PatternDeobfuscate.cpp:529
Methodpat_IsSubBy1
One of the obfuscation patterns involves a subtraction by 1. In the assembly code, this is implemented by something like: add eax, 2 add eax, ecx ; o
PatternDeobfuscate.cpp:72
Methodpat_LnotOrLnotLnot
Replaces conditionals of the form !(!c1 || !c2) with (c1 && c2).
PatternDeobfuscate.cpp:502
Methodpat_LogicAnd1
This function simplifies microinstruction patterns that look like either: (x & 1) | (y & 1) ==> (x | y) & 1 or: (x & 1) ^ (y & 1) ==> (x ^ y) & 1
PatternDeobfuscate.cpp:17
Methodpat_MulSub
This function performs the following pattern-substitution: (x * (x-1)) & 1 ==> 0
PatternDeobfuscate.cpp:103
Methodpat_OrAndNot
Replace patterns of the form (x&c)|(~x&d) (when c and d are numbers such that c == ~d) with x^d.
PatternDeobfuscate.cpp:262
Methodpat_OrNegatedSameCondition
This pattern replaces microcode of the form (x|!x), where x is a conditional, and !x is its syntactically-negated version, with 1.
PatternDeobfuscate.cpp:226
Methodpat_OrViaXorAnd
This function looks tries to replace patterns of the form either: (x&y)|(x^y) ==> x|y or: (x&y)|(y^x) ==> x|y
PatternDeobfuscate.cpp:182
Methodpat_XorChain
Remove XOR chains with common terms. E.g. x^5^y^6^5^x ==> y^6. This uses the XorSimplifier class from PatternDeobfuscateUtil.
PatternDeobfuscate.cpp:346
Functionrun
--------------------------------------------------------------------------
main.cpp:66
Methodsample_info_t
MicrocodeExplorer.cpp:61
Functionterm
--------------------------------------------------------------------------
main.cpp:45
Functionui_callback
MicrocodeExplorer.cpp:436
Methodvisit_minsn
CFFlattenInfo.cpp:87
Methodvisit_minsn
CFFlattenInfo.cpp:184
next →1–100 of 106, ranked by callers