Header menu logo B2R2

BinFilePointer Type

Represents a pointer to binary, which is used to exclusively point to a region of a binary that is (1) mapped to both VM and file, (2) mapped to VM only, or (3) mapped to file only. For the other cases, the pointer is considered invalid (null). The pointer internally holds inclusive ranges of the virtual addresses and the file offsets.

Record fields

Record Field Description

Addr

Full Usage: Addr

Field type: Addr

Virtual address.

Field type: Addr

MaxAddr

Full Usage: MaxAddr

Field type: Addr

Max virtual address.

Field type: Addr

MaxOffset

Full Usage: MaxOffset

Field type: int

Max offset that this pointer can point to.

Field type: int

Offset

Full Usage: Offset

Field type: int

File offset.

Field type: int

Constructors

Constructor Description

BinFilePointer(addr, maxAddr, offset, maxOffset)

Full Usage: BinFilePointer(addr, maxAddr, offset, maxOffset)

Parameters:
    addr : Addr
    maxAddr : Addr
    offset : int
    maxOffset : int

Returns: BinFilePointer

Initializer

addr : Addr
maxAddr : Addr
offset : int
maxOffset : int
Returns: BinFilePointer

Instance members

Instance member Description

this.Advance

Full Usage: this.Advance

Parameters:
    amount : uint32

Returns: BinFilePointer
Modifiers: inline

Advances the pointer by a given amount.

amount : uint32
Returns: BinFilePointer

this.Advance

Full Usage: this.Advance

Parameters:
    amount : int

Returns: BinFilePointer
Modifiers: inline

Advances the pointer by a given amount.

amount : int
Returns: BinFilePointer

this.CanRead

Full Usage: this.CanRead

Parameters:
    size : int

Returns: bool
Modifiers: inline

Checks if the pointer can read the given size of bytes.

size : int
Returns: bool

this.IsNull

Full Usage: this.IsNull

Returns: bool
Modifiers: inline

Checks if the pointer is null.

Returns: bool

this.IsValid

Full Usage: this.IsValid

Returns: bool
Modifiers: inline

Checks if the pointer is valid.

Returns: bool

this.IsVirtual

Full Usage: this.IsVirtual

Returns: bool
Modifiers: inline

Checks if the pointer is virtual, meaning that it currently points to a region that is mapped to VM but not to the file.

Returns: bool

this.ReadableAmount

Full Usage: this.ReadableAmount

Returns: int
Modifiers: inline

Returns the amount of bytes that can be read from the pointer.

Returns: int

Static members

Static member Description

BinFilePointer.Advance(p, amount)

Full Usage: BinFilePointer.Advance(p, amount)

Parameters:
Returns: BinFilePointer

Advances the pointer by a given amount.

p : BinFilePointer
amount : int
Returns: BinFilePointer

BinFilePointer.Null

Full Usage: BinFilePointer.Null

Returns: BinFilePointer

Returns a null pointer.

Returns: BinFilePointer

Type something to start searching.