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|>Seps = (pchar ',' >>. whitespace) <|> whitespace1 let betweenParen s = s |> skipWhitespaces |> between (pchar '(') (pchar ')') let alphanumericWithUnderscore s = Char.IsLetterOrDigit s || s = '_' let pId = many1Satisfy alphanumericWithUnderscore let pLabelDef = pId .>>? pchar ':' >>= addLabeld...
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|> is the second pass. UpdateInstructions replaces every occurance of /// Labels coming as operands by their relative address values. let updateInstructions (insList: AsmInsInfo list) labelToAddress = let rec doUpdate inss mapping result = match inss with | [] -> List.rev result | hd :: tail -...
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|>"+" -> BinOpType.ADD | "-" -> BinOpType.SUB | "*" -> BinOpType.MUL | "/" -> BinOpType.DIV | "?/" -> BinOpType.SDIV | "%" -> BinOpType.MOD | "?%" -> BinOpType.SMOD | "<<" -> BinOpType.SHL | ">>" -> BinOpType.SHR | "?>>" -> BinOpType.SAR | "&" -> BinOpType.AND | "...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>0 for 64-bit integers. | FtoITrunc = 7 /// Float-to-float conversion between different precisions. | FloatCast = 8 /// Float-to-float conversion while rounding to the nearest integer. Ties to /// even. | FtoFRound = 9 /// Float-to-float conversion while rounding toward +inf. E.g., 23.2 -> 24...
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 <|fim_suffix|>laceholder values. The /// AST constructor assigns the actual ID and hash before using it. /// </summary> new() = HashConsingInfo(0u, 0) /// Unique ID of the hash-consed object. member _.ID with get(): uint32 = id and...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> special cases such as when representing a delay slot of MIPS, /// and should never be used in other cases. | NotAJmp = 32 /// <summary> /// Provides functions to access <see cref='T:B2R2.BinIR.InterJmpKind'/>. /// </summary> [<RequireQualifiedAccess>] module InterJmpKind = /// <summary> /// Ret...
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_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|> | BinOp(_, _, e1, e2, _) | RelOp(_, e1, e2, _) -> let reads, writes = collectReadsFromExpr ctx reads writes e1 collectReadsFromExpr ctx reads writes e2 | Load(_, _, addrExpr, _) -> let reads, writes = collectReadsFromExpr ctx reads writes addrExpr match evalAddr ctx ad...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> * (19 * e.Hash + 1) + 6 static member inline HashCJmp(cond: Expr, t: Expr, f: Expr) = 19 * (19 * (19 * cond.Hash + t.Hash) + f.Hash) + 7 static member inline HashInterJmp(e: Expr, k: InterJmpKind) = 19 * (19 * e.Hash + int k) + 8 static member inline HashInterCJmp(cond: Expr, t: Expr, f:...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>SignExt, t, e, _) | Cast(CastKind.ZeroExt, t, e, _) -> expr e && t >= Expr.typeOf e | Extract(e, t, p, _) -> expr e && ((t + LanguagePrimitives.Int32WithMeasure p) <= Expr.typeOf e) | _ -> true /// Type-checks a LowUIR statement. let stmt s = match s with | Put(v, e, _) -> (Expr.typeOf 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"), to deal in the Software without restriction, includ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>an SSA expression, return a well-formated string. /// </summary> /// <param name="ssaExpr">SSA expression.</param> static member inline ToString(ssaExpr: SSA.Expr) = SSA.Expr.toString ssaExpr <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) SoftSec Lab. @ KAIST, ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>pe.SLT -> "?<" | RelOpType.SLE -> "?<=" | RelOpType.FEQ -> "=." | RelOpType.FNEQ -> "!=." | RelOpType.FGT -> ">." | RelOpType.FGE -> ">=." | RelOpType.FLT -> "<." | RelOpType.FLE -> "<=." | _ -> raise IllegalASTTypeException /// <summary> /// Retrieves the relational o...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> | LowUIR.Var(ty, r, n, _) -> { Kind = RegVar(ty, r, n); Identifier = -1 } | LowUIR.PCVar(ty, _, _) -> { Kind = PCVar(ty); Identifier = -1 } | LowUIR.TempVar(ty, n, _) -> { Kind = TempVar(ty, n); Identifier = -1 } | _ -> raise InvalidExprException let private translateLabel addr = function | LowU...
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|> 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.BinIR.SSA open B2R2 /// SSA statement post-processor. type IStmtPostProce...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>String("InVars", inVars, sb) | SideEffect eff -> sb.Append("SideEffect " + SideEffect.toString eff) |> ignore /// Pretty-prints an SSA statement to a string. override this.ToString() = let sb = StringBuilder() Stmt.AppendToString(this, sb) sb.ToString() /// Represents a jump ki...
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 a<|fim_suffix|>hom the Software is furnished to do so, subject to the following conditions: The a...
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<|fim_suffix|>statements that need to be evaluated atomically. | Lock /// Release the lo...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> | "sqrt" -> UnOpType.FSQRT | "cos" -> UnOpType.FCOS | "sin" -> UnOpType.FSIN | "tan" -> UnOpType.FTAN | "atan" -> UnOpType.FATAN | _ -> raise IllegalASTTypeException <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) SoftSec Lab. @ KAIST, since 2016 ...
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|>FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *) namespace B2R2.BinIR.Tests open Microsoft.VisualStudio.TestTools.UnitTesting open B2R2 open B2R2.BinIR open B2R2.BinIR.LowUIR [<TestClass>] type ParserTests() = let regNameAccessor = { new IRegist...
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|> Addr) = this.Min <= addr && addr <= this.Max override this.ToString() = $"{this.Min:x} -- {this.Max:x}" /// <summary> /// Provides a useful set of functions for handling <see /// cref='T:B2R2.AddrRange'/> values. /// </summary> [<RequireQualifiedAccess>] module AddrRange = /// <summary> ///...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> -> unit) = member _.Reply(reply: 'Reply) = replyf reply /// Interface for receiving agent messages. and IAgentMessageReceivable<'Msg> = /// Receives a message from the agent. abstract Receive: unit -> 'Msg /// Notifies the agent that no more messages will be sent. abstract Complete: unit -> u...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> /// SPARC. | SPARC = 6 /// IBM System/390. | S390 = 7 /// SuperH (SH-4). | SH4 = 8 /// PA-RISC. | PARISC = 9 /// Atmel AVR 8-bit microcontroller. | AVR = 20 /// TMS320C64x, TMS320C67x, etc. | TMS320C6000 = 21 /// EVM. | EVM = 30 /// Python bytecode. | Python = 31 /// WASM....
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|>en) | _ -> raise InvalidRegTypeException member this.FCast targetLen = match len, targetLen with | 80<rt>, 32<rt> -> let f32 = this.Value |> toBigFloat |> float32 BitVectorSmall(BitConverter.SingleToInt32Bits f32 |> uint64, 32<rt>) | 80<rt>, 64<rt...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>f a byte is null. [<CompiledName "IsNull">] let isNull b = b = 0uy /// Check if a byte is printable. [<CompiledName "IsPrintable">] let isPrintable b = b >= 33uy && b <= 126uy /// Check if a byte is a whitespace. [<CompiledName "IsWhitespace">] let isWhitespace b = b = 32uy || (b >= 9uy && b <= 13uy) /...
fim
B2R2-org/B2R2
fsharp
<|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform C<|fim_suffix|>tractCString (bytes: ByteArray) offset = if bytes.Length <= offset then "" else extractCStringFromSpanAux (ReadOnlySpan bytes) (StringBuilder()) offset /// Extracts a C-string (string that ends with a NULL char) from a /// R...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> let pattern = [| AnyByte; OneByte 0xFF |] /// </code> /// </example> /// </summary> type BytePattern = ByteValue[] /// <summary> /// Represents a single byte value in a BytePattern. It can be either AnyByte, /// which matches any byte, or OneByte, which matches a specific byte value. /// </summary> an...
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_suffix|> match digit with | One(a) -> [], a, [] | Two(a, b) -> let i' = i ++ calib a if pred i' then [], a, [ b ] else [ a ], b, [] | Three(a, b, c) -> let i' = i ++ calib a if pred i' then [], a, [ b; c ] else let i'' = i' ++ calib b if pred i'' then [ a ], b,...
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 = Op.Split((fun (e: InterMonoid<Addr>) -> Key i.Min <= e.Min), s) let rec containLoop r = match Op.ViewL r with | Nil -> false | Cons(x: IntervalSetElem, _) when x.Min = i.Min && x.Max = i.Max -> true | Cons(x, xs) -> if i.Min = x.Min then containLoop xs ...
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 N<|fim_suffix|>OverlapException ins tree |> toBlack [<CompiledName("Add")>] let add k v tree = fnAdd k v tree false [<CompiledName("AddByBounds")>] let addByBounds min max v tree = add (AddrRange.create min max) v tree [<CompiledName("Replace")>] let replace k v ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> /// The value associated with the given address. /// </returns> [<CompiledName("TryFindByAddr")>] val tryFindByAddr: addr: Addr -> tree: NoOverlapIntervalMap<'V> -> 'V option /// <summary> /// Returns the number of bindings in the interval map. /// </summary> /// <param...
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|>ryFindIndexBack pred tl /// Concatenates two queues. [<CompiledName ("Concat")>] let concat (RandomAccessQueue q1) (RandomAccessQueue q2) = Op.Concat(q1, q2) |> RandomAccessQueue /// Converts the queue to a list. [<CompiledName ("ToList")>] let toList (RandomAccessQueue q) = foldr (f...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>et idx (arr[bucket] &&& (1L <<< offset)) <> 0L /// Checks if the set is empty. member _.IsEmpty() = arr |> Array.forall (fun x -> x = 0L) /// Clears the set. member _.Clear() = Array.Clear arr /// Iterates over the set and applies the given function to each element. member _.Ite...
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|>hall be included in all copies or substantial portions of the Software. 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 ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> buckets.Clear() Volatile.Write(&entries, 0) Volatile.Write(&nextCleanup, cleanupThreshold) finally tableLock.ExitWriteLock() <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) SoftSec Lab. @ KAIST, since 2016 Permission is hereby granted, free ...
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
<|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|>copies or substantial portions of the Software. 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 HOLD...
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|>egister names used in the current architecture. /// </summary> /// <returns> /// An array of all register name strings defined in the architecture. /// </returns> abstract GetAllRegisterNames: unit -> string[] <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) Soft...
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|> /// Decodes a LEB128-encoded unsigned integer into uint32. Returns a tuple of /// (the decoded value, the number of bytes consumed). [<CompiledName "DecodeUInt32">] let decodeUInt32 span = decode span uint32 Max32 /// Decodes a LEB128-encoded unsigned integer into uint32 from a byte array. /// Returns ...
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|>_.SetLogLevel(lvl) = myLevel <- lvl <|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_suffix|> name="bytes">The byte array to render.</param> /// <returns> /// One <see cref="OutString"/> per rendered line. Each element is either /// colored or plain depending on <paramref name="useColor"/>. /// </returns> let makeLines bytesPerLine wordSize useColor addr bytes = if bytesPerLine <= 0...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>Printer, css: ColoredString[]) = pr.PrintRow css /// Prints out the given OutString array as a table row. static member (<=/) (pr: IPrinter, oss: OutString[]) = pr.PrintRow oss /// Prints out the given string as an error message. static member (<=?) (pr: IPrinter, s: string) = pr.Pri...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>ber SetLogLevel(level: LogLevel) = out.SetLogLevel(level)<|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 fi...
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. @ K<|fim_suffix|>d width -> if isLast then cs else cs.PadRight width /// Pads the given OutString according to the column format. member this.Pad(os: OutString, isLast) = match this with | RightAligned width -> 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|>ILITY, 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 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 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
<|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 (<|fim_suffix|> Represents an output string generated from rear-end app...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>aller vertex, not the call site address. This is particularly useful /// to represent CPS patterns present in EVM binaries. | ChainedCallSite of history: CallSite * caller: Addr with /// Returns the address of the leaf call site. member this.CallSiteAddress with get(): Addr = match this with ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>e. /// </returns> [<CompiledName "ToBitWidth">] let toBitWidth (t: RegType) = #if DEBUG checkIfValidRegType t #endif int t /// <summary> /// Gets a byte width from a RegType. /// </summary> /// <param name="t">RegType.</param> /// <returns> /// A byte width in integer of the giv...
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|>ps a string with a pair of angle brackets. [<CompiledName "WrapAngleBracket">] let wrapAngleBracket s = "<" + s + ">" <|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 obtainin...
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|>RegType">] let toRegType = function | WordSize.Bit8 -> 8<rt> | WordSize.Bit16 -> 16<rt> | WordSize.Bit32 -> 32<rt> | WordSize.Bit64 -> 64<rt> | WordSize.Bit128 -> 128<rt> | WordSize.Bit256 -> 256<rt> | _ -> raise InvalidWordSizeException /// <summary> /// Converts a word...
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|>.AreEqual(expectation, newArray) [<TestMethod>] member _.``CString Extraction Test``() = let arr = [| 0x68uy 0x65uy 0x6cuy 0x6cuy 0x6fuy 0x00uy (* NULL character *) 0x68uy 0x65uy 0x6cuy 0x6cuy 0x6fuy |...
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
<|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|> PersistentQueue.empty |> PersistentQueue.enqueue 1 |> PersistentQueue.enqueue 2 |> PersistentQueue.filter (fun _ -> false) Assert.AreEqual<bool>(true, PersistentQueue.isEmpty q) <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) SoftSec Lab. @ KAIS...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>sert.AreEqual<int>(2, s.BucketCount) [<TestMethod>] member _.``Add Test 1``() = let s = RegisterSet(65) let lst = List<int>() s.Add 0 s.Add 8 s.Add 42 s.Add 64 s.Iterate(lst.Add >> ignore) CollectionAssert.AreEqual([| 0; 8; 42; 64 |], lst) [<TestMethod>] 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-Gener<|fim_suffix|>nicalValue``() = let table = makeTable 16 let item1 = WeakBucketTableItem(1, "first") let item2 = WeakBucketTableItem(1, "second") let interned1 = table.Intern(item1, 1) let interned2 = table.Intern(item2, 1) Assert.AreEqual<bool>(true, Objec...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> let bs = readBytes ptr size readIntBySize size (ReadOnlySpan bs) member this.ReadInt(addr: Addr, size) = let ptr = binFile.GetBoundedPointer addr this.ReadInt(ptr, size) member _.TryReadUInt(ptr: BinFilePointer, size) = match tryReadBytes ptr size with | Ok bs -> tryReadUInt...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> Return the byte array if succeed. Otherwise, raise an exception. /// </returns> member ReadBytes: addr: Addr * nBytes: int -> byte[] /// <summary> /// Return the corresponding integer of the size from the given address. /// </summary> /// <param name="addr">The address.</param> /// <param ...
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|>) /// Returns the exception handler mapping. member _.ExceptionMap with get() = exnTbl /// Returns an array of function entry points identified by the exception /// table. member _.FunctionEntryPoints with get() = fnRanges.Keys |> Seq.toArray /// Returns the coverage of the exception table,...
fim
B2R2-org/B2R2
fsharp