Package Libs :: Module immvcglib
[hide private]
[frames] | no frames]

Module immvcglib

source code

Reads vcg buffer and creates the graph using Immunity Debugger lib

(c) Immunity, Inc. 2004-2007

Immunity Inc.

Classes [hide private]
  graphTree
  ParseVCGList
recursive VCG parser
Functions [hide private]
 
testVCGParse(path)
test our new VCG parsing logic
source code
 
generateGraphFromBuf(buf) source code
 
generateGraph(address)
generates a VCG given a function address
source code
 
adjustStartCoords(vertices, G) source code
 
createVertexList(nodes, handler)
iterate vcg file to get vertex list and vertices's buffers
source code
 
finalAttemptToPlace(vertices) source code
 
searchForDummyPathsH2South(edgelist, vertices) source code
 
searchForDummyPathsH2North(edgelist, vertices) source code
 
applyDummyPathsH2SouthTrue(vertexlist, edgelist) source code
 
applyDummyPathsH2South(vertexlist, edgelist) source code
 
applyDummyPathsH2North2(vertexlist, edgelist) source code
 
applyDummyPathsH2North(vertexlist, edgelist) source code
 
searchForDummyPathsW(edgelist, vertices) source code
 
pathFinder(vertices)
find edge's path To find an endge path we start joining two vertex with 3 basic strokes, A -> B -> C after placing each of this basci strokes we check if it is not overlapping a vertex, if so we decide a alternate path based on dummy blank points A -> A' -> A'' -> B -> C where A' (x2,y2) is the original A (x2,y2) so the next basic stroke B, knows how to keep going
source code
 
addEndPointToEdge(edgelist) source code
 
drawVertices(vertices) source code
 
drawEdges(edgelist, handler) source code
 
createAdjacencyList(G, vertices, edges)
creates a directed adjacency list for every vertex
source code
 
checkPlanarity(vertices) source code
 
firstAttemptToPlace(vertices)
First attempt to place vertices We are going to suppose Graph is planar and attempt to place vertices directly, in real world this wont happens, but at least we'll have temptative coords for every vertex
source code
 
checkForPlacedVertex(vertex2check, vertices)
Note: needs to divide graph in layers
source code
 
checkForPlacedVertex2(vertex2check, vertices)
Note: needs to divide graph in layers
source code
 
defineVertexRelation(vertices) source code
 
generateVCG(address)
this function will generate a vcg compatible buffer to create the graph
source code
 
saveVCG(address, filename) source code
Variables [hide private]
  __VERSION__ = '1.2'
NOTES: need to divide graph in layers save max layer in graph every set of childs [unique and different part vertex] E a different layer save vertex of layer in each layer mark blank path points in each layer [i preffer path points to dummy vertices]
  PALETTE = []
Function Details [hide private]

checkForPlacedVertex(vertex2check, vertices)

source code 

Note: needs to divide graph in layers

Draft notes: step 1 get temptative coords to place vertex step 2 check if coords overlaps already placed vertex

step 2 a) first we have to check if (y,y2) of vertex is in range of the placed vertex,

if y >= yp and y <= y2p or y2 >= yp and y2 <= y2p:

if that condition is true, means we have a vertex in the same y that an already placed vertex, so it might be possible of an overlapping to exists, so we are going to ask:

if x >= xp and x <= x2p: if that condition is true, then we have an overlapping over the y coord of the vertex (left point)

if x2 >= xp and x <= x2p: if that condition is true, then we have an overlapping over the y coord of the vertex (right point)

and if does, check whether x or x2 is overlapping once we know that, we need to check wheter x or x2 of overlapped vertex is touched if x , move west x - 10 and recheck

checkForPlacedVertex2(vertex2check, vertices)

source code 

Note: needs to divide graph in layers

Draft notes: step 1 get temptative coords to place vertex step 2 check if coords overlaps already placed vertex

step 2 a) first we have to check if (y,y2) of vertex is in range of the placed vertex,

if y >= yp and y <= y2p or y2 >= yp and y2 <= y2p:

if that condition is true, means we have a vertex in the same y that an already placed vertex, so it might be possible of an overlapping to exists, so we are going to ask:

if x >= xp and x <= x2p: if that condition is true, then we have an overlapping over the y coord of the vertex (left point)

if x2 >= xp and x <= x2p: if that condition is true, then we have an overlapping over the y coord of the vertex (right point)

and if does, check whether x or x2 is overlapping once we know that, we need to check wheter x or x2 of overlapped vertex is touched if x , move west x - 10 and recheck


Variables Details [hide private]

__VERSION__


NOTES:
need to divide graph in layers
save max layer in graph
every set of childs [unique and different part vertex] E a different layer
save vertex of layer in each layer
mark blank path points in each layer [i preffer path points to dummy vertices] 

for layer in layers:
   move east and west vertices, depending on their type *

pathfinder(graph)
  search empy spots where edge lines might travel
  
  
a cool thing might be mark the whole graph as east-slanted or west-slanted, according the graph
the n east or n west it will move

if the graph is slanting too much to east from center point, we can start thinking on going west
that can be too fuzzy, but will try to make an aproach for human eye


new lib against old lib:
orphan vertices from old lib has been solved, now every vertex has at least 1 relationship saved 
parent<->child type of vertex are correctly relationed now

Value:
'1.2'