# Path: disassembler/formats/common/inst.py
# class CommonInstFormat:
#     def __init__(self, address, mnemonic, op_str, bytes, comment=None):
#         self.address = address
#         self.mnemonic = mnemonic
#         self.op_str = op_str
#         self.bytes = bytes
#         self.function = None
#         self.comment = comment
# 
#     def getByteString(self, num_bytes):
#         string_size = num_bytes*3
#         unpadded = str(self.bytes).encode("hex")[0:num_bytes*2]
#         return ' '.join([unpadded[x:x+2] for x in xrange(0, len(unpadded), 2)]).ljust(string_size)
# 
#     @staticmethod
#     def length(inst):
#         return 1
# 
#     @staticmethod
#     def toString(inst):
#         pass


from capstone import *
from disassembler.formats.common.inst import CommonInstFormat


prologues = {}
epilogues = {}
prologues[CS_ARCH_X86] = {
    CS_MODE_16 : [
        [CommonInstFormat(None, 'push', 'bp', ''), CommonInstFormat(None, 'mov', 'bp, sp', '')], # CDECL/STDCALL/FASTCALL
        [CommonInstFormat(None, 'push', 'bp', ''), CommonInstFormat(None, 'push', 'di', ''), CommonInstFormat(None, 'push', 'si', '')],
    ],
    CS_MODE_32 : [
        [CommonInstFormat(None, 'push', 'ebp', ''), CommonInstFormat(None, 'mov', 'ebp, esp', '')], # CDECL/STDCALL/FASTCALL
        [CommonInstFormat(None, 'push', 'ebp', ''), CommonInstFormat(None, 'push', 'edi', ''), CommonInstFormat(None, 'push', 'esi', '')],

    ],
    CS_MODE_64 : [
        [CommonInstFormat(None, 'push', 'rbp', ''), CommonInstFormat(None, 'mov', 'rbp, rsp', '')], # CDECL/STDCALL/FASTCALL

# Path: disassembler/formats/common/inst.py
# class CommonInstFormat:
#     def __init__(self, address, mnemonic, op_str, bytes, comment=None):
#         self.address = address
#         self.mnemonic = mnemonic
#         self.op_str = op_str
#         self.bytes = bytes
#         self.function = None
#         self.comment = comment
# 
#     def getByteString(self, num_bytes):
#         string_size = num_bytes*3
#         unpadded = str(self.bytes).encode("hex")[0:num_bytes*2]
#         return ' '.join([unpadded[x:x+2] for x in xrange(0, len(unpadded), 2)]).ljust(string_size)
# 
#     @staticmethod
#     def length(inst):
#         return 1
# 
#     @staticmethod
#     def toString(inst):
#         pass


# Path: disassembler/formats/helpers/asmfeatures.py
from capstone import *
from disassembler.formats.common.inst import CommonInstFormat


prologues = {}
epilogues = {}
prologues[CS_ARCH_X86] = {
    CS_MODE_16 : [
        [CommonInstFormat(None, 'push', 'bp', ''), CommonInstFormat(None, 'mov', 'bp, sp', '')], # CDECL/STDCALL/FASTCALL
        [CommonInstFormat(None, 'push', 'bp', ''), CommonInstFormat(None, 'push', 'di', ''), CommonInstFormat(None, 'push', 'si', '')],
    ],
    CS_MODE_32 : [
        [CommonInstFormat(None, 'push', 'ebp', ''), CommonInstFormat(None, 'mov', 'ebp, esp', '')], # CDECL/STDCALL/FASTCALL
        [CommonInstFormat(None, 'push', 'ebp', ''), CommonInstFormat(None, 'push', 'edi', ''), CommonInstFormat(None, 'push', 'esi', '')],

    ],
    CS_MODE_64 : [
        [CommonInstFormat(None, 'push', 'rbp', ''), CommonInstFormat(None, 'mov', 'rbp, rsp', '')], # CDECL/STDCALL/FASTCALL

        [CommonInstFormat(None, 'push', 'rbp', ''), CommonInstFormat(None, 'push', 'rdi', ''), CommonInstFormat(None, 'push', 'rsi', '')],
