-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththreeopcode.cpp
More file actions
101 lines (82 loc) · 1.26 KB
/
threeopcode.cpp
File metadata and controls
101 lines (82 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#include "stdafx.h"
#include "assembler.h"
int assembler0f38(unsigned char *buff,char *instrname)
{
int length = 0;
char temp[] = "";
unsigned char b1,b2,b3;
b1 = buff[0];
b2 = buff[1];
b3 = buff[2];
switch(b1)
{
case 0x00:
case 0x01:
case 0x02:
case 0x03:
case 0x04:
case 0x05:
case 0x06:
case 0x07:
case 0x08:
case 0x09:
case 0x0a:
case 0x0b:
{
char* temp_array[0x10] = {
"pshufb",
"phaddw",
"phaddd",
"phaddsw",
"pmaddubsw",
"phsubw",
"phsubd",
"phsubsw",
"psignb",
"psignw",
"psignd",
"pmulhrsw",
"",
"",
"",
"",
};
strcpy(instruction,temp_array[b1&7]);
strcpy(ptr,"qword ptr");
p_register = mmregister;
goto reg_mem;
reg_mem:
flag = 0;
length += mod_reg_rm(buff,p_register);
if(((b2&7)==4)&(b2<0xc0))
length = scale_index_base(buff,length);
if(b2>=0xc0)
optype_addmethod = 0x14;
else
optype_addmethod = 0x11;
}
break;
default:
length = 0;
break;
}
return length;
}
int assembler0f3a(unsigned char *buff,char *instrname)
{
int length = 0;
char temp[] = "";
unsigned char b1,b2,b3;
b1 = buff[0];
b2 = buff[1];
b3 = buff[2];
switch(b1)
{
case 0x01:
break;
default:
length = 0;
break;
}
return length;
}