All Projects → saeg → asm-defuse

saeg / asm-defuse

Licence: other
ASM powered by definitions/uses analysis

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to asm-defuse

FASM
Unofficial git history of flat assembler
Stars: ✭ 32 (+33.33%)
Mutual labels:  asm
objconv
Object file converter This utility can be used for converting object files between COFF/PE, OMF, ELF and Mach-O formats for all 32-bit and 64-bit x86 platforms. Can modify symbol names in object files. Can build, modify and convert function libraries across platforms. Can dump object files and executable files. Also includes a very good disassem…
Stars: ✭ 114 (+375%)
Mutual labels:  asm
LanOS
one mini operating system simplified from linux0.12
Stars: ✭ 61 (+154.17%)
Mutual labels:  asm
awesome-n64-development
A curated list of Nintendo 64 development resources including toolchains, documentation, emulators, example code, and more
Stars: ✭ 210 (+775%)
Mutual labels:  asm
OSRSUpdater
A simple (and outdated) Old-School RuneScape decompiler/deobfuscator. Performs field and method analysis which uses ASM and bytecode patterns for identification. Identified fields could be used for creating bot clients or QoL clients. For educational use only.
Stars: ✭ 13 (-45.83%)
Mutual labels:  asm
Corth
It's like Porth, but in C++. Yep, we're going full circle.
Stars: ✭ 17 (-29.17%)
Mutual labels:  asm
Etripator
A PC-Engine disassembler
Stars: ✭ 16 (-33.33%)
Mutual labels:  asm
Radical-OS
Radical kernel source tree
Stars: ✭ 45 (+87.5%)
Mutual labels:  asm
BSUIR-Labs
БГУИР 2019-2023 (КСиС, ВМСиС)
Stars: ✭ 20 (-16.67%)
Mutual labels:  asm
C-Experiments
Experiments on C/C++ Exploits
Stars: ✭ 19 (-20.83%)
Mutual labels:  asm
HIGH-TO-LOW
in this repository you will find codes in C and their equivalence in MIPS Assembly
Stars: ✭ 20 (-16.67%)
Mutual labels:  asm
Exploits
A personal collection of Windows CVE I have turned in to exploit source, as well as a collection of payloads I've written to be used in conjunction with these exploits.
Stars: ✭ 75 (+212.5%)
Mutual labels:  asm
gb-starter-kit
A customizable and ready-to-compile bundle for Game Boy RGBDS projects. Contains your bread and butter, guaranteed 100% kitchen sink-free.
Stars: ✭ 24 (+0%)
Mutual labels:  asm
f5-rest-client
F5 BIG-IP SDK for the Go programming language.
Stars: ✭ 49 (+104.17%)
Mutual labels:  asm
dxbc reader
easy to read hlsl asm shader code. parse dxbc text and export hlsl like for read
Stars: ✭ 194 (+708.33%)
Mutual labels:  asm
RuntimeTransformer
Library for easily modifying loaded classes at runtime
Stars: ✭ 34 (+41.67%)
Mutual labels:  asm
zx-spectrum-games
Collection of ZX Spectrum annotated game source code dissasemblies as .skool files
Stars: ✭ 35 (+45.83%)
Mutual labels:  asm
AOSV
Lecture notes for Advanced Operating Systems and Virtualization course at Sapienza University of Rome
Stars: ✭ 21 (-12.5%)
Mutual labels:  asm
Assembly-Lib
A 16-bits x86 DOS Assembly library that provides many useful functions for developing programs. It has both VGA grapics functions as well as general purpose utilities. The main purpose of this library was to be able to implement simple DOS games (in Assembly) using VGA (320x200, 256 colors) display.
Stars: ✭ 36 (+50%)
Mutual labels:  asm
first nes
Create your own games for the Nintendo Entertainment System! This "starter" game is easily extensible for your own projects. Includes references.
Stars: ✭ 94 (+291.67%)
Mutual labels:  asm

ASM-DefUse

ASM powered by definitions/uses analysis

Maven Central

ASM-DefUse extends ASM analysis API with control- and data-flow algorithms for definition/uses analysis.

Requirements

  • Java 6

Setup

If you're using Maven just add this new dependency:

<dependency>
    <groupId>br.usp.each.saeg</groupId>
    <artifactId>asm-defuse</artifactId>
    <version>${asm-defuse.version}</version>
</dependency>

Control-flow analysis

The following code exemplify how to use FlowAnalyzer class

MethodNode mn = ... // A regular MethodNode from ASM tree API
FlowAnalyzer<BasicValue> analyzer = new FlowAnalyzer<BasicValue>(new BasicInterpreter());
analyzer.analyze("package/ClassName", mn);

int[][] successors = analyzer.getSuccessors();
int[][] predecessors = analyzer.getPredecessors();
int[][] basicBlocks = analyzer.getBasicBlocks();
int[] leaders = analyzer.getLeaders();

for (int i = 0; i < mn.instructions.size(); i++) {
  // successors[i] array contains the indexes of the successors of instruction i
  System.out.println("Instruction " + i + " has " + successors[i].length + " successors");

  // predecessors[i] array contains the indexes of the predecessors of instruction i
  System.out.println("Instruction " + i + " has " + predecessors[i].length + " predecessors");

  System.out.println("Instruction " + i + " belongs to basic block " + leaders[i]);
}
for (int i = 0; i < basicBlocks.length; i++) {
  System.out.println("Basic block " + i + " contains " + basicBlocks[i].length + " instructions");
}

Data-flow analysis

The following code exemplify how to use DefUseAnalyzer class

MethodNode mn = ... // A regular MethodNode from ASM tree API
DefUseAnalyzer analyzer = new DefUseAnalyzer();
analyzer.analyze("package/ClassName", mn);

Variable[] variables = analyzer.getVariables();
DefUseFrame[] frames = analyzer.getDefUseFrames();

System.out.println("This method contains " + variables.length + " variables");
for (int i = 0; i < mn.instructions.size(); i++) {
  System.out.println("Instruction " + i + " contains definitions of " + frames[i].getDefinitions());
  System.out.println("Instruction " + i + " contains usage of " + frames[i].getUses());
}

Definition-Use Chain

The following code exemplify how to compute DefUseChain

MethodNode mn = ... // A regular MethodNode from ASM tree API
DefUseInterpreter interpreter = new DefUseInterpreter();
FlowAnalyzer<Value> flowAnalyzer = new FlowAnalyzer<Value>(interpreter);
DefUseAnalyzer analyzer = new DefUseAnalyzer(flowAnalyzer, interpreter);
analyzer.analyze("package/ClassName", mn);

Variable[] variables = analyzer.getVariables();
DefUseChain[] chains = new DepthFirstDefUseChainSearch().search(
    analyzer.getDefUseFrames(),
    analyzer.getVariables(),
    flowAnalyzer.getSuccessors(),
    flowAnalyzer.getPredecessors());

System.out.println("This method contains " + chains.length + " Definition-Use Chains");
for (int i = 0; i < chains.length; i++) {
  DefUseChain chain = chains[i];
  System.out.println("Instruction " + chain.def + " define variable " + variables[chain.var]);
  System.out.println("Instruction " + chain.use + " uses variable " + variables[chain.var]);
  // There is a path between chain.def and chain.use that not redefine chain.var
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].