text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_suffix|> 2 | MII = 3 | RI = 4 | RIE = 5 | RIL = 6 | RIS = 7 | RR = 8 | RRD = 9 | RRE = 10 | RRF = 11 | RRS = 12 | RS = 13 | RSI = 14 | RSL = 15 | RSY = 16 | RX = 17 | RXE = 18 | RXF = 19 | RXY = 20 | S = 21 | SI = 22 | SIL = 23 | SIY = 24 | SMI = 25 | SS = 26 | SS...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>OSE 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 SOFTWARE. *) module int...
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|>an S390 instruction. and Operand = | OpReg of Register | OpImm of ImmType | OpRImm of ImmType | OpMask of Mask | OpStore of Index * Base * Displacement | OpStoreLen of Length * Base * Displacement /// Represents an immediate value used in S390 instructions. and ImmType = | ImmU4 of BitVecto...
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 <|fim_suffix|> LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT...
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|>3 |] | R.FPR4 | R.VR4 -> [| R.FPR4; R.VR4 |] | R.FPR5 | R.VR5 -> [| R.FPR5; R.VR5 |] | R.FPR6 | R.VR6 -> [| R.FPR6; R.VR6 |] | R.FPR7 | R.VR7 -> [| R.FPR7; R.VR7 |] | R.FPR8 | R.VR8 -> [| R.FPR8; R.VR8 |] | R.FPR9 | R.VR9 -> [| R.FPR9; R.VR9 |] | R.FPR10 | R.VR10 -> [| R.FPR10;...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> cr8 cr9 cr10 cr11 cr12 cr13 cr14 cr15 ar0 ar1 ar2 ar3 ar4 ar5 ar6 ar7 ar8 ar9 ar10 ar11 ar12 ar13 ...
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|>ins.Address, len) bld <+ (op1 := AST.sext 32<rt> src) bld <+ (op2 := AST.sext 32<rt> dst) bld <+ (macl := op1 .* op2) bld <+ (regVar bld R.MACL := AST.zext 32<rt> macl) bld --!> len let mulsw ins len bld = let struct (src, dst) = trsTwoOpr ins bld let struct (op1, op2) = tmpVars2 bld 16<rt>...
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|>(* B2R<|fim_suffix|>AR 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 T...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>. | RTE = 94 // Return from Subroutine. | RTS = 95 // Set 'S' bit. | SETS = 96 // Set 'T' bit. | SETT = 97 // Shift Arithmetic Dynamically. | SHAD = 98 // Shift Arithmetic Left. | SHAL = 99 // Shift Arithmetic Right. | SHAR = 100 // Shift Logical Dynamically. | SHLD = 101 /...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>k b = getRegBank (getBits b 7 5) let getReg1dFR b = getRegFR (getBits b 12 9) let getReg1dXF b = getRegXF (getBits b 12 9) let getReg1dDR b = getRegDR (getBits b 12 10 * 2us) let getReg1dXD b = getRegXD (getBits b 12 10 * 2us) let getReg1dFV b = getRegFV (getBits b 12 11 * 4us) let getReg1s b = getR...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>egister indirect with post-increment | RegIndirPostInc of Register /// Register indirect with pre-decrement | RegIndirPreDec of Register /// Register indirect with displacement | RegIndirDisp of Const * Register /// Indexed register indirect | IdxRegIndir of Register * Register /// GBR ind...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> SH4 instructions. type SH4Parser(reader) = let lifter = { new ILiftable with member _.Lift(ins, builder) = Lifter.translate ins ins.Length builder member _.Disasm(ins, builder) = Disasm.disasm ins builder; builder } interface IInstructionParsable with member _.MaxInstructionS...
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 <|fim_suffix|> R.FPR10 | R.FPR11 | R.FPR...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> [| r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc |] member _.GetGeneralRegVars() = [| r0 r1 r2 r3 ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> = opCodeToString ins.Opcode builder.Accumulate(AsmWordKind.Mnemonic, str) let disasm (ins: Instruction) (builder: IDisasmBuilder) = let pc = ins.Address builder.AccumulateAddrMarker pc buildOpcode ins builder buildOprs ins pc builder <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Plat...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>/ Represents an instruction for SPARC. type Instruction internal(addr, numBytes, op, opr, lifter: ILiftable) = /// Address of this instruction. member _.Address with get(): Addr = addr /// Length of this instruction in bytes. member _.Length with get(): uint32 = numBytes /// Opcode. 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_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|>woOperands of Operand * Operand | ThreeOperands of Operand * Operand * Operand | FourOperands of Operand * Operand * Operand * Operand | FiveOperands of Operand * Operand * Operand * Operand * Operand /// Represents an operand used in an SPARC instruction. and Operand = | OprReg of Register | 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_suffix|>RPOSE 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 SOFTWARE. *) namespac...
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|>ND 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 SOFTWARE. *) namespace B2R2....
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>_.DirectBranchTarget(_addr: byref<Addr>) = Terminator.futureFeature () member _.IndirectTrampolineAddr(_addr: byref<Addr>) = Terminator.futureFeature () member _.MemoryDereferences(_: byref<Addr[]>) = Terminator.futureFeature () member _.Immediate(_v: byref<int64>) = Terminator....
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|> access. and ModificationPerformed = | NegativeOffset | PositiveOffset | PreDecrement | PreIncrement | PostDecrement | PostIncrement /// Represents an offset used in memory addressing. and Offset = | OffsetR of Register | UCst5 of uint64 | UCst15 of uint64 <|fim_prefix|>(* B2R2 - the ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>uction member _.Parse(span: ByteSpan, addr) = ParsingMain.parse lifter span reader &inParallel addr :> IInstruction <|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 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_suffix|>ure () member _.IsFramePointer _ = Terminator.futureFeature () <|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 documenta...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>ins = parser.Parse(span, 0UL) :?> Instruction Assert.AreEqual<Opcode>(opcode, ins.Opcode) Assert.AreEqual<FunctionalUnit>(funit, ins.FunctionalUnit) Assert.AreEqual<Operands>(oprs, ins.Operands) let operandsFromArray oprList = let oprs = Array.ofList oprList match oprs.Length 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_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|> | V128 of BitVector * BitVector * BitVector * BitVector | Type of int | RefType of int | Index of uint32 | Alignment of uint32 | Address of uint32 | LaneIndex of uint8 | ConsistencyModel of uint8 <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) SoftSec Lab....
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|>eU, NoOperand, 2u) | 0x2duy -> struct (I16X8Eq, NoOperand, 2u) | 0x2euy -> struct (I16X8Ne, NoOperand, 2u) | 0x2fuy -> struct (I16X8LtS, NoOperand, 2u) | 0x30uy -> struct (I16X8LtU, NoOperand, 2u) | 0x31uy -> struct (I16X8GtS, NoOperand, 2u) | 0x32uy -> struct (I16X8GtU, NoOperand,...
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_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|>olFlowAnalysis /// A lens that converts a BinaryBrew to a CallCFG. [<RequireQualifiedAccess>] module CallGraph = /// A mapping from an address to a CallCFG vertex. type private CallVMap = Dictionary<Addr, IVertex<CallBasicBlock>> let private getVertex (brew: BinaryBrew<_, _>) vMap addr g = mat...
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|>s bblFactory (ProgramPoint(addr, 0)) |] |> Array.concat CollectionAssert.AreEqual(expected, actual) #if ! EMULATION [<TestMethod>] member _.``BBLFactory Test 2``() = let bblFactory = BBLFactory(hdl, instrs) let bblAddrs = [| 0x00UL; 0x0cUL; 0x24UL |] let pps = [| ProgramPo...
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|>ier<'V, 'E> with member _.DominanceFrontier(v) = frontiers[v] } <|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 doc...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>nceFrontier(g, dom, isPostDominance) = let frontiers = computeDF g dom isPostDominance { new IDominanceFrontier<'V, 'E> with member _.DominanceFrontier(v) = frontiers[v] } <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) SoftSec Lab. @ KAIST, since 20...
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|>s g let idoms = lazy computeIDoms g doms.Value let idom v = idoms.Value[v] let domTree = lazy DominatorTree(g, idom) doms, idoms, domTree type private IterativeDominance<'V, 'E when 'V: equality and 'E: equality> (g, dfp) = let forward = createDomInfo g dfp let backwardG = lazy (GraphUtils....
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 Soft<|fim_suffix|>KET let private co...
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|>o v #else let private computeDom info v = let w = info.First[v] if w = -1 then () else computeDomAux info w v #endif let private prepareDomInfo (g: IDiGraphAccessible<_, _>) = let info = initDomInfo g let n = prepareWithDummyRoot g info info, n let private computeIDom g info n = for i ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>al EdgeLabel<'E when 'E: equality>(value: 'E) = member _.Value = value override _.ToString() = $"{value}" interface System.IEquatable<EdgeLabel<'E>> with member this.Equals(other: EdgeLabel<'E>) = this.Value = other.Value <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copy...
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<'V> * IDiGraph<'V, 'E> /// Adds a vertex to the graph using a data value and a vertex ID, and returns /// a reference to the added vertex. This function assumes that the vertex ID /// is unique in the graph, thus it needs to be used with caution. abstract AddVertex: data: 'V * vid: VertexID...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>IVertex<'V>> -> IDiGraphAccessible<'V, 'E> <|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
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 documen<|fim_suffix|>mit persons to whom the Software is furnished to do so, subject to t...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>all edges in the graph. abstract Edges: Edge<'V, 'E>[] /// Gets a collection of unreachable vertices in the graph. abstract Unreachables: IVertex<'V>[] /// Gets exactly one root vertex of this graph. If there are multiple root /// vertices, this will raise an exception. abstract SingleRoot: ...
fim
B2R2-org/B2R2
fsharp
<|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform <|fim_suffix|>, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notic...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>_.Value: 'V = v override _.ToString() = $"{v}" interface System.IEquatable<VertexData<'V>> with member this.Equals(other: VertexData<'V>) = this.Value = other.Value <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) SoftSec Lab. @ KAIST, since 2016 Permission is...
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|>HE 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 LIAB...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>m.Dominators edge.First with | ds when ds |> Seq.exists (fun v -> v = edge.Second) -> edge :: acc | _ -> acc), []) let private findNaturalLoopBody g (edge: Edge<_, _>) = let body = HashSet() let stack = Stack() let n, h = edge.First, edge.Second body.Add h |> ignore stack.Push n while...
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_suffix|> inherit DiGraph<'D, 'E>(core: GraphCore<'D, 'E, DiGraph<'D, 'E>>) member _.FindVertexByRange range = core.FindVertexBy(fun (v: Vertex<'D>) -> v.VData.AddrRange = range) [<RequireQualifiedAccess>] module RangedDiGraph = let private initializer core = RangedDiGraph<'D, 'E>(core) :> DiGraph<'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 withou<|fim_suffix|> permis...
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|>ring representations of vertices and edges as labels. static member ToJson g = Serializer.ToJson(Serializer.NewGraph g) /// <summary> /// Exports the given graph to a string in the JSON format. /// </summary> /// <param name="g">The graph to export.</param> /// <param name="vertexFn">Conv...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>adth-first traversal manner. let reverseFoldWithRoots (g: IDiGraphAccessible<_, _>) roots fn acc = let visited = HashSet<VertexID>() let queue = Queue<IVertex<_>>() let vertices = ResizeArray<IVertex<_>>() for r in roots do queue.Enqueue r visited.Add r.ID |> ignore while...
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|>getPostDominators dom g 8 Assert.AreEqual<Set<int>>(Set.ofList [ 8; 13 ], pds) let pds = getPostDominators dom g 9 Assert.AreEqual<Set<int>>(Set.ofList [ 9; 12; 13 ], pds) let pds = getPostDominators dom g 10 Assert.AreEqual<Set<int>>(Set.ofList [ 10; 12; 13 ], pds) let pds = getPo...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> vmap /// Arbitrarily generated example with isolated subgraphs. let digraph10 t = let g, vmap, addEdge = prepare 5 t let g = addEdge g 1 2 let g = addEdge g 2 3 let g = addEdge g 3 1 let g = addEdge g 4 5 let g = addEdge g 5 4 g, vmap /// Example taken from Dragon book (Fig. 9.38). Exits:...
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, <|fim_...
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, inc<|f...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>ap (fun v -> v.VData) let actual = g'.Vertices |> Array.map (fun v -> v.VData) CollectionAssert.AreEqual(expected, actual) <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) SoftSec Lab. @ KAIST, since 2016 Permission is hereby granted, free of charge, to any pers...
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|>IM, 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 SOFTWARE. *) namespace B2R2.MiddleEnd.ConcEval open B2R2 open B2R2.FrontEnd /// Represents a memory backed by binary fil...
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|>with | Some rid -> rid | None -> raise (InvalidOperationException "Frame pointer register is unavailable.") let getStackPointer () = let bv = getStackPointerRegister () |> getDefinedReg bv.ToUInt64() let setStackPointer addr = let sp = getStackPointerRegister () ...
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|>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 SOFTWARE. *) module internal B2R2.MiddleEnd.ConcEval.EvalUtils open B2R2 /// Raised when undefined expression is encountered. exception UndefEx...
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|>m: IMemory) = if i >= len then Ok acc else match mem.ByteRead(addr + i) with | Ok b -> readBE (b :: acc) len addr (i + 1UL) mem | Error e -> Error e /// Reads a bitvector value from the memory. let read addr endian typ mem = let len = RegType.toByteWidth typ |> uint64 ...
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|>Clear() = mem.Clear() <|fim_middle|>, to ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>n; st.NextStmt() |> Ok | IEMark(len, _) -> st.AdvancePC len; st.AbortInstr() |> Ok | LMark _ -> st.NextStmt() |> Ok | Put(lhs, rhs, _) -> evalPut st lhs rhs |> Result.map st.NextStmt | Store(e, addr, v, _) -> evalStore st e addr v |> Result.map st.NextStmt | Jmp(target, _) -> evalJmp st target ...
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 l...
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