| Module | Rex::Arch::X86 |
| In: |
lib/rex/arch/x86.rb
|
everything here is mostly stole from vlad‘s perl x86 stuff
| EAX | = | AL = AX = ES = 0 | Register number constants | |
| ECX | = | CL = CX = CS = 1 | ||
| EDX | = | DL = DX = SS = 2 | ||
| EBX | = | BL = BX = DS = 3 | ||
| ESP | = | AH = SP = FS = 4 | ||
| EBP | = | CH = BP = GS = 5 | ||
| ESI | = | DH = SI = 6 | ||
| EDI | = | BH = DI = 7 |
This method generates the opcodes equivalent to subtracting with a negative value from a given register.
This method returns the opcodes that compose a relative call instruction to the address specified.
This method generates an instruction that clears the supplied register in a manner that attempts to avoid bad characters, if supplied.
Generates a buffer that will copy memory immediately following the stub that is generated to be copied to the stack
This method returns an array containing a geteip stub, a register, and an offset This method will return nil if the getip generation fails
This method returns the opcodes that compose a short jump instruction to the supplied relative offset.
This method generates the opcodes that set the low byte of a given register to the supplied value.
This method generates the opcodes that set the a register to the supplied value.
This method generates the opcodes that set the low word of a given register to the supplied value.
This method is a general way of setting a register to a value. Depending on the value supplied, different sets of instructions may be used.
TODO: Make this moderatly intelligent so it chain instructions by itself
(ie. xor eax, eax + mov al, 4 + xchg ah, al)