Git Product home page Git Product logo

irasm's Introduction

irasm

Interactive Redundant Assembler (shell)

Description

The irasm shell takes an x86 (32-bit) assembly instruction as input, and gives the corresponding machine code as output.
The main distinction between this tool and something like nasm_shell, is that the output not only gives an official machine code output, but it also gives alternative machine-code, including some machine-code that no assembler would output (valid machine code)
Not every instruction format is supported. For those that aren't, this script gracefully falls back on using nasm to assemble some machine code
Some instruction formats that may never get support are ones with xmm registers and VEX prefixes

Supported Instruction Formats

Atomic (nop, ret, pause, etc...)
OP al, imm8 (xor al, 0x13)
OP ax, imm16 (xor ax, 0x1337)
OP eax, imm32 (xor eax, 0x13371337)
OP r/m8, imm8 (adc byte [eax + ebx + 0x1337], 66)
OP r/m16, imm8 (adc word [eax + ebx + 0x1337], 0x22)
OP r/m32, imm8 (adc dword [eax + ebx + 0x1337], 0x22)
OP r/m16, imm16 (adc word [eax + ebx + 0x1337], 0x4444)
OP r/m32, imm32 (adc dword [eax + ebx + 0x1337], 0x88888888)
OP r/m8, r8 (xor al, ah)
OP r/m16, r16 (xor ax, ax)
OP r/m32, r32 (xor eax, eax)
OP r8, r/m8 (xor al, ah)
OP r16, r/m16 (xor ax, ax)
OP r32, r/m32 (xor eax, eax)
OP rel8
OP rel16
OP rel32

Fully Supported Instructions

adc, aad, aam, aas, add, and, cbw, cmp cwde, clac, clc, cld, cli, clts, cmc, cmpsb, cmpsw, cmpsd, cpuid, cwd, cdq, daa, das, emms, f2xm1, fabs, faddp, fchs, fclex, fnclex, fcompp, fcos, fdecstp, fincstp, finit, fninit, fld1, fldl2t, fldl2e, fldpi, fldlg2, fldln2, fldz, fnop, fpatan, fprem, fprem1, fptan, frndint, fscale, fsin, fsincos, fsqrt, ftst, fucompp, fxam, fxtract, fyl2x, fyl2xp1, hlt, insb, insw, insd, into, invd, iretw, iretd, iret, lahf, leave, leavew, lfence, lock, lodsb, lodsw, lodsd, mfence, monitor, movsb, movsw, movsd, mwait, nop, or, outsb, outsw, outsd, pause, popaw, popad, popa, popfw, popfd, popf, pushaw, pushad, pusha, pushfw, pushfd, pushf, rdmsr, rdpmc, rdtsc, rdtscp, rsm, sbb, scasb, scasw, scasd, sfence, stac, stc, std, sti, stosb, stosw, stosd, sub, swapgs, syscall, sysenter, sysexit, sysret, test, ud2, fwait, wait, wbinvd, wrmsr, xgetbv, xlat, xor, xsetbv, and xtest

Partially Supported Instructions (only with the above instruction formats)

fcom, fcomp, fdivp, fdivrp, fmulp, fstsw ax, fnstsw ax, fsubp, fsubrp, fucom, fucomp, fxch, in, ret, retf, and sahf

Test Instructions

The below instructions are examples that can be used to test out the functionality of irasm:
aad
add eax, 0x00000022
adc byte [ebp + eax + 0x13371337], 88
mfence
cmp ax, 0x5555
and al, 0x66

irasm's People

Contributors

theweirddev avatar xlogicx avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.