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 fil<|fim_suffix|>and/or sell copies of the Software, and to permit persons ...
fim
B2R2-org/B2R2
fsharp
<|fim_prefix|>(* B2R2 - the Next-Generatio<|fim_suffix|> 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 OTHER...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>= 0x1B /// Runpath additions. | LC_RPATH = 0x8000001C /// Local of code signature. | LC_CODE_SIGNATURE = 0x1D /// Local of info to split segments | LC_SEGMENT_SPLIT_INFO = 0x1E /// Load and re-export dylib. | LC_REEXPORT_DYLIB = 0x8000001F /// Delay load of dylib until first use. | LC_...
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 obtain<|fim_suffix|>ENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER I...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>beginning of the data for this architecture. Offset: int /// Size of the object file in bytes. Size: int /// Alignment of the object file in bytes. Align: int } <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) SoftSec Lab. @ KAIST, since 2016 Permiss...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>NG FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *) namespace B2R2.FrontEnd.BinFile.Mach /// Represents the usage of the Mach-O file. type FileType = /// Intermediate object files. | MH_OBJECT = 0x1 /// Standard executable programs. | MH_EXECUT...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>pan) (reader: IBinReader) = reader.ReadInt32(span, 8) |> LanguagePrimitives.EnumOfValue let inline private readFileType (span: ByteSpan) (reader: IBinReader) = reader.ReadInt32(span, 12) |> LanguagePrimitives.EnumOfValue let inline private readFlags (span: ByteSpan) (reader: IBinReader) = ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> toolBox segCmds getNextStartAddr = segCmds |> Array.filter (fun seg -> seg.SegCmdName <> "__PAGEZERO") |> Array.sortBy (fun seg -> seg.VMAddr) |> Array.fold (fun (set, saddr) seg -> let n = getNextStartAddr seg addInvalidRange set saddr seg.VMAddr, n) (IntervalSet.empty, 0UL) |> 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_suffix|>UInt32(span, 40) NumModTab = reader.ReadUInt32(span, 44) ExtRefSymOff = reader.ReadUInt32(span, 48) NumExtRefSym = reader.ReadUInt32(span, 52) IndirectSymOff = reader.ReadUInt32(span, 56) NumIndirectSym = reader.ReadUInt32(span, 60) ExtRelOff = reader.ReadUInt32(span, 6...
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|> RelocSymbol = sym RelocLength = len RelocSection = sec IsPCRel = rel } let parse { Bytes = bytes; Reader = reader } secs = let numRelocs = countRelocs secs let relocs = Array.zeroCreate numRelocs let mutable i = 0 for sec in secs do let relOffset, relSize = int ...
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|>(_, _, s) -> Some s | _ -> None let extract cmds = Array.choose chooser cmds let buildMap segs = segs |> Array.fold (fun map s -> NoOverlapIntervalMap.addByBounds s.VMAddr (s.VMAddr + s.VMSize - 1UL) s map ) NoOverlapIntervalMap.empty let [<Literal>] Text = "__TEXT" <|fim_prefix|>(* B2R2 ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>ers. | N_PARAMS = 0x86 /// Compiler version. | N_VERSION = 0x88 /// Compiler optimization level. | N_OLEVEL = 0x8a /// Parameter. | N_PSYM = 0xa0 /// Include file end. | N_EINCL = 0xa2 /// Alternate entry. | N_ENTRY = 0xa4 /// Left bracket. | N_LBRAC = 0xc0 /// Deleted include ...
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<|fim_suffix|> to use, copy, modify, merge, publish, distribute, sublicense,...
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|>rtableExecutable 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<|fim_suffix|> |> buildExportTable bytes reader baseAddr secs range /// Represents the exported symbols in a P...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> (block.PageRVA + uint32 entry.Offset) = addr) ) let getImportTable pe = pe.ImportedSymbols |> Map.fold (fun acc addr info -> match info with | ByOrdinal(ord, dllname) -> { FuncName = $"[{ord.ToString()}]" LibraryName = dllname TrampolineAddress = 0UL ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>tAddressTableRVA: int /// Indicate whether this IDT is delay IDT or not. DelayLoad: bool } with /// Checks if the IDT entry is a null entry. static member inline IsNull(entry: IDTEntry) = entry.ImportLookupTableRVA = 0 && entry.ForwarderChain = 0 && entry.ImportDLLName = "" && ...
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_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|>IES 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 CONNECTION WITH THE SOFTWARE OR THE ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>RIGHT 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.FrontEnd.BinFile.PE open B2R2 /// Represents a storage of...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>ImportedSymbols /// Returns the exported symbols. member _.ExportedSymbols with get() = pe.ExportedSymbols member _.RawPDB with get() = rawpdb /// Finds the section index from the given RVA. member _.FindSectionIdxFromRVA rva = pe.FindSectionIdxFromRVA rva member _.HasCode(sec: SectionHead...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>eQualifiedAccess>] module Permission = /// <summary> /// Converts a <see cref='T:B2R2.FrontEnd.BinFile.Permission'/> into a string /// of the form "rwx", where each absent permission is shown as a dash, e.g., /// "r-x" for a readable and executable permission. /// </summary> [<CompiledName ("T...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>Type.TYPE_NONE -> PyNone, refs, offset | MarshalledType.TYPE_SMALL_TUPLE -> let size, offset = readInt bytes reader offset 1 let str = if size = 0 then "()" else Array.create size "<Null>" |> String.concat ", " let refs = appendRefs flag refs str if size <> 0 then let 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 o<|fim_suffix|>thon 3.12). /// </summary> type MarshalledType = | TYPE_NULL = 0x60 (* '0' *) | TYPE_NONE = 0x4E (* 'N' ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>his.IsValidRange range = (this :> IContentAddressable).IsValidAddr range.Min && (this :> IContentAddressable).IsValidAddr range.Max member this.IsAddrMappedToFile addr = (this :> IContentAddressable).IsValidAddr addr member this.IsRangeMappedToFile range = (this :> IConte...
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|> fi -> let ii = wm.IndexMap |> Array.find (fun ii -> ii.Kind = IndexKind.Function && ii.Index = fi) Some(uint64 ii.ElemOffset) | None -> None | None -> None let importToLinkageTableEntry (entry: Import) = { FuncName = entry.Name LibraryName = en...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>bs: byte[]) = let reader = BinReader.Init Endian.Little if Header.isWasm bs reader then () else raise InvalidFileFormatException parseWasmModule bs reader 0 |> buildModuleIndexMap <|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_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|>Feature () member _.TryFindSectionName(_: uint32): Result<string, ErrorCase> = Terminator.futureFeature () member _.GetFunctionAddresses() = Terminator.futureFeature () member _.HasRelocationInfo _addr = false member _.GetRelocatedAddr _relocAddr = Terminator.futureFeature () ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>4303C0UL "__fxstatat" [<TestMethod>] member _.``[ELF] aarch64_Stripped section header test (1)``() = assertExistenceOfSectionHeader aarch64SFile 0 "" [<TestMethod>] member _.``[ELF] aarch64_Stripped section header test (2)``() = assertExistenceOfSectionHeader aarch64SFile 26 ".shstrtab" ...
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|>ISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *) module B2R2.FrontEnd.BinFile.Tests.ZIPReader open System.IO open System.IO.Compression open B2R2.FrontEnd.BinFile open type FileFormat let private baseDir = System.AppDomain.CurrentDomain.BaseDire...
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
(* 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
<|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) SoftSec Lab. @ KAIST, since 2016 Permission is hereby granted, free of charge, to any per<|fim_suffix|>t, set /// Accumulates an AsmWord whose kind and value are given into the disassembly /// builder. abstract Accumulate: kind:...
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_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 ass<|fim_suffix|>nator. Note that this method /// takes the previous instruction as an argument, bec...
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|> abstract IsProgramCounter: RegisterID -> bool /// <summary> /// Checks if the given RegisterID represents a stack pointer. /// </summary> abstract IsStackPointer: RegisterID -> bool /// <summary> /// Checks if the given RegisterID represents a frame pointer. /// </summary> abstract IsF...
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|>ts /// <summary> /// Starts a new instruction located at the given address. This is used for /// the very first statement of an instruction to create an ISMark statement. /// </summary> member _.MarkStart(addr, insLen: uint32) = insAddress <- addr base.Add(AST.ismark insLen) /// <sum...
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 an<|fim_suffix|>THERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DE...
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|>3fuy |], 0x3fL) ([| 0x01uy |], 1L) ([| 0x00uy |], 0L) ([| 0x7fuy |], -1L) ([| 0x40uy |], -64L) ([| 0xbfuy; 0x7fuy |], -65L) ([| 0x9Buy; 0xF1uy; 0x59uy |], -624485L) ([| 0x80uy 0x80uy 0x80uy 0x80uy ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> varB := num 0u AST.lmark lblTarget varB := num 1u AST.lmark lblEnd ], [ varA := num 1u AST.cjmp (varA == varA) (AST.jmpDest lblTarget) (AST.jmpDest lblImpossible) AST.lmark lblImpossible varB := num 0u AST.lmark lblTarget varB ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>tor.futureFeature () member _.TranslateToList _ = Terminator.futureFeature () member _.Disasm _ = Terminator.futureFeature () member _.Disasm() = Terminator.futureFeature () member _.Decompose _ = Terminator.futureFeature () <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>or.futureFeature () member _.Parse(_: byte[], _: Addr): IInstruction = Terminator.futureFeature () member _.Parse(_: ByteSpan, _: Addr): IInstruction = Terminator.futureFeature () <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) SoftSec Lab. @ KAIST, ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>r = /// Program counter. | PC = 0x0 /// Stack pointer. | SP = 0x1 /// Provides several useful functions for handling CIL registers. [<RequireQualifiedAccess>] module Register = let inline ofRegID (n: RegisterID): Register = int n |> LanguagePrimitives.EnumOfValue let inline toRegID (reg:...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>ember _.StackPointer = Register.SP |> Register.toRegID |> Some member _.FramePointer = Terminator.futureFeature () member _.GetRegVar id = match Register.ofRegID id with | R.PC -> pc | R.SP -> sp | _ -> raise InvalidRegisterException member _.GetRegVar(_: string): Ex...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>te(AsmWordKind.Mnemonic, opcode) builder.Accumulate(AsmWordKind.String, " ") builder.Accumulate(AsmWordKind.Value, extra) let disasm (ins: Instruction) (builder: IDisasmBuilder) = builder.AccumulateAddrMarker ins.Address buildOpcode ins builder <|fim_prefix|>(* B2R2 - the Next-Generation Re...
fim
B2R2-org/B2R2
fsharp
<|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) SoftSe<|fim_suffix|>tNextInstrAddrs() = let fallthrough = this.Address + uint64 numBytes let acc = [| fallthrough |] if (this :> IInstruction).IsExit then [||] else acc member _.InterruptNum(_num: byref<int64>...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|> callExternFunc ins bld "staticcall" 6 true | INVALID -> sideEffects Terminate bld | SELFDESTRUCT -> callAndTerminate ins "selfdestruct" 1 bld let translate (ins: Instruction) bld = bld <!-- (ins.Address, ins.NumBytes) translateOpcode ins bld ins.Opcode bld --!> ins.NumBytes <|fim_prefix|>(* ...
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|> 1u) | 0xfeuy -> struct (INVALID, 0, 1u) | 0xffuy -> struct (SELFDESTRUCT, 5000, 1u) | _ -> raise ParsingFailureException let parseWith lifter opcode gas instrLen offset addr = Instruction(addr, instrLen, offset, opcode, gas, lifter) let parse lifter span offset addr = let struct (opcode, gas,...
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 d<|fim_suffix|></summary> type Register = /// Program counter. | PC = 0x1 /// Gas. ...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>n member _.GetRegisterID name = Register.ofString name |> Register.toRegID member _.GetRegisterIDAliases _ = Terminator.futureFeature () member _.GetRegisterName rid = Register.ofRegID rid |> Register.toString member _.GetAllRegisterNames() = [||] member _.GetRegType rid = Registe...
fim
B2R2-org/B2R2
fsharp
<|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) SoftSec Lab<|fim_suffix|>rontEnd.EVM open type Register [<TestClass>] type LifterTests() = let num (v: int) rt = BitVector(v, rt) |> AST.num let bigint (v: bigint) = BitVector(v, 256<rt>) |> AST.num let isa = ISA Architecture.EVM...
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|>nsOprToExpr64 bld false ins insLen src2 let src3 = transOprToExpr64 bld false ins insLen src3 let tmp = tmpVar bld 64<rt> bld <+ (tmp := AST.fmul dstA src3) bld <+ (dstA := AST.fadd tmp src2) fillZeroFromVLToMaxVL bld dst 128<rt> 512 bld --!> insLen let vfmadd213sd (ins: Instruction) insLen b...
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|>r).Stream member this.Disasm builder = lifter.Disasm(this, builder).ToString() member this.Disasm() = let builder = StringDisasmBuilder(false, null, wordSz) lifter.Disasm(this, builder).ToString() member this.Decompose builder = lifter.Disasm(this, builder).ToAsmWords() and int...
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|>CodeOp.TraceStart -> genDynamicFlagsUpdate bld regVar bld R.CF | ConditionCodeOp.EFlags -> regVar bld R.CF | _ -> Terminator.futureFeature () #endif <|fim_prefix|>(* B2R2 - the Next-Generation Reversing Platform Copyright (c) SoftSec Lab. @ KAIST, since 2016 Permission is hereby gr...
fim
B2R2-org/B2R2
fsharp
<|fim_suffix|>gisterID name = regFactory.GetRegisterID(name = name) member _.GetRegisterIDAliases id = regFactory.GetRegisterIDAliases id member _.GetRegisterName id = regFactory.GetRegisterName id member _.GetAllRegisterNames() = regFactory.GetAllRegisterNames() member _.GetRegType id = regFactory.GetR...
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