Module Analyze.Create
Parameters
Signature
module Dba2CodexC : sig ... endmodule Arch : sig ... endmodule Dba2CState : sig ... endmodule Record_cfg : sig ... endmodule Settings : sig ... endmodule Addr_tbl = Hooks.Addr_tblmodule Cfg = Cfg_analysis.Cfgmodule Dhunk_regex = Dhunk_analysis.Dhunk_regexval exploration_result : Dba2CState.State.t option Stdlib.refUtility functions. *
module Dhunk_regex_hash : sig ... endmodule Dhunk_regex_tbl : sig ... endval do_regex :
locid:'a Syntax_tree.Location_identifier.t ->
Binsec.Dhunk.t ->
Dba2CState.State.t Dhunk_regex_tbl.t ->
Dhunk_regex_tbl.key ->
Dba2CState.State.t optionval transfer_dhunk :
locid:'a Syntax_tree.Location_identifier.t ->
Binsec.Dhunk.t ->
Dba2CState.State.t ->
(Binsec.Virtual_address.t * Dba2CState.State.t) listmodule Addr_map : sig ... endval check_return_type : Dba2CState.State.t -> TypedC.typ option -> unitval transfer_instruction_nostub :
Addr_tbl.key ->
Dba2CState.State.t ->
Dba2CState.State.t Addr_map.tval transfer_instruction :
Binsec.Virtual_address.t ->
Record_cfg.t ->
Dba2CState.State.t ->
Record_cfg.t * Dba2CState.State.t Addr_map.tval transfer_from_to_generic :
transfer_instruction:('a -> 'b -> 'c -> Record_cfg.t * 'd Addr_map.t) ->
self:
(stop_pred:'e ->
Addr_map.key ->
Record_cfg.t ->
'd ->
Record_cfg.t * Dba2CState.State.t Addr_map.t) ->
stop_pred:'e ->
'a ->
'b ->
'c ->
Record_cfg.t * Dba2CState.State.t Addr_map.tval transfer_from_to :
Addr_tbl.key ->
stop_pred:(Binsec.Virtual_address.t -> Record_cfg.context_change -> bool) ->
Record_cfg.t ->
Dba2CState.State.t ->
Record_cfg.t * Dba2CState.State.t Addr_map.tval analyze_address_nocheck :
Dba2CState.State.t ->
Record_cfg.t ->
Binsec.Virtual_address.t ->
unitLike analyze_address but does not call next on the first, and thus will not stop if address was already visited.
val analyze_address :
Dba2CState.State.t ->
Record_cfg.t ->
Binsec.Virtual_address.t ->
unitval analyze_address' :
Dba2CState.State.t ->
Record_cfg.t ->
Binsec.Virtual_address.t ->
unitval destination : ('a * 'b) Codex.Fixpoint.Regex.tagged_regex -> 'bmodule Regex_tbl_0 : sig ... endmodule Regex_tbl : sig ... endval handle_successors :
(Binsec.Virtual_address.t * Dba2CState.State.t) list ->
Dba2CState.State.t Regex_tbl.t ->
Dba2CState.State.t ->
Record_cfg.t ->
Cfg_analysis.CfgRegex.t ->
Cfg_analysis.Cfg.V.t ->
unitval analyze_regex :
Dba2CState.State.t Regex_tbl.t ->
Dba2CState.State.Domain.Context.t ->
Record_cfg.t ->
Regex_tbl.key ->
unitAnalyze a set of paths in the CFG (described by a regex) to possibly discover new edges. When that happens, the new path set is explored immediately, enriching the instruction graph by a depth-first search without merge (analyze_address). If that happens, it means that the fixpoint was not reached, and analyze_regex returns false. Otherwise, if no new instruction is discovered, a fixpoint was reached and analyze_regex returns true. Please note: The instruction at the end of the path is not analyzed by this function.
val find_end_nodes : Cfg.t -> Cfg.vertex -> Cfg.vertex listmodule Wto_cfg = Cfg_analysis.Wtomodule Reduce_cfg = Cfg_analysis.Reducemodule G' : sig ... endmodule OutputCfg : sig ... endval setup_entrypoint :
Binsec.Loader.Img.t ->
int ->
Dba2CState.State.t ->
Binsec.Virtual_address.t * Record_cfg.t * Dba2CState.State.t Regex_tbl.tval analyze_path_expression :
Dba2CState.State.t Regex_tbl.t ->
Dba2CState.State.t ->
Record_cfg.t ->
Cfg.t ->
Cfg.vertex ->
Regex_tbl.key ->
unitval compute_fixpoint :
string ->
string option ->
(string, string) Stdlib.Hashtbl.t ->
Binsec.Loader.Img.t ->
Dba2CState.State.t ->
Binsec.Virtual_address.t ->
Record_cfg.t ->
Dba2CState.State.t Regex_tbl.t ->
boolval report_graph_informations : Cfg.t -> unitval report_instruction_informations : Cfg.t -> unitval report_results : Record_cfg.t -> unitval return_final_state :
Record_cfg.t ->
Addr_tbl.key option ->
(Binsec.Virtual_address.Set.t * Binsec.Virtual_address.Set.t)
* Dba2CState.State.t option
* Binsec.Virtual_address.Set.tval analyze :
Binsec.Loader.Img.t ->
int ->
Dba2CState.State.t ->
string ->
Addr_tbl.key option ->
string option ->
(string, string) Stdlib.Hashtbl.t ->
(Binsec.Virtual_address.Set.t * Binsec.Virtual_address.Set.t)
* Dba2CState.State.t option
* Binsec.Virtual_address.Set.tval interprete_concrete :
Binsec.Loader.Img.t ->
int ->
Dba2CState.State.t ->
string ->
string option ->
(string, string) Stdlib.Hashtbl.t ->
(Binsec.Virtual_address.Set.t * Binsec.Virtual_address.Set.t)
* Dba2CState.State.t option
* Binsec.Virtual_address.Set.tmodule ReadMem :
Heap_typing.MEMORY
with type t = Dba2CodexC.Domain.Context.t * Dba2CState.State.tmodule Heap_typechecker : sig ... endval add_stack_arg :
int ->
Types.TypedC.typ ->
Dba2CState.State.t ->
Dba2CState.State.tval add_stack_arg_value :
int ->
Dba2CodexC.Domain.binary ->
Dba2CState.State.t ->
Dba2CState.State.tval add_stack_return : Dba2CState.State.t -> Dba2CState.State.tval populate_stack_with_args :
Types.TypedC.typ list ->
Dba2CState.State.t ->
Dba2CState.State.tval populate_globals_with_types :
(Z.t * TypedC.typ) list ->
Dba2CState.State.t ->
Dba2CState.State.tval populate_globals_with_symbols :
(string * TypedC.typ) list ->
Dba2CodexC.Domain.Context.t ->
unitval populate_hook :
(Binsec.Virtual_address.t
* [> `nop
| `return_unknown of Types.TypedC.typ
| `skip_to of Binsec.Virtual_address.t
| `stop ])
list ->
unitval set_mmio : (int * int) list -> Dba2CState.State.t -> Dba2CState.State.tval initial_function_args_ret_types :
Codex.Types.TypedC.typ ->
Dba2CodexC.Domain.Context.t ->
Codex.Types.TypedC.typ list * Codex.Types.TypedC.typ