Class: Relyze::ExecutableFileModel::Reference

Inherits:
Object
  • Object
show all
Defined in:
C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb

Instance Method Summary collapse

Instance Method Details

#control_flow?true, false

Check if this reference implies potential control flow from the owner block to the target block.

Returns:

  • (true, false)


1271
1272
1273
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 1271

def control_flow?
    return false
end

#control_flow_conditionSymbol, NilClass

If this reference is for control flow, check if this control flow reference is based on a true, false or unconditional condition.

Returns:

  • (Symbol, NilClass)

    Either :true, :false, :unconditional or nil if no condition specified.



1279
1280
1281
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 1279

def control_flow_condition
    return nil
end

#explicit?true, false

Check if this reference is an explicit reference. An example of an explicit reference is one which is defined explicitly in an Instruction encoding, such as an operand which points to a location in memory.

Returns:

  • (true, false)


1254
1255
1256
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 1254

def explicit?
    return false
end

#implicit?true, false

Check if this reference is an implicit reference. An example of an implicit reference is one which has been defined through the result of analysis, such as jump table analysis.

Returns:

  • (true, false)


1263
1264
1265
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 1263

def implicit?
    return false
end

#ownerRelyze::ExecutableFileModel::BasicBlock?

Get the owner block where this reference is from.

Returns:



1231
1232
1233
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 1231

def owner
    return nil
end

#owner_rvaInteger

Get the RVA location where this reference is from in the owner block.

Returns:

  • (Integer)

    An RVA location in the owner block



1217
1218
1219
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 1217

def owner_rva
    return nil
end

#stack?true, false

Check if this reference is to a block on a stack segment.

Returns:

  • (true, false)


1286
1287
1288
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 1286

def stack?
    return false
end

#targetRelyze::ExecutableFileModel::BasicBlock?

Get the target block where this reference is to.

Returns:



1238
1239
1240
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 1238

def target
    return nil
end

#target_rvaInteger

Get the RVA location where this reference is to in the target block.

Returns:

  • (Integer)

    An RVA location in the target block



1224
1225
1226
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 1224

def target_rva
    return nil
end

#to_sString

Get a simple description of this reference.

Returns:

  • (String)

    This references description.



1245
1246
1247
# File 'C:/Program Files/Relyze/lib/relyze/core/executable_file_model.rb', line 1245

def to_s
    return "Reference: %s -> %s" % [ ( owner ? owner.name( owner_rva ) : owner_rva.to_s(16) ), ( target ? target.name( target_rva ) : target_rva.to_s(16) ) ]
end