-
Notifications
You must be signed in to change notification settings - Fork 0
/
mediana.cs
6600 lines (6141 loc) · 735 KB
/
mediana.cs
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using plugins;
using GNIDA;
namespace medi
{
public class mediana : IDasmer
{
/*******************
* Instructions' IDs.
********************
*/
static ushort ID_NULL = 0x0;
static ushort ID_SWITCH = 0x1;
static ushort ID_0F = 0x2;
static ushort ID_66 = 0x3;
static ushort ID_67 = 0x4;
static ushort ID_AAA = 0x5;
static ushort ID_AAD = 0x6;
static ushort ID_AAM = 0x7;
static ushort ID_AAS = 0x8;
static ushort ID_ADC = 0x9;
static ushort ID_ADD = 0xA;
static ushort ID_ADDPD = 0xB;
static ushort ID_ADDPS = 0xC;
static ushort ID_ADDSD = 0xD;
static ushort ID_ADDSS = 0xE;
static ushort ID_ADDSUBPD = 0xF;
static ushort ID_ADDSUBPS = 0x10;
static ushort ID_ALTER = 0x11;
static ushort ID_AND = 0x12;
static ushort ID_ANDNPD = 0x13;
static ushort ID_ANDNPS = 0x14;
static ushort ID_ANDPD = 0x15;
static ushort ID_ANDPS = 0x16;
static ushort ID_ARPL = 0x17;
static ushort ID_BLENDPD = 0x18;
static ushort ID_BLENDPS = 0x19;
static ushort ID_BLENDVPD = 0x1A;
static ushort ID_BLENDVPS = 0x1B;
static ushort ID_BOUND = 0x1C;
static ushort ID_BSF = 0x1D;
static ushort ID_BSR = 0x1E;
static ushort ID_BSWAP = 0x1F;
static ushort ID_BT = 0x20;
static ushort ID_BTC = 0x21;
static ushort ID_BTR = 0x22;
static ushort ID_BTS = 0x23;
static ushort ID_CALL = 0x24;
static ushort ID_CALLF = 0x25;
static ushort ID_CBW = 0x26;
static ushort ID_CLC = 0x27;
static ushort ID_CLD = 0x28;
static ushort ID_CLFLUSH = 0x29;
static ushort ID_CLI = 0x2A;
static ushort ID_CLTS = 0x2B;
static ushort ID_CMC = 0x2C;
static ushort ID_CMOVA = 0x2D;
static ushort ID_CMOVAE = 0x2E;
static ushort ID_CMOVB = 0x2F;
static ushort ID_CMOVBE = 0x30;
static ushort ID_CMOVG = 0x31;
static ushort ID_CMOVGE = 0x32;
static ushort ID_CMOVL = 0x33;
static ushort ID_CMOVLE = 0x34;
static ushort ID_CMOVNO = 0x35;
static ushort ID_CMOVNP = 0x36;
static ushort ID_CMOVNS = 0x37;
static ushort ID_CMOVNZ = 0x38;
static ushort ID_CMOVO = 0x39;
static ushort ID_CMOVP = 0x3A;
static ushort ID_CMOVS = 0x3B;
static ushort ID_CMOVZ = 0x3C;
static ushort ID_CMP = 0x3D;
static ushort ID_CMPPD = 0x3E;
static ushort ID_CMPPS = 0x3F;
static ushort ID_CMPS = 0x40;
static ushort ID_CMPSD = 0x41;
static ushort ID_CMPSS = 0x42;
static ushort ID_CMPXCHG = 0x43;
static ushort ID_CMPXCHG8B = 0x44;
static ushort ID_COMISD = 0x45;
static ushort ID_COMISS = 0x46;
static ushort ID_CPUID = 0x47;
static ushort ID_CRC32 = 0x48;
static ushort ID_CS = 0x49;
static ushort ID_CVTDQ2PD = 0x4A;
static ushort ID_CVTDQ2PS = 0x4B;
static ushort ID_CVTPD2DQ = 0x4C;
static ushort ID_CVTPD2PI = 0x4D;
static ushort ID_CVTPD2PS = 0x4E;
static ushort ID_CVTPI2PD = 0x4F;
static ushort ID_CVTPI2PS = 0x50;
static ushort ID_CVTPS2DQ = 0x51;
static ushort ID_CVTPS2PD = 0x52;
static ushort ID_CVTPS2PI = 0x53;
static ushort ID_CVTSD2SI = 0x54;
static ushort ID_CVTSD2SS = 0x55;
static ushort ID_CVTSI2SD = 0x56;
static ushort ID_CVTSI2SS = 0x57;
static ushort ID_CVTSS2SD = 0x58;
static ushort ID_CVTSS2SI = 0x59;
static ushort ID_CVTTPD2DQ = 0x5A;
static ushort ID_CVTTPD2PI = 0x5B;
static ushort ID_CVTTPS2DQ = 0x5C;
static ushort ID_CVTTPS2PI = 0x5D;
static ushort ID_CVTTSD2SI = 0x5E;
static ushort ID_CVTTSS2SI = 0x5F;
static ushort ID_CWD = 0x60;
static ushort ID_DAA = 0x61;
static ushort ID_DAS = 0x62;
static ushort ID_DEC = 0x63;
static ushort ID_DIV = 0x64;
static ushort ID_DIVPD = 0x65;
static ushort ID_DIVPS = 0x66;
static ushort ID_DIVSD = 0x67;
static ushort ID_DIVSS = 0x68;
static ushort ID_DPPD = 0x69;
static ushort ID_DPPS = 0x6A;
static ushort ID_DS = 0x6B;
static ushort ID_EMMS = 0x6C;
static ushort ID_ENTER = 0x6D;
static ushort ID_ES = 0x6E;
static ushort ID_EXTRACTPS = 0x6F;
static ushort ID_F2XM1 = 0x70;
static ushort ID_FABS = 0x71;
static ushort ID_FADD = 0x72;
static ushort ID_FADDP = 0x73;
static ushort ID_FBLD = 0x74;
static ushort ID_FBSTP = 0x75;
static ushort ID_FCHS = 0x76;
static ushort ID_FCMOVA = 0x77;
static ushort ID_FCMOVB = 0x78;
static ushort ID_FCMOVBE = 0x79;
static ushort ID_FCMOVNB = 0x7A;
static ushort ID_FCMOVNU = 0x7B;
static ushort ID_FCMOVNZ = 0x7C;
static ushort ID_FCMOVU = 0x7D;
static ushort ID_FCMOVZ = 0x7E;
static ushort ID_FCOM = 0x7F;
static ushort ID_FCOM2 = 0x80;
static ushort ID_FCOMI = 0x81;
static ushort ID_FCOMIP = 0x82;
static ushort ID_FCOMP = 0x83;
static ushort ID_FCOMP3 = 0x84;
static ushort ID_FCOMP5 = 0x85;
static ushort ID_FCOMPP = 0x86;
static ushort ID_FCOS = 0x87;
static ushort ID_FDECSTP = 0x88;
static ushort ID_FDIV = 0x89;
static ushort ID_FDIVP = 0x8A;
static ushort ID_FDIVR = 0x8B;
static ushort ID_FDIVRP = 0x8C;
static ushort ID_FFREE = 0x8D;
static ushort ID_FFREEP = 0x8E;
static ushort ID_FIADD = 0x8F;
static ushort ID_FICOM = 0x90;
static ushort ID_FICOMP = 0x91;
static ushort ID_FIDIV = 0x92;
static ushort ID_FIDIVR = 0x93;
static ushort ID_FILD = 0x94;
static ushort ID_FIMUL = 0x95;
static ushort ID_FINCSTP = 0x96;
static ushort ID_FIST = 0x97;
static ushort ID_FISTP = 0x98;
static ushort ID_FISTTP = 0x99;
static ushort ID_FISUB = 0x9A;
static ushort ID_FISUBR = 0x9B;
static ushort ID_FLD = 0x9C;
static ushort ID_FLD1 = 0x9D;
static ushort ID_FLD2LE = 0x9E;
static ushort ID_FLD2LT = 0x9F;
static ushort ID_FLDCW = 0xA0;
static ushort ID_FLDENV = 0xA1;
static ushort ID_FLDLG2 = 0xA2;
static ushort ID_FLDLN2 = 0xA3;
static ushort ID_FLDPI = 0xA4;
static ushort ID_FLDZ = 0xA5;
static ushort ID_FMUL = 0xA6;
static ushort ID_FMULP = 0xA7;
static ushort ID_FNCLEX = 0xA8;
static ushort ID_FNDISI = 0xA9;
static ushort ID_FNENI = 0xAA;
static ushort ID_FNINIT = 0xAB;
static ushort ID_FNOP = 0xAC;
static ushort ID_FNSAVE = 0xAD;
static ushort ID_FNSETPM = 0xAE;
static ushort ID_FNSTCW = 0xAF;
static ushort ID_FNSTENV = 0xB0;
static ushort ID_FNSTSW = 0xB1;
static ushort ID_FPATAN = 0xB2;
static ushort ID_FPREM = 0xB3;
static ushort ID_FPREM1 = 0xB4;
static ushort ID_FPTAN = 0xB5;
static ushort ID_FRNDINT = 0xB6;
static ushort ID_FRSTOR = 0xB7;
static ushort ID_FS = 0xB8;
static ushort ID_FSCALE = 0xB9;
static ushort ID_FSIN = 0xBA;
static ushort ID_FSINCOS = 0xBB;
static ushort ID_FSQRT = 0xBC;
static ushort ID_FST = 0xBD;
static ushort ID_FSTP = 0xBE;
static ushort ID_FSTP1 = 0xBF;
static ushort ID_FSTP8 = 0xC0;
static ushort ID_FSTP9 = 0xC1;
static ushort ID_FSUB = 0xC2;
static ushort ID_FSUBP = 0xC3;
static ushort ID_FSUBR = 0xC4;
static ushort ID_FSUBRP = 0xC5;
static ushort ID_FTST = 0xC6;
static ushort ID_FUCOM = 0xC7;
static ushort ID_FUCOMI = 0xC8;
static ushort ID_FUCOMIP = 0xC9;
static ushort ID_FUCOMP = 0xCA;
static ushort ID_FUCOMPP = 0xCB;
static ushort ID_FWAIT = 0xCC;
static ushort ID_FXAM = 0xCD;
static ushort ID_FXCH = 0xCE;
static ushort ID_FXCH4 = 0xCF;
static ushort ID_FXCH7 = 0xD0;
static ushort ID_FXRSTOR = 0xD1;
static ushort ID_FXSAVE = 0xD2;
static ushort ID_FXTRACT = 0xD3;
static ushort ID_FYL2X = 0xD4;
static ushort ID_FYL2XP1 = 0xD5;
static ushort ID_GETSEC = 0xD6;
static ushort ID_GS = 0xD7;
static ushort ID_HADDPD = 0xD8;
static ushort ID_HADDPS = 0xD9;
static ushort ID_HINTNOP = 0xDA;
static ushort ID_HLT = 0xDB;
static ushort ID_HSUBPD = 0xDC;
static ushort ID_HSUBPS = 0xDD;
static ushort ID_ICEBP = 0xDE;
static ushort ID_IDIV = 0xDF;
static ushort ID_IMUL = 0xE0;
static ushort ID_IN = 0xE1;
static ushort ID_INC = 0xE2;
static ushort ID_INS = 0xE3;
static ushort ID_INSERTPS = 0xE4;
static ushort ID_INT = 0xE5;
static ushort ID_INTO = 0xE6;
static ushort ID_INVD = 0xE7;
static ushort ID_INVEPT = 0xE8;
static ushort ID_INVLPG = 0xE9;
static ushort ID_INVVPID = 0xEA;
static ushort ID_IRET = 0xEB;
static ushort ID_JA = 0xEC;
static ushort ID_JAE = 0xED;
static ushort ID_JB = 0xEE;
static ushort ID_JBE = 0xEF;
static ushort ID_JCXZ = 0xF0;
static ushort ID_JG = 0xF1;
static ushort ID_JGE = 0xF2;
static ushort ID_JL = 0xF3;
static ushort ID_JLE = 0xF4;
static ushort ID_JMP = 0xF5;
static ushort ID_JMPE = 0xF6;
static ushort ID_JMPF = 0xF7;
static ushort ID_JNO = 0xF8;
static ushort ID_JNP = 0xF9;
static ushort ID_JNS = 0xFA;
static ushort ID_JNZ = 0xFB;
static ushort ID_JO = 0xFC;
static ushort ID_JP = 0xFD;
static ushort ID_JS = 0xFE;
static ushort ID_JZ = 0xFF;
static ushort ID_LAHF = 0x100;
static ushort ID_LAR = 0x101;
static ushort ID_LDDQU = 0x102;
static ushort ID_LDMXCSR = 0x103;
static ushort ID_LDS = 0x104;
static ushort ID_LEA = 0x105;
static ushort ID_LEAVE = 0x106;
static ushort ID_LES = 0x107;
static ushort ID_LFENCE = 0x108;
static ushort ID_LFS = 0x109;
static ushort ID_LGDT = 0x10A;
static ushort ID_LGS = 0x10B;
static ushort ID_LIDT = 0x10C;
static ushort ID_LLDT = 0x10D;
static ushort ID_LMSW = 0x10E;
static ushort ID_LOADALL = 0x10F;
static ushort ID_LOCK = 0x110;
static ushort ID_LODS = 0x111;
static ushort ID_LOOP = 0x112;
static ushort ID_LOOPNZ = 0x113;
static ushort ID_LOOPZ = 0x114;
static ushort ID_LSL = 0x115;
static ushort ID_LSS = 0x116;
static ushort ID_LTR = 0x117;
static ushort ID_MASKMOVDQU = 0x118;
static ushort ID_MASKMOVQ = 0x119;
static ushort ID_MAXPD = 0x11A;
static ushort ID_MAXPS = 0x11B;
static ushort ID_MAXSD = 0x11C;
static ushort ID_MAXSS = 0x11D;
static ushort ID_MFENCE = 0x11E;
static ushort ID_MINPD = 0x11F;
static ushort ID_MINPS = 0x120;
static ushort ID_MINSD = 0x121;
static ushort ID_MINSS = 0x122;
static ushort ID_MONITOR = 0x123;
static ushort ID_MOV = 0x124;
static ushort ID_MOVAPD = 0x125;
static ushort ID_MOVAPS = 0x126;
static ushort ID_MOVBE = 0x127;
static ushort ID_MOVD = 0x128;
static ushort ID_MOVDDUP = 0x129;
static ushort ID_MOVDQ2Q = 0x12A;
static ushort ID_MOVDQA = 0x12B;
static ushort ID_MOVDQU = 0x12C;
static ushort ID_MOVHLPS = 0x12D;
static ushort ID_MOVHPD = 0x12E;
static ushort ID_MOVHPS = 0x12F;
static ushort ID_MOVLPD = 0x130;
static ushort ID_MOVLPS = 0x131;
static ushort ID_MOVMSKPD = 0x132;
static ushort ID_MOVMSKPS = 0x133;
static ushort ID_MOVNTDQ = 0x134;
static ushort ID_MOVNTDQA = 0x135;
static ushort ID_MOVNTI = 0x136;
static ushort ID_MOVNTPD = 0x137;
static ushort ID_MOVNTPS = 0x138;
static ushort ID_MOVNTQ = 0x139;
static ushort ID_MOVQ = 0x13A;
static ushort ID_MOVQ2DQ = 0x13B;
static ushort ID_MOVS = 0x13C;
static ushort ID_MOVSD = 0x13D;
static ushort ID_MOVSHDUP = 0x13E;
static ushort ID_MOVSLDUP = 0x13F;
static ushort ID_MOVSS = 0x140;
static ushort ID_MOVSX = 0x141;
static ushort ID_MOVSXD = 0x142;
static ushort ID_MOVUPD = 0x143;
static ushort ID_MOVUPS = 0x144;
static ushort ID_MOVZX = 0x145;
static ushort ID_MPSADBW = 0x146;
static ushort ID_MUL = 0x147;
static ushort ID_MULPD = 0x148;
static ushort ID_MULPS = 0x149;
static ushort ID_MULSD = 0x14A;
static ushort ID_MULSS = 0x14B;
static ushort ID_MWAIT = 0x14C;
static ushort ID_NEG = 0x14D;
static ushort ID_NOP = 0x14E;
static ushort ID_NOT = 0x14F;
static ushort ID_OR = 0x150;
static ushort ID_ORPD = 0x151;
static ushort ID_ORPS = 0x152;
static ushort ID_OUT = 0x153;
static ushort ID_OUTS = 0x154;
static ushort ID_PABSB = 0x155;
static ushort ID_PABSD = 0x156;
static ushort ID_PABSW = 0x157;
static ushort ID_PACKSSDW = 0x158;
static ushort ID_PACKSSWB = 0x159;
static ushort ID_PACKUSDW = 0x15A;
static ushort ID_PACKUSWB = 0x15B;
static ushort ID_PADDB = 0x15C;
static ushort ID_PADDD = 0x15D;
static ushort ID_PADDQ = 0x15E;
static ushort ID_PADDSB = 0x15F;
static ushort ID_PADDSW = 0x160;
static ushort ID_PADDUSB = 0x161;
static ushort ID_PADDUSW = 0x162;
static ushort ID_PADDW = 0x163;
static ushort ID_PALIGNR = 0x164;
static ushort ID_PAND = 0x165;
static ushort ID_PANDN = 0x166;
static ushort ID_PAUSE = 0x167;
static ushort ID_PAVGB = 0x168;
static ushort ID_PAVGW = 0x169;
static ushort ID_PBLENDVB = 0x16A;
static ushort ID_PBLENDW = 0x16B;
static ushort ID_PCMPEQB = 0x16C;
static ushort ID_PCMPEQD = 0x16D;
static ushort ID_PCMPEQQ = 0x16E;
static ushort ID_PCMPEQW = 0x16F;
static ushort ID_PCMPESTRI = 0x170;
static ushort ID_PCMPESTRM = 0x171;
static ushort ID_PCMPGTB = 0x172;
static ushort ID_PCMPGTD = 0x173;
static ushort ID_PCMPGTQ = 0x174;
static ushort ID_PCMPGTW = 0x175;
static ushort ID_PCMPISTRI = 0x176;
static ushort ID_PCMPISTRM = 0x177;
static ushort ID_PEXTRB = 0x178;
static ushort ID_PEXTRQ = 0x179;
static ushort ID_PEXTRW = 0x17A;
static ushort ID_PHADDD = 0x17B;
static ushort ID_PHADDSW = 0x17C;
static ushort ID_PHADDW = 0x17D;
static ushort ID_PHMINPOSUW = 0x17E;
static ushort ID_PHSUBD = 0x17F;
static ushort ID_PHSUBSW = 0x180;
static ushort ID_PHSUBW = 0x181;
static ushort ID_PINSRB = 0x182;
static ushort ID_PINSRQ = 0x183;
static ushort ID_PINSRW = 0x184;
static ushort ID_PMADDUBSW = 0x185;
static ushort ID_PMADDWD = 0x186;
static ushort ID_PMAXSB = 0x187;
static ushort ID_PMAXSD = 0x188;
static ushort ID_PMAXSW = 0x189;
static ushort ID_PMAXUB = 0x18A;
static ushort ID_PMAXUD = 0x18B;
static ushort ID_PMAXUW = 0x18C;
static ushort ID_PMINSB = 0x18D;
static ushort ID_PMINSD = 0x18E;
static ushort ID_PMINSW = 0x18F;
static ushort ID_PMINUB = 0x190;
static ushort ID_PMINUD = 0x191;
static ushort ID_PMINUW = 0x192;
static ushort ID_PMOVMSKB = 0x193;
static ushort ID_PMOVSXBD = 0x194;
static ushort ID_PMOVSXBQ = 0x195;
static ushort ID_PMOVSXBW = 0x196;
static ushort ID_PMOVSXDQ = 0x197;
static ushort ID_PMOVSXWD = 0x198;
static ushort ID_PMOVSXWQ = 0x199;
static ushort ID_PMOVZXBD = 0x19A;
static ushort ID_PMOVZXBQ = 0x19B;
static ushort ID_PMOVZXBW = 0x19C;
static ushort ID_PMOVZXDQ = 0x19D;
static ushort ID_PMOVZXWD = 0x19E;
static ushort ID_PMOVZXWQ = 0x19F;
static ushort ID_PMULDQ = 0x1A0;
static ushort ID_PMULHRSW = 0x1A1;
static ushort ID_PMULHUW = 0x1A2;
static ushort ID_PMULHW = 0x1A3;
static ushort ID_PMULLD = 0x1A4;
static ushort ID_PMULLW = 0x1A5;
static ushort ID_PMULUDQ = 0x1A6;
static ushort ID_POP = 0x1A7;
static ushort ID_POPA = 0x1A8;
static ushort ID_POPCNT = 0x1A9;
static ushort ID_POPF = 0x1AA;
static ushort ID_POR = 0x1AB;
static ushort ID_PREFETCHNTA= 0x1AC;
static ushort ID_PREFETCHT0 = 0x1AD;
static ushort ID_PREFETCHT1 = 0x1AE;
static ushort ID_PREFETCHT2 = 0x1AF;
static ushort ID_PSADBW = 0x1B0;
static ushort ID_PSHUFB = 0x1B1;
static ushort ID_PSHUFD = 0x1B2;
static ushort ID_PSHUFHW = 0x1B3;
static ushort ID_PSHUFLW = 0x1B4;
static ushort ID_PSHUFW = 0x1B5;
static ushort ID_PSIGNB = 0x1B6;
static ushort ID_PSIGND = 0x1B7;
static ushort ID_PSIGNW = 0x1B8;
static ushort ID_PSLLD = 0x1B9;
static ushort ID_PSLLDQ = 0x1BA;
static ushort ID_PSLLQ = 0x1BB;
static ushort ID_PSLLW = 0x1BC;
static ushort ID_PSRAD = 0x1BD;
static ushort ID_PSRAW = 0x1BE;
static ushort ID_PSRLD = 0x1BF;
static ushort ID_PSRLDQ = 0x1C0;
static ushort ID_PSRLQ = 0x1C1;
static ushort ID_PSRLW = 0x1C2;
static ushort ID_PSUBB = 0x1C3;
static ushort ID_PSUBD = 0x1C4;
static ushort ID_PSUBQ = 0x1C5;
static ushort ID_PSUBSB = 0x1C6;
static ushort ID_PSUBSW = 0x1C7;
static ushort ID_PSUBUSB = 0x1C8;
static ushort ID_PSUBUSW = 0x1C9;
static ushort ID_PSUBW = 0x1CA;
static ushort ID_PTEST = 0x1CB;
static ushort ID_PUNPCKHBD = 0x1CC;
static ushort ID_PUNPCKHBDQ = 0x1CD;
static ushort ID_PUNPCKHBW = 0x1CE;
static ushort ID_PUNPCKHDQ = 0x1CF;
static ushort ID_PUNPCKHQDQ = 0x1D0;
static ushort ID_PUNPCKHWD = 0x1D1;
static ushort ID_PUNPCKLBW = 0x1D2;
static ushort ID_PUNPCKLDQ = 0x1D3;
static ushort ID_PUNPCKLQDQ = 0x1D4;
static ushort ID_PUNPCKLWD = 0x1D5;
static ushort ID_PUSH = 0x1D6;
static ushort ID_PUSHA = 0x1D7;
static ushort ID_PUSHF = 0x1D8;
static ushort ID_PXOR = 0x1D9;
static ushort ID_RCL = 0x1DA;
static ushort ID_RCPPS = 0x1DB;
static ushort ID_RCPSS = 0x1DC;
static ushort ID_RCR = 0x1DD;
static ushort ID_RDMSR = 0x1DE;
static ushort ID_RDPMC = 0x1DF;
static ushort ID_RDTSC = 0x1E0;
static ushort ID_RDTSCP = 0x1E1;
static ushort ID_REPNZ = 0x1E2;
static ushort ID_REPZ = 0x1E3;
static ushort ID_RETF = 0x1E4;
static ushort ID_RETN = 0x1E5;
static ushort ID_ROL = 0x1E6;
static ushort ID_ROR = 0x1E7;
static ushort ID_ROUNDPD = 0x1E8;
static ushort ID_ROUNDPS = 0x1E9;
static ushort ID_ROUNDSD = 0x1EA;
static ushort ID_ROUNDSS = 0x1EB;
static ushort ID_RSM = 0x1EC;
static ushort ID_RSQRTPS = 0x1ED;
static ushort ID_RSQRTSS = 0x1EE;
static ushort ID_SAHF = 0x1EF;
static ushort ID_SAL = 0x1F0;
static ushort ID_SAR = 0x1F1;
static ushort ID_SBB = 0x1F2;
static ushort ID_SCAS = 0x1F3;
static ushort ID_SETA = 0x1F4;
static ushort ID_SETAE = 0x1F5;
static ushort ID_SETALC = 0x1F6;
static ushort ID_SETB = 0x1F7;
static ushort ID_SETBE = 0x1F8;
static ushort ID_SETG = 0x1F9;
static ushort ID_SETGE = 0x1FA;
static ushort ID_SETL = 0x1FB;
static ushort ID_SETLE = 0x1FC;
static ushort ID_SETNO = 0x1FD;
static ushort ID_SETNP = 0x1FE;
static ushort ID_SETNS = 0x1FF;
static ushort ID_SETNZ = 0x200;
static ushort ID_SETO = 0x201;
static ushort ID_SETP = 0x202;
static ushort ID_SETS = 0x203;
static ushort ID_SETZ = 0x204;
static ushort ID_SFENCE = 0x205;
static ushort ID_SGDT = 0x206;
static ushort ID_SHL = 0x207;
static ushort ID_SHLD = 0x208;
static ushort ID_SHR = 0x209;
static ushort ID_SHRD = 0x20A;
static ushort ID_SHUFPD = 0x20B;
static ushort ID_SHUFPS = 0x20C;
static ushort ID_SIDT = 0x20D;
static ushort ID_SLDT = 0x20E;
static ushort ID_SMSW = 0x20F;
static ushort ID_SQRTPD = 0x210;
static ushort ID_SQRTPS = 0x211;
static ushort ID_SQRTSD = 0x212;
static ushort ID_SQRTSS = 0x213;
static ushort ID_SS = 0x214;
static ushort ID_STC = 0x215;
static ushort ID_STD = 0x216;
static ushort ID_STI = 0x217;
static ushort ID_STMXCSR = 0x218;
static ushort ID_STOS = 0x219;
static ushort ID_STR = 0x21A;
static ushort ID_SUB = 0x21B;
static ushort ID_SUBPD = 0x21C;
static ushort ID_SUBPS = 0x21D;
static ushort ID_SUBSD = 0x21E;
static ushort ID_SUBSS = 0x21F;
static ushort ID_SWAPGS = 0x220;
static ushort ID_SYSCALL = 0x221;
static ushort ID_SYSENTER = 0x222;
static ushort ID_SYSEXIT = 0x223;
static ushort ID_SYSRET = 0x224;
static ushort ID_TEST = 0x225;
static ushort ID_UCOMISD = 0x226;
static ushort ID_UCOMISS = 0x227;
static ushort ID_UD = 0x228;
static ushort ID_UD2 = 0x229;
static ushort ID_UNPCKHPD = 0x22A;
static ushort ID_UNPCKHPS = 0x22B;
static ushort ID_UNPCKLPD = 0x22C;
static ushort ID_UNPCKLPS = 0x22D;
static ushort ID_VERR = 0x22E;
static ushort ID_VERW = 0x22F;
static ushort ID_VMCALL = 0x230;
static ushort ID_VMCLEAR = 0x231;
static ushort ID_VMLAUNCH = 0x232;
static ushort ID_VMPTRLD = 0x233;
static ushort ID_VMPTRST = 0x234;
static ushort ID_VMREAD = 0x235;
static ushort ID_VMRESUME = 0x236;
static ushort ID_VMWRITE = 0x237;
static ushort ID_VMXOFF = 0x238;
static ushort ID_VMXON = 0x239;
static ushort ID_WBINVD = 0x23A;
static ushort ID_WRMSR = 0x23B;
static ushort ID_XADD = 0x23C;
static ushort ID_XCHG = 0x23D;
static ushort ID_XGETBV = 0x23E;
static ushort ID_XLAT = 0x23F;
static ushort ID_XOR = 0x240;
static ushort ID_XORPD = 0x241;
static ushort ID_XORPS = 0x242;
static ushort ID_XRSTOR = 0x243;
static ushort ID_XSAVE = 0x244;
static ushort ID_XSETBV = 0x245;
static ushort PROP_LOCK = 0x1;
static ushort PROP_I64 = 0x2;
static ushort PROP_O64 = 0x4;
static ushort PROP_IOPL = 0x8;
static ushort PROP_RING0 = 0x10;
static ushort PROP_SERIAL = 0x20;
static ushort PROP_MODRM = 0x40;
static ushort PROP_UNDOC = 0x80;
static ushort PROP_POST_PROC = 0x100;
static byte TQ_NULL = 0xFF;
static byte TQ_1 = 0x0;
static byte TQ_3 = 0x1;
static byte TQ_A = 0x2;
static byte TQ_C = 0x3;
static byte TQ_D = 0x4;
static byte TQ_E = 0x5;
static byte TQ_G = 0x6;
static byte TQ_H = 0x7;
static byte TQ_I = 0x8;
static byte TQ_J = 0x9;
static byte TQ_M = 0xA;
static byte TQ_N = 0xB;
static byte TQ_O = 0xC;
static byte TQ_P = 0xD;
static byte TQ_Q = 0xE;
static byte TQ_R = 0xF;
static byte TQ_S = 0x10;
static byte TQ_T = 0x11;
static byte TQ_U = 0x12;
static byte TQ_V = 0x13;
static byte TQ_W = 0x14;
static byte TQ_X = 0x15;
static byte TQ_Y = 0x16;
static byte TQ_Z = 0x17;
static byte TQ_rAX = 0x18;
static byte TQ_rCX = 0x19;
static byte TQ_rDX = 0x1A;
static byte TQ_rBX = 0x1B;
static byte TQ_rSP = 0x1C;
static byte TQ_rBP = 0x1D;
static byte TQ_rSI = 0x1E;
static byte TQ_rDI = 0x1F;
static byte TQ_fES = 0x20;
static byte TQ_fEST = 0x21;
static byte TQ_fST0 = 0x22;
static byte TQ_CS = 0x23;
static byte TQ_DS = 0x24;
static byte TQ_ES = 0x25;
static byte TQ_SS = 0x26;
static byte TQ_FS = 0x27;
static byte TQ_GS = 0x28;
static byte TQ_PREF_CS = 0x29;
static byte TQ_PREF_DS = 0x2A;
static byte TQ_PREF_ES = 0x2B;
static byte TQ_PREF_SS = 0x2C;
static byte TQ_PREF_FS = 0x2D;
static byte TQ_PREF_GS = 0x2E;
static byte TQ_PREF_66 = 0x2F;
static byte TQ_PREF_67 = 0x30;
static byte TQ_PREF_F2 = 0x31;
static byte TQ_PREF_F3 = 0x32;
static byte TQ_PREF_F0 = 0x33;
static byte SQ_NULL = 0xFF;
static byte SQ_a = 0x0;
static byte SQ_b = 0x1;
static byte SQ_bcd = 0x2;
static byte SQ_bdqp = 0x3;
static byte SQ_bs = 0x4;
static byte SQ_bss = 0x5;
static byte SQ_d = 0x6;
static byte SQ_ddq = 0x7;
static byte SQ_di = 0x8;
static byte SQ_dq = 0x9;
static byte SQ_dq64 = 0xA;
static byte SQ_dqp = 0xB;
static byte SQ_dr = 0xC;
static byte SQ_ds = 0xD;
static byte SQ_e = 0xE;
static byte SQ_er = 0xF;
static byte SQ_p = 0x10;
static byte SQ_pd = 0x11;
static byte SQ_pi = 0x12;
static byte SQ_ps = 0x13;
static byte SQ_psq = 0x14;
static byte SQ_ptp = 0x15;
static byte SQ_q = 0x16;
static byte SQ_qdq = 0x17;
static byte SQ_qi = 0x18;
static byte SQ_s = 0x19;
static byte SQ_sd = 0x1A;
static byte SQ_sr = 0x1B;
static byte SQ_ss = 0x1C;
static byte SQ_st = 0x1D;
static byte SQ_stx = 0x1E;
static byte SQ_v = 0x1F;
static byte SQ_v67q64 = 0x20;
static byte SQ_vd64 = 0x21;
static byte SQ_vds = 0x22;
static byte SQ_vq64 = 0x23;
static byte SQ_vqp = 0x24;
static byte SQ_vs = 0x25;
static byte SQ_w = 0x26;
static byte SQ_wdq = 0x27;
static byte SQ_wdqp = 0x28;
static byte SQ_wi = 0x29;
static byte SQ_wv = 0x2A;
static byte SQ_wvqp = 0x2B;
static byte IDX_1BYTE = 0x0;
static byte IDX_80 = 0x1;
static byte IDX_81 = 0x2;
static byte IDX_82 = 0x3;
static byte IDX_83 = 0x4;
static byte IDX_8F = 0x5;
static byte IDX_C0 = 0x6;
static byte IDX_C1 = 0x7;
static byte IDX_C6 = 0x8;
static byte IDX_C7 = 0x9;
static byte IDX_D0 = 0xA;
static byte IDX_D1 = 0xB;
static byte IDX_D2 = 0xC;
static byte IDX_D3 = 0xD;
static byte IDX_F6 = 0xE;
static byte IDX_F7 = 0xF;
static byte IDX_FE = 0x10;
static byte IDX_FF = 0x11;
static byte IDX_D8_SWTCH = 0x12;
static byte IDX_D8_MEM = 0x13;
static byte IDX_D8_NOMEM = 0x14;
static byte IDX_D9_SWTCH = 0x15;
static byte IDX_D9_MEM = 0x16;
static byte IDX_D9_NOMEM = 0x17;
static byte IDX_DA_SWTCH = 0x18;
static byte IDX_DA_MEM = 0x19;
static byte IDX_DA_NOMEM = 0x1A;
static byte IDX_DB_SWTCH = 0x1B;
static byte IDX_DB_MEM = 0x1C;
static byte IDX_DB_NOMEM = 0x1D;
static byte IDX_DC_SWTCH = 0x1E;
static byte IDX_DC_MEM = 0x1F;
static byte IDX_DC_NOMEM = 0x20;
static byte IDX_DD_SWTCH = 0x21;
static byte IDX_DD_MEM = 0x22;
static byte IDX_DD_NOMEM = 0x23;
static byte IDX_DE_SWTCH = 0x24;
static byte IDX_DE_MEM = 0x25;
static byte IDX_DE_NOMEM = 0x26;
static byte IDX_DF_SWTCH = 0x27;
static byte IDX_DF_MEM = 0x28;
static byte IDX_DF_NOMEM = 0x29;
static byte IDX_0F = 0x2A;
static byte IDX_0F_00 = 0x2B;
static byte IDX_0F_01_SWTCH = 0x2C;
static byte IDX_0F_01_MEM = 0x2D;
static byte IDX_0F_01_NOMEM_SWTCH = 0x2E;
static byte IDX_0F_01_NOMEM_00 = 0x2F;
static byte IDX_0F_01_NOMEM_01 = 0x30;
static byte IDX_0F_01_NOMEM_02 = 0x31;
static byte IDX_0F_01_NOMEM_07 = 0x32;
static byte IDX_0F_12 = 0x33;
static byte IDX_0F_16 = 0x34;
static byte IDX_0F_18 = 0x35;
static byte IDX_0F_19 = 0x36;
static byte IDX_0F_71 = 0x37;
static byte IDX_0F_72 = 0x38;
static byte IDX_0F_73 = 0x39;
static byte IDX_0F_AE_SWTCH = 0x3A;
static byte IDX_0F_AE_MEM = 0x3B;
static byte IDX_0F_AE_NOMEM = 0x3C;
static byte IDX_0F_BA = 0x3D;
static byte IDX_0F_C7 = 0x3E;
static byte IDX_66_0F_JMP = 0x3F;
static byte IDX_66_0F = 0x40;
static byte IDX_66_0F71 = 0x41;
static byte IDX_66_0F72 = 0x42;
static byte IDX_66_0F73 = 0x43;
static byte IDX_66_0FC7 = 0x44;
static byte IDX_F2_0F_JMP = 0x45;
static byte IDX_F2_0F = 0x46;
static byte IDX_F3_0F_JMP = 0x47;
static byte IDX_F3_0F = 0x48;
static byte IDX_F3_0FC7 = 0x49;
static byte IDX_0F_38 = 0x4A;
static byte IDX_66_0F38 = 0x4B;
static byte IDX_F2_0F38 = 0x4C;
static byte IDX_0F_3A = 0x4D;
static byte IDX_66_0F3A = 0x4E;
static int POST_PROC_SHIFT = 0xC;
static int POST_PROC_ARPL_MOVSXD = 0x0;
static int POST_PROC_NOP_PAUSE = 0x1 << POST_PROC_SHIFT;
static int POST_PROC_MULTINOP = 0x2 << POST_PROC_SHIFT;
static int POST_PROC_CMPXCHG8B = 0x3 << POST_PROC_SHIFT;
static int POST_PROC_JCXZ = 0x4 << POST_PROC_SHIFT;
static byte TBL_PROP_MODRM = 0x1;
static byte TBL_PROP_SUFFIX = 0x2;
/**********************
* Instructions' groups.
***********************
*/
static ulong GRP_NULL = 0x0000000000000000L;
static ulong GRP_SWITCH = 0x0000000000000001L;
static ulong GRP_ARITH = 0x0000000000000002L;
static ulong GRP_BINARY = 0x0000000000000004L;
static ulong GRP_BIT = 0x0000000000000008L;
static ulong GRP_BRANCH = 0x0000000000000010L;
static ulong GRP_BREAK = 0x0000000000000020L;
static ulong GRP_CACHECT= 0x0000000000000040L;
static ulong GRP_COMPAR = 0x0000000000000080L;
static ulong GRP_COND = 0x0000000000000100L;
static ulong GRP_CONTROL= 0x0000000000000200L;
static ulong GRP_CONVER = 0x0000000000000400L;
static ulong GRP_DATAMOV= 0x0000000000000800L;
static ulong GRP_DECIMAL= 0x0000000000001000L;
static ulong GRP_FETCH = 0x0000000000002000L;
static ulong GRP_FLGCTRL= 0x0000000000004000L;
static ulong GRP_GEN = 0x0000000000008000L;
static ulong GRP_INOUT = 0x0000000000010000L;
static ulong GRP_LDCONST= 0x0000000000020000L;
static ulong GRP_LOGICAL= 0x0000000000040000L;
static ulong GRP_MMX = 0x0000000000080000L;
static ulong GRP_MXCSRSM= 0x0000000000100000L;
static ulong GRP_ORDER = 0x0000000000200000L;
static ulong GRP_PCKSCLR= 0x0000000000400000L;
static ulong GRP_PCKSP = 0x0000000000800000L;
static ulong GRP_PREFIX = 0x0000000001000000L;
static ulong GRP_SEGREG = 0x0000000002000000L;
static ulong GRP_SHFTROT= 0x0000000004000000L;
static ulong GRP_SHIFT = 0x0000000008000000L;
static ulong GRP_SHUNPCK= 0x0000000010000000L;
static ulong GRP_SIMDFP = 0x0000000020000000L;
static ulong GRP_SIMDINT= 0x0000000040000000L;
static ulong GRP_SM = 0x0000000080000000L;
static ulong GRP_SMX = 0x0000000100000000L;
static ulong GRP_SSE1 = 0x0000000200000000L;
static ulong GRP_SSE2 = 0x0000000400000000L;
static ulong GRP_SSE3 = 0x0000000800000000L;
static ulong GRP_SSE41 = 0x0000001000000000L;
static ulong GRP_SSE42 = 0x0000002000000000L;
static ulong GRP_SSSE3 = 0x0000004000000000L;
static ulong GRP_STACK = 0x0000008000000000L;
static ulong GRP_STRING = 0x0000010000000000L;
static ulong GRP_STRTXT = 0x0000020000000000L;
static ulong GRP_SYNC = 0x0000040000000000L;
static ulong GRP_SYSTEM = 0x0000080000000000L;
static ulong GRP_TRANS = 0x0000100000000000L;
static ulong GRP_UNPACK = 0x0000200000000000L;
static ulong GRP_VMX = 0x0000400000000000L;
static ulong GRP_X87FPU = 0x0000800000000000L;
static byte PREF_SEG_INDEX = 0x0;
static byte PREF_OPSIZE_INDEX = 0x1;
static byte PREF_ADDRSIZE_INDEX = 0x2;
static byte PREF_REP_INDEX = 0x3;
static byte PREF_LOCK_INDEX = 0x4;
static byte PREF_REX_INDEX = 0x5;
static byte PREFIX_COUNT = 0x6;
//INSTRUCTION.rex's bits:
static byte PREFIX_REX_W = 0x8;
static byte PREFIX_REX_R = 0x4;
static byte PREFIX_REX_X = 0x2;
static byte PREFIX_REX_B = 0x1;
//PREF_SEG_*
static byte PREF_CS_ID = 0x0;
static byte PREF_DS_ID = 0x1;
static byte PREF_ES_ID = 0x2;
static byte PREF_SS_ID = 0x3;
static byte PREF_FS_ID = 0x4;
static byte PREF_GS_ID = 0x5;
//PREF_OPSIZE_*
static byte PREF_OPSIZE_ID = 0x6;
//PREF_ADDRSIZE_*
static byte PREF_ADDRSIZE_ID = 0x7;
//PREF_REP_*
static byte PREF_REPZ_ID = 0x8;
static byte PREF_REPNZ_ID = 0x9;
//PREF_LOCK_*
static byte PREF_LOCK_ID = 0xA;
//PREF_REX_*
static byte PREF_REX_ID = 0xB;
/************************
* Defines and structs for
* instruction.
*************************
*/
//INSTRUCTION.flag's values:
static ushort INSTR_FLAG_MODRM = 0x0001;
static ushort INSTR_FLAG_SIB = 0x0002;
static ushort INSTR_FLAG_SF_PREFIXES = 0x0004;
static ushort INSTR_FLAG_IOPL = 0x0008;
static ushort INSTR_FLAG_RING0 = 0x0010;
static ushort INSTR_FLAG_SERIAL = 0x0020;
static ushort INSTR_FLAG_UNDOC = 0x0040;
//INSTRUCTION.prefixes values.
//Segment prefixes:
static UInt16 INSTR_PREFIX_CS = 0x0001;
static UInt16 INSTR_PREFIX_DS = 0x0002;
static UInt16 INSTR_PREFIX_ES = 0x0004;
static UInt16 INSTR_PREFIX_SS = 0x0008;
static UInt16 INSTR_PREFIX_FS = 0x0010;
static UInt16 INSTR_PREFIX_GS = 0x0020;
//Segment prefixes mask:
static uint INSTR_PREFIX_SEG_MASK = 0x003F;
//Repeat prefixes:
static UInt16 INSTR_PREFIX_REPZ = 0x0040;
static UInt16 INSTR_PREFIX_REPNZ = 0x0080;
//Repeat prefixes mask:
static uint INSTR_PREFIX_REP_MASK = 0x00C0;
//Size override prefixes:
static UInt16 INSTR_PREFIX_OPSIZE = 0x0100;
static UInt16 INSTR_PREFIX_ADDRSIZE = 0x0200;
static UInt16 INSTR_PREFIX_REX = 0x0400;
//Operand size prefixes mask:
static uint INSTR_PREFIX_SIZE_MASK = 0x0300;
//LOCK prefix:
static UInt16 INSTR_PREFIX_LOCK = 0x0800;
public class INSTRUCTION : IInstruction
{
private static string AddProc(ulong x, MyDictionary ProcList, Dictionary<ulong, TFunc> NewSubs)
{
if (ProcList.ContainsKey(x)) return ProcList[x].FName + "();";
TFunc tmpfunc = new TFunc(x, 1);
if (!NewSubs.ContainsKey(x)) NewSubs.Add(x, tmpfunc);
return "proc_" + x.ToString("X8") + "();";
}
public override string ToString(MyDictionary ProcList, VarDictionary VarDict, Dictionary<ulong, TFunc> NewSubs)
{
if (!(bytes==null))
if (bytes.Count() > 0)
switch (bytes[0])
{
case 0x74: return "$jz Loc_" + OpToString(0).Remove(0, 2);
case 0x75: return "$jnz Loc_" + OpToString(0).Remove(0, 2);
case 0xE8://call;
return AddProc(ops[0].value.imm.imm64, ProcList, NewSubs);
case 0xE9://jmp;
case 0xEB://jmp;
return "$jmp Loc_" + OpToString(0).Remove(0, 2);
case 0xA3://mov somevar, EAX
{
TVar Var1 = new TVar((ulong)disp.value.d64, "", 4);
if (!VarDict.ContainsKey((ulong)disp.value.d64))
{
VarDict.AddVar(Var1);
};
return VarDict[(ulong)disp.value.d64].FName + " = " + OpToString(1) + ";";
}
case 0xFF:
{
if (this.bytes[1] == 0x15)
return AddProc(disp.value.d64, ProcList, NewSubs);
} break;
case 0x0F:
{
if (this.bytes[1] == 0x86)
return "$jbe Loc_" + OpToString(0).Remove(0, 2);
}break;
}
string ret = "$"+mnemonic;
if (ops[0].size > 0) ret += " " + OpToString(0);
if (ops[1].size > 0) ret += ", " + OpToString(1);
if (ops[2].size > 0) ret += ", " + OpToString(2);
return ret;
}
public static string[] regs8 =