text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>
member _.IsEmpty() = pq.Count = 0
/// Clear the queue.
member _.Clear() = pq.Clear()
and private Priority<'P> = 'P * int<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>er _.Reload(builder: ICFGBuildable<_, _>, managerMsgbox) =
let old = builders[builder.EntryPoint]
builders[builder.EntryPoint] <- old.MakeNew managerMsgbox
/// Try to retrieve a function builder by its address.
member _.TryGetBuilder(addr: Addr) =
match builders.TryGetValue addr with
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>nter
let flushLog tid =
Monitor.Enter lock
try
let sb = logBuilders[tid]
sb.ToString() |> logger.Print
sb.Clear() |> ignore
finally
Monitor.Exit lock
let task = fun (inbox: IAgentMessageReceivable<LogMessage>) ->
while not inbox.IsCancelled do
match inbo... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>k (Ok st)
|> function
| Ok st -> Ok st
| Error e -> Error e
/// Concretely evaluate a basic block from an arbitrarily generated state.
let evalBlockFromScratch hdl (blk: IVertex<LowUIRBasicBlock>) =
let pc = blk.VData.Internals.PPoint.Address
let st = initState hdl pc
st.SideEffectEventHa... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>rmation (e.g., its returning status) has been
/// changed.
| NotifyCalleeChange of callee: Addr * calleeInfo: CalleeInfo
/// Reset the builder.
| ResetBuilder
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> "_exit"
"__longjmp_chk"
"__cxa_bad_cast"
"__cxa_rethrow"
"__cxa_throw"
"__cxa_throw_bad_array_new_length"
"_Unwind_Resume"
"_gfortran_os_error"
"_gfortran_runtime_error"
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the <|fim_suffix|>et() = isExtern
<|fim_middle|>Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>r.
abstract OnAction:
CFGBuildingContext<'FnCtx, 'GlCtx>
* CFGActionQueue
* CFGAction
-> CFGResult
/// This is a callback that is called when a new function builder is created.
abstract OnCreate:
CFGBuildingContext<'FnCtx, 'GlCtx>
-> unit
/// This is a callback th... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIA... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>R IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*)
namespace B2R2.MiddleEnd.ControlFlowAnalysis
open B2R2.BinIR
open B2R2.FrontEnd
open B2R2.FrontEnd.BinLifter
open B2R2.MiddleEnd.ControlFlowGraph
/... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWAR... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>tegy.ActionPrioritizer, action); Wait
| StopAndReload -> StopAndReload
| FailStop e -> FailStop e
do ctx.ManagerChannel <- managerChannel
new(hdl: BinHandle,
exnInfo,
instrs,
entryPoint,
manager,
irBlkOptimizer) =
let name =
match hdl.File.TryFindN... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of ch<|fim_suffix|>do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantia... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>x) =
markVertexAsRemovalForAnalysis ctx vertex
member _.FindCandidatesForPostProcessing _ = [||]
new(recoveryTargets) =
CFGRecovery(false, false, recoveryTargets)
new(allowBBLOverlap, useSSA) =
CFGRecovery(allowBBLOverlap, useSSA, All)
new(allowBBLOverlap, useSSA, recoveryTarge... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>hed(RegisterTag(Regular rid))) ->
regIdToArgNumX64 hdl rid
| _ ->
(* If no definition is found, this means the parameter register is
untouched, thus conditional no return. *)
Some nth
let hasCallFallthroughNode ctx pp =
assert (ctx.Vertices.ContainsKey pp)
let abs... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>ble with
member _.Reset() = ()
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to d... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>inHandle, exnInfo: ExceptionInfo) =
/// This function returns an initial sequence of entry points obtained from
/// the binary itself (e.g., from its symbol information). Therefore, if the
/// binary is stripped, the returned sequence will be incomplete, and we need
/// to expand it during the mai... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>t stmts = (* For abstraction, we check which var can be defined. *)
computeLiveDefs ctx unwindingAmount
|> Array.map (fun (dst, src) -> AST.put dst src)
let regType = ctx.BinHandle.File.ISA.WordSize |> WordSize.toRegType
let fallThrough = AST.num <| BitVector(returnAddress, regType)
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>t
* IVertex<LowUIRBasicBlock>
-> Option<CFGResult>
abstract AnalyzeIndirectCondJump:
CFGBuildingContext<'FnCtx, 'GlCtx>
* Queue<ProgramPoint>
* ProgramPoint
* IVertex<LowUIRBasicBlock>
-> Option<CFGResult>
/// Represents a callback interface for graph operations in CFG r... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*<|fim_suffix|>A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> | BinOp(BinOpType.ADD, _, Load(_, t, tblExpr), baseExpr) ->
if isJmpTable expandPhi findConst findDef t tblExpr then
extractTblInfo findConst findDef iAddr baseExpr tblExpr t false
elif isSingleEntryJmpTable tblExpr then
extractTblInfo findConst findDef iAddr baseExpr tblEx... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> builder in builders.Values do
depMap.GetConfirmedCallers builder.EntryPoint
|> builder.Context.Callers.UnionWith
/// Create builders for the given addresses.
let createBuilders candidates targetAddrs =
let targetAddrSet = Set.ofArray targetAddrs
for candidate in candidates do
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>is not using a jump table.
| CancelJumpTableRecovery of fn: Addr * ins: Addr * tbl: Addr
/// Report jump entry recovery result (success only) to the manager. The
/// manager will then decide whether to continue the analysis or not.
| ReportJumpTableSuccess of fn: Addr
*... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>am.Complete()
/// Status of a task worker command.
and TaskWorkerCommandStatus<'FnCtx,
'GlCtx when 'FnCtx :> IResettable
and 'FnCtx: (new: unit -> 'FnCtx)
and 'GlCtx: (new: unit -> 'GlCtx)> =
| NotAvaila... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> { AsmWordKind = AsmWordKind.Value
AsmWordValue = name } |] |]
and ICallBasicBlock =
inherit IAddressable
inherit IVisualizable
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, fr... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software")<|fim_suffix|>HasVertex vid
member _.HasEdge(src, d... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>accumulator.
member _.FoldEdge(fn, acc) = g.FoldEdge(fn, acc)
/// Iterate over the edges of this CFG with the given function.
member _.IterEdge fn = g.IterEdge fn
interface IDiGraphAccessible<DisasmBasicBlock, CFGEdgeKind> with
member _.Size = g.Size
member _.Vertices = g.Vertices
me... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>tack does this function unwind when return?
member _.UnwindingBytes with get(): int = unwindingBytes
/// A rundown of the function in SSA form.
member _.Rundown with get(): Rundown<'Stmt> = rundown
/// Is this an external function?
member _.IsExternal with get(): bool = isExternal
member _.... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>T NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTI... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>MPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
O... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> member _.FindEdge(src, dst) = g.FindEdge(src, dst)
member _.TryFindEdge(src, dst) = g.TryFindEdge(src, dst)
member _.GetPreds v = g.GetPreds v
member _.GetPredEdges v = g.GetPredEdges v
member _.GetSuccs v = g.GetSuccs v
member _.GetSuccEdges v = g.GetSuccEdges v
member _.GetRoo... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>ertex from this CFG.
member _.RemoveVertex v = g.RemoveVertex v |> update
/// Check the existence of the given vertex from this CFG.
member _.HasVertex vid = g.HasVertex vid
/// Find a vertex by its VertexID. This function raises an exception when
/// there is no such a vertex.
member _.Find... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>ith
| Undef -> Undef
| Const bv -> if bv.IsZero then c2 else c1
| NotAConst -> join c1 c2
let cast op rt c = unOp (fun bv -> op (bv, rt)) c
let signExt rt c = cast BitVector.SExt rt c
let zeroExt rt c = cast BitVector.ZExt rt c
let extract c rt pos = unOp (fun bv -> BitVector.Extra... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*)
/// Provides constants used in data flow analyses.
module B2R2.MiddleEnd.DataFlow.Constants
/// Defines the default stack pointer value used in data flow analyses.
let [<Literal>] InitialStackPointer = 0x80000000UL
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>d (Set.singleton u) map
| Some us -> Map.add d (Set.add u us) map) map) Map.empty
let private normalizeVP (vp: VarPoint) =
let addr = vp.ProgramPoint.Address
{ vp with ProgramPoint = ProgramPoint(addr, 0) }
let private filterDisasm isDisasmLevel chain =
if not isDisasmLevel then ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software<|fim_suffix|>st op rt c
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>nst
let rec evalExpr (state: State<_>) = function
| Num bv -> ConstantDomain.Const bv
| Var v -> state.GetRegValue v
| Load(m, rt, addr) ->
evalExpr state addr |> evalLoad state m rt
| UnOp(op, _, e) ->
evalExpr state e |> ConstantPropagation.evalUnOp op
| BinOp(op, _, e... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>saCFG.IterVertex(fun v ->
let vid = v.ID
for idx = 0 to v.VData.Internals.Statements.Length - 1 do
let stmt = snd v.VData.Internals.Statements[idx]
match stmt with
| SSA.LMark _ -> ()
| SSA.ExternalCall(expr, inVars, outVars) ->
let loc = vid, idx
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>TryGetValue var with
| true, v -> v
| false, _ -> lattice.Bottom
/// Sets register value without adding it to the worklist.
member _.SetRegValueWithoutAdding(var: Variable, value: 'Lattice) =
regValues[var] <- value
/// Checks if the register has been initialized.
member _.IsRegSet(v... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"<|fim_suffix|>ain.Lattice>,
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>dValueDomain.Lattice> with
member _.Transfer(stmt, ssaCFG, blk) =
match stmt with
| Def(var, e) -> evalDef state var e
| Phi(var, ns) -> evalPhi state ssaCFG blk var ns
| Jmp _ -> evalJmp state ssaCFG blk
| LMark _ | ExternalCall _ | SideEffect _ -... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>ector.Sub(bv1, bv2))
| _ -> NotConstSP
let ``and`` c1 c2 =
match c1, c2 with
| Undef, _ | _, Undef -> Undef
| ConstSP bv1, ConstSP bv2 -> ConstSP(BitVector.And(bv1, bv2))
| _ -> NotConstSP
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab.... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> rd = get (Memory addr) rd
let store addr pp rd =
let pps = load addr rd
let pps = Set.add pp pps
Map.add (Memory addr) pps rd
let join rd1 rd2 =
Map.keys rd2
|> Seq.fold (fun acc k ->
let pps1 = get k rd1
let pps2 = get k rd2
let pps = Set.union pps1 pps2
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>d.
let ofSSAVarKind (kind: SSA.VariableKind) =
match kind with
| SSA.RegVar(_, rid, _) -> Regular rid
| SSA.TempVar(_, n) -> Temporary n
| SSA.StackVar(_, offset) -> StackLocal offset
| _ -> Terminator.impossible ()
/// Returns true if the given VarKind is a temporary variable.
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>extWorks work do state.PushWork work
state
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Softwa... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|> mov DWORD PTR [rbp-0x14],edi
b: 83 7d ec 00 cmp DWORD PTR [rbp-0x14],0x0
f: 74 10 je 21 <example+0x21>
11: c7 45 f4 02 00 00 00 mov DWORD PTR [rbp-0xc],0x2
18: c7 45 f8 03 00 00 00 mov DWORD PTR [rbp-0x8],0x3
1f: eb 0e ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>arge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to p... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>rrent stack pointer value.
abstract SetStackPointer: addr: Addr -> unit
/// Initialize the stack pointer with the given stack top.
abstract InitializeStack: stackTop: Addr -> unit
/// Initialize the frame pointer with the current stack pointer.
abstract InitializeFramePointer: unit -> unit
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without li... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>it persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>ata.Internals.PPoint
let srcV = getAbsVertex stmtProcessor avMap ssaCFG src dstPp
let dstV = getVertex stmtProcessor vMap ssaCFG dst
ssaCFG.AddEdge(srcV, dstV, e.Label)
else
let srcV = getVertex stmtProcessor vMap ssaCFG src
let dstV = getVertex stmtProcessor ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>
| _ -> bytes
combineBytes bytes
| Error e -> Error e
let store addr (value: SymbExpr) endian (mem: ISymbMemory) =
let len = RegType.toByteWidth value.Type
for offset = 0 to len - 1 do
let pos =
match endian with
| Endian.Big -> (len - offset - 1) * 8
... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. @ KAIST, since 2016
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | fim | B2R2-org/B2R2 | fsharp |
<|fim_suffix|>UnsupportedOperation "strlen produced no feasible state.")
| Ok states -> Ok states
/// Models strlen using the default string bound.
let strlen ctx st =
strlenBounded defaultStringBound ctx st
<|fim_prefix|>(*
B2R2 - the Next-Generation Reversing Platform
Copyright (c) SoftSec Lab. ... | fim | B2R2-org/B2R2 | fsharp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.