using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
//メモリイメージ
byte[] Mem;
//レジスタイメージ
uint Eax = 0;
uint Ebx = 0;
uint Ecx = 0;
uint Edx = 0;
uint Esp = 0;
uint Ebp = 0;
uint Esi = 0;
uint Edi = 0;
uint Eip = 0;
private void Form1_Load(object sender, EventArgs e)
{
Mem = new byte[1 * 1024 * 1024 * 1024];
//
//Memへコードセットする(省略)
//
while(true)
{
//8086 ope code
//http://w...content-available-to-author-only...e.net/8086/8086_table.txt
switch (Mem[Eip])
{
//ADD Eb,Gb
case 0x00:
Eip++;
break;
//
//中略
//
//CALL
case 0x9A:
//ここでジャンプ先がwindowsAPIかどうか判断
break;
//CALL
case 0xE8:
//ここでジャンプ先がwindowsAPIかどうか判断
break;
//
//中略
//
//GRP5 Ev
case 0xFF:
break;
}
}
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYzsKdXNpbmcgU3lzdGVtLkNvbXBvbmVudE1vZGVsOwp1c2luZyBTeXN0ZW0uRGF0YTsKdXNpbmcgU3lzdGVtLkRyYXdpbmc7CnVzaW5nIFN5c3RlbS5MaW5xOwp1c2luZyBTeXN0ZW0uVGV4dDsKdXNpbmcgU3lzdGVtLldpbmRvd3MuRm9ybXM7CgpuYW1lc3BhY2UgV2luZG93c0Zvcm1zQXBwbGljYXRpb24xCnsKICAgIHB1YmxpYyBwYXJ0aWFsIGNsYXNzIEZvcm0xIDogRm9ybQogICAgewogICAgICAgIHB1YmxpYyBGb3JtMSgpCiAgICAgICAgewogICAgICAgICAgICBJbml0aWFsaXplQ29tcG9uZW50KCk7CiAgICAgICAgfQogICAgICAgIC8v44Oh44Oi44Oq44Kk44Oh44O844K4CiAgICAgICAgYnl0ZVtdIE1lbTsKICAgICAgICAvL+ODrOOCuOOCueOCv+OCpOODoeODvOOCuAogICAgICAgIHVpbnQgRWF4ID0gMDsKICAgICAgICB1aW50IEVieCA9IDA7CiAgICAgICAgdWludCBFY3ggPSAwOwogICAgICAgIHVpbnQgRWR4ID0gMDsKICAgICAgICB1aW50IEVzcCA9IDA7CiAgICAgICAgdWludCBFYnAgPSAwOwogICAgICAgIHVpbnQgRXNpID0gMDsKICAgICAgICB1aW50IEVkaSA9IDA7CiAgICAgICAgdWludCBFaXAgPSAwOwogICAgICAgIHByaXZhdGUgdm9pZCBGb3JtMV9Mb2FkKG9iamVjdCBzZW5kZXIsIEV2ZW50QXJncyBlKQogICAgICAgIHsKCiAgICAgICAgICAgIE1lbSA9IG5ldyBieXRlWzEgKiAxMDI0ICogMTAyNCAqIDEwMjRdOwogICAgICAgICAgICAKICAgICAgICAgICAgLy8KICAgICAgICAgICAgLy9NZW3jgbjjgrPjg7zjg4njgrvjg4Pjg4jjgZnjgoso55yB55WlKQogICAgICAgICAgICAvLwoKICAgICAgICAgICAgd2hpbGUodHJ1ZSkKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgLy84MDg2IG9wZSBjb2RlCiAgICAgICAgICAgICAgICAvL2h0dHA6Ly93Li4uY29udGVudC1hdmFpbGFibGUtdG8tYXV0aG9yLW9ubHkuLi5lLm5ldC84MDg2LzgwODZfdGFibGUudHh0CiAgICAgICAgICAgICAgICBzd2l0Y2ggKE1lbVtFaXBdKQogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIC8vQUREIEViLEdiCiAgICAgICAgICAgICAgICAgICAgY2FzZSAweDAwOgogICAgICAgICAgICAgICAgICAgICAgICBFaXArKzsKICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgLy8KICAgICAgICAgICAgICAgICAgICAvL+S4reeVpQogICAgICAgICAgICAgICAgICAgIC8vCgogICAgICAgICAgICAgICAgICAgIC8vQ0FMTAogICAgICAgICAgICAgICAgICAgIGNhc2UgMHg5QToKICAgICAgICAgICAgICAgICAgICAgICAgLy/jgZPjgZPjgafjgrjjg6Pjg7Pjg5flhYjjgYx3aW5kb3dzQVBJ44GL44Gp44GG44GL5Yik5patCiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIC8vQ0FMTAogICAgICAgICAgICAgICAgICAgIGNhc2UgMHhFODoKICAgICAgICAgICAgICAgICAgICAgICAgLy/jgZPjgZPjgafjgrjjg6Pjg7Pjg5flhYjjgYx3aW5kb3dzQVBJ44GL44Gp44GG44GL5Yik5patCiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgIC8vCiAgICAgICAgICAgICAgICAgICAgLy/kuK3nlaUKICAgICAgICAgICAgICAgICAgICAvLwoKICAgICAgICAgICAgICAgICAgICAvL0dSUDUJRXYKICAgICAgICAgICAgICAgICAgICBjYXNlIDB4RkY6CiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQp9Cg==