mirror of
https://github.com/sampletext32/ParkanPlayground.git
synced 2025-06-19 16:08:02 +03:00
Fixes to tests and ModRM + SIB
This commit is contained in:
@ -4,7 +4,7 @@ RawBytes;Instructions
|
||||
04AA;[{ "Type": "Add", "Operands": ["al", "0xAA"] }]
|
||||
80C1AA;[{ "Type": "Add", "Operands": ["cl", "0xAA"] }]
|
||||
8000AA;[{ "Type": "Add", "Operands": ["byte ptr [eax]", "0xAA"] }]
|
||||
805310AA;[{ "Type": "Add", "Operands": ["byte ptr [ebx+0x10]", "0xAA"] }]
|
||||
804310AA;[{ "Type": "Add", "Operands": ["byte ptr [ebx+0x10]", "0xAA"] }]
|
||||
00D8;[{ "Type": "Add", "Operands": ["al", "bl"] }]
|
||||
0018;[{ "Type": "Add", "Operands": ["byte ptr [eax]", "bl"] }]
|
||||
0218;[{ "Type": "Add", "Operands": ["bl", "byte ptr [eax]"] }]
|
||||
|
Can't render this file because it contains an unexpected character in line 4 and column 9.
|
@ -10,7 +10,7 @@ RawBytes;Instructions
|
||||
20D8;[{ "Type": "And", "Operands": ["al", "bl"] }]
|
||||
2018;[{ "Type": "And", "Operands": ["byte ptr [eax]", "bl"] }]
|
||||
2218;[{ "Type": "And", "Operands": ["bl", "byte ptr [eax]"] }]
|
||||
800488AA;[{ "Type": "And", "Operands": ["byte ptr [eax+ecx*4]", "0xAA"] }]
|
||||
802488AA;[{ "Type": "And", "Operands": ["byte ptr [eax+ecx*4]", "0xAA"] }]
|
||||
|
||||
# 16-bit AND (with 66 prefix)
|
||||
6625AA00;[{ "Type": "And", "Operands": ["ax", "0xAA"] }]
|
||||
@ -22,7 +22,7 @@ RawBytes;Instructions
|
||||
6621D8;[{ "Type": "And", "Operands": ["ax", "bx"] }]
|
||||
662118;[{ "Type": "And", "Operands": ["word ptr [eax]", "bx"] }]
|
||||
662318;[{ "Type": "And", "Operands": ["bx", "word ptr [eax]"] }]
|
||||
66810488AA00;[{ "Type": "And", "Operands": ["word ptr [eax+ecx*4]", "0xAA"] }]
|
||||
66812488AA00;[{ "Type": "And", "Operands": ["word ptr [eax+ecx*4]", "0xAA"] }]
|
||||
|
||||
# 32-bit AND
|
||||
25AA000000;[{ "Type": "And", "Operands": ["eax", "0xAA"] }]
|
||||
@ -34,9 +34,9 @@ RawBytes;Instructions
|
||||
21D8;[{ "Type": "And", "Operands": ["eax", "ebx"] }]
|
||||
2118;[{ "Type": "And", "Operands": ["dword ptr [eax]", "ebx"] }]
|
||||
2318;[{ "Type": "And", "Operands": ["ebx", "dword ptr [eax]"] }]
|
||||
810488AA000000;[{ "Type": "And", "Operands": ["dword ptr [eax+ecx*4]", "0xAA"] }]
|
||||
812488AA000000;[{ "Type": "And", "Operands": ["dword ptr [eax+ecx*4]", "0xAA"] }]
|
||||
|
||||
# Complex addressing modes
|
||||
20A314285600;[{ "Type": "And", "Operands": ["byte ptr [ebx+0x562814]", "ah"] }]
|
||||
20A314285600;[{ "Type": "And", "Operands": ["byte ptr [ebx+0x00562814]", "ah"] }]
|
||||
6621B310203040;[{ "Type": "And", "Operands": ["word ptr [ebx+0x40302010]", "si"] }]
|
||||
230C8D10203040;[{ "Type": "And", "Operands": ["ecx", "dword ptr [ebp*4+0x40302010]"] }]
|
||||
230CAD10203040;[{ "Type": "And", "Operands": ["ecx", "dword ptr [ebp*4+0x40302010]"] }]
|
Can't render this file because it contains an unexpected character in line 4 and column 9.
|
@ -31,4 +31,4 @@ F738;[{ "Type": "IDiv", "Operands": ["dword ptr [eax]"] }]
|
||||
|
||||
# The correct encoding for "IDIV dword ptr [eax+0x10]" would be F74010 (with Mod=01, R/M=0 for EAX, disp8=0x10)
|
||||
# F73C2510000000;[{ "Type": "IDiv", "Operands": ["dword ptr [eax+0x10]"] }]
|
||||
F74010;[{ "Type": "IDiv", "Operands": ["dword ptr [eax+0x10]"] }]
|
||||
F77810;[{ "Type": "IDiv", "Operands": ["dword ptr [eax+0x10]"] }]
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 9.
|
@ -37,7 +37,7 @@ RawBytes;Instructions
|
||||
8D47F0;[{ "Type": "Lea", "Operands": ["eax", "dword ptr [edi-0x10]"] }]
|
||||
|
||||
# LEA r32, m (opcode 8D) with SIB byte (no displacement)
|
||||
8D0424;[{ "Type": "Lea", "Operands": ["eax", "dword ptr [esp]"] }]
|
||||
8D0424;[{ "Type": "Lea", "Operands": ["eax", "dword ptr [esp+0x00]"] }]
|
||||
|
||||
# SPECIAL CASE: The following encodings with EBP as base register have special rules.
|
||||
# When the SIB byte has Base=101 (EBP) and Mod=00, the base register is not used.
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 9.
|
@ -7,8 +7,8 @@ RawBytes;Instructions
|
||||
8F01;[{ "Type": "Pop", "Operands": ["dword ptr [ecx]"] }]
|
||||
8F02;[{ "Type": "Pop", "Operands": ["dword ptr [edx]"] }]
|
||||
8F03;[{ "Type": "Pop", "Operands": ["dword ptr [ebx]"] }]
|
||||
8F0424;[{ "Type": "Pop", "Operands": ["dword ptr [esp]"] }]
|
||||
88F4500;[{ "Type": "Pop", "Operands": ["dword ptr [ebp]"] }]
|
||||
8F0424;[{ "Type": "Pop", "Operands": ["dword ptr [esp+0x00]"] }]
|
||||
8F4500;[{ "Type": "Pop", "Operands": ["dword ptr [ebp+0x00]"] }]
|
||||
8F06;[{ "Type": "Pop", "Operands": ["dword ptr [esi]"] }]
|
||||
8F07;[{ "Type": "Pop", "Operands": ["dword ptr [edi]"] }]
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 9.
|
@ -7,8 +7,8 @@ FF30;[{ "Type": "Push", "Operands": ["dword ptr [eax]"] }]
|
||||
FF31;[{ "Type": "Push", "Operands": ["dword ptr [ecx]"] }]
|
||||
FF32;[{ "Type": "Push", "Operands": ["dword ptr [edx]"] }]
|
||||
FF33;[{ "Type": "Push", "Operands": ["dword ptr [ebx]"] }]
|
||||
FF3424;[{ "Type": "Push", "Operands": ["dword ptr [esp]"] }]
|
||||
FF7500;[{ "Type": "Push", "Operands": ["dword ptr [ebp]"] }]
|
||||
FF3424;[{ "Type": "Push", "Operands": ["dword ptr [esp+0x00]"] }]
|
||||
FF7500;[{ "Type": "Push", "Operands": ["dword ptr [ebp+0x00]"] }]
|
||||
FF36;[{ "Type": "Push", "Operands": ["dword ptr [esi]"] }]
|
||||
FF37;[{ "Type": "Push", "Operands": ["dword ptr [edi]"] }]
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 9.
|
@ -6,10 +6,10 @@ RawBytes;Instructions
|
||||
C3;[{ "Type": "Ret", "Operands": [] }]
|
||||
|
||||
# RET imm16 (opcode C2) - Near return to calling procedure and pop imm16 bytes from stack
|
||||
C20000;[{ "Type": "Ret", "Operands": ["0x0000"] }]
|
||||
C20400;[{ "Type": "Ret", "Operands": ["0x0004"] }]
|
||||
C20800;[{ "Type": "Ret", "Operands": ["0x0008"] }]
|
||||
C21000;[{ "Type": "Ret", "Operands": ["0x0010"] }]
|
||||
C20000;[{ "Type": "Ret", "Operands": ["0x00"] }]
|
||||
C20400;[{ "Type": "Ret", "Operands": ["0x04"] }]
|
||||
C20800;[{ "Type": "Ret", "Operands": ["0x08"] }]
|
||||
C21000;[{ "Type": "Ret", "Operands": ["0x10"] }]
|
||||
C2FFFF;[{ "Type": "Ret", "Operands": ["0xFFFF"] }]
|
||||
|
||||
# RETF (opcode CB) - Far return to calling procedure
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 7.
|
@ -3,50 +3,50 @@
|
||||
RawBytes;Instructions
|
||||
|
||||
# MOVS - Move string
|
||||
A4;[{ "Type": "MovsB", "Operands": [] }]
|
||||
A4;[{ "Type": "MovsB", "Operands": ["byte ptr es:[edi]", "byte ptr ds:[esi]"] }]
|
||||
A5;[{ "Type": "MovsD", "Operands": ["dword ptr es:[edi]", "dword ptr ds:[esi]"] }]
|
||||
66A5;[{ "Type": "MovsW", "Operands": [] }]
|
||||
66A5;[{ "Type": "MovsW", "Operands": ["word ptr es:[edi]", "byte ptr es:[esi]"] }]
|
||||
|
||||
# CMPS - Compare string
|
||||
A6;[{ "Type": "CmpsB", "Operands": [] }]
|
||||
A7;[{ "Type": "CmpsD", "Operands": [] }]
|
||||
66A7;[{ "Type": "CmpsW", "Operands": [] }]
|
||||
A6;[{ "Type": "CmpsB", "Operands": ["byte ptr es:[esi]", "byte ptr es:[edi]"] }]
|
||||
A7;[{ "Type": "CmpsD", "Operands": ["dword ptr es:[esi]", "dword ptr es:[edi]"] }]
|
||||
66A7;[{ "Type": "CmpsW", "Operands": ["word ptr es:[esi]", "word ptr es:[edi]"] }]
|
||||
|
||||
# SCAS - Scan string
|
||||
AE;[{ "Type": "ScasB", "Operands": [] }]
|
||||
AF;[{ "Type": "ScasD", "Operands": [] }]
|
||||
66AF;[{ "Type": "ScasW", "Operands": [] }]
|
||||
AE;[{ "Type": "ScasB", "Operands": ["al", "byte ptr es:[edi]"] }]
|
||||
AF;[{ "Type": "ScasD", "Operands": ["eax", "dword ptr es:[edi]"] }]
|
||||
66AF;[{ "Type": "ScasW", "Operands": ["ax", "word ptr es:[edi]"] }]
|
||||
|
||||
# LODS - Load string
|
||||
AC;[{ "Type": "LodsB", "Operands": [] }]
|
||||
AD;[{ "Type": "LodsD", "Operands": [] }]
|
||||
66AD;[{ "Type": "LodsW", "Operands": [] }]
|
||||
AC;[{ "Type": "LodsB", "Operands": ["al", "byte ptr es:[esi]"] }]
|
||||
AD;[{ "Type": "LodsD", "Operands": ["eax", "dword ptr es:[esi]"] }]
|
||||
66AD;[{ "Type": "LodsW", "Operands": ["ax", "byte ptr es:[esi]"] }]
|
||||
|
||||
# STOS - Store string
|
||||
AA;[{ "Type": "StosB", "Operands": [] }]
|
||||
AB;[{ "Type": "StosD", "Operands": [] }]
|
||||
66AB;[{ "Type": "StosW", "Operands": [] }]
|
||||
AA;[{ "Type": "StosB", "Operands": ["byte ptr es:[edi]", "al"] }]
|
||||
AB;[{ "Type": "StosD", "Operands": ["dword ptr es:[edi]", "eax"] }]
|
||||
66AB;[{ "Type": "StosW", "Operands": ["word ptr es:[edi]", "ax"] }]
|
||||
|
||||
# REP prefix with string instructions
|
||||
F3A4;[{ "Type": "RepMovsB", "Operands": ["dword ptr es:[edi]", "dword ptr ds:[esi]"] }]
|
||||
F3A4;[{ "Type": "RepMovsB", "Operands": ["byte ptr es:[edi]", "byte ptr ds:[esi]"] }]
|
||||
F3A5;[{ "Type": "RepMovsD", "Operands": ["dword ptr es:[edi]", "dword ptr ds:[esi]"] }]
|
||||
F366A5;[{ "Type": "RepMovsW", "Operands": ["dword ptr es:[edi]", "dword ptr ds:[esi]"] }]
|
||||
F3AA;[{ "Type": "RepStosB", "Operands": ["dword ptr es:[edi]"] }]
|
||||
F3AB;[{ "Type": "RepStosD", "Operands": ["dword ptr es:[edi]"] }]
|
||||
F366AB;[{ "Type": "RepStosW", "Operands": ["dword ptr es:[edi]"] }]
|
||||
F366A5;[{ "Type": "RepMovsW", "Operands": ["word ptr es:[edi]", "word ptr ds:[esi]"] }]
|
||||
F3AA;[{ "Type": "RepStosB", "Operands": ["byte ptr es:[edi]", "al"] }]
|
||||
F3AB;[{ "Type": "RepStosD", "Operands": ["dword ptr es:[edi]", "eax"] }]
|
||||
F366AB;[{ "Type": "RepStosW", "Operands": ["word ptr es:[edi]", "ax"] }]
|
||||
|
||||
# REPE/REPZ prefix with string instructions
|
||||
F3A6;[{ "Type": "RepeCmpsB", "Operands": [] }]
|
||||
F3A7;[{ "Type": "RepeCmpsD", "Operands": [] }]
|
||||
F366A7;[{ "Type": "RepeCmpsW", "Operands": [] }]
|
||||
F3AE;[{ "Type": "RepScasB", "Operands": [] }]
|
||||
F3AF;[{ "Type": "RepScasD", "Operands": [] }]
|
||||
F366AF;[{ "Type": "RepScasW", "Operands": [] }]
|
||||
F3A6;[{ "Type": "RepeCmpsB", "Operands": ["byte ptr es:[esi]", "byte ptr es:[edi]"] }]
|
||||
F3A7;[{ "Type": "RepeCmpsD", "Operands": ["dword ptr es:[esi]", "byte ptr es:[edi]"] }]
|
||||
F366A7;[{ "Type": "RepeCmpsW", "Operands": ["word ptr es:[esi]", "word ptr es:[edi]"] }]
|
||||
F3AE;[{ "Type": "RepScasB", "Operands": ["al", "byte ptr es:[edi]"] }]
|
||||
F3AF;[{ "Type": "RepScasD", "Operands": ["eax", "dword ptr es:[edi]"] }]
|
||||
F366AF;[{ "Type": "RepScasW", "Operands": ["ax", "word ptr es:[edi]"] }]
|
||||
|
||||
# REPNE/REPNZ prefix with string instructions
|
||||
F2A6;[{ "Type": "RepneCmpsB", "Operands": [] }]
|
||||
F2A7;[{ "Type": "RepneCmpsD", "Operands": [] }]
|
||||
F266A7;[{ "Type": "RepneCmpsW", "Operands": [] }]
|
||||
F2AE;[{ "Type": "RepneScasB", "Operands": [] }]
|
||||
F2AF;[{ "Type": "RepneScasD", "Operands": [] }]
|
||||
F266AF;[{ "Type": "RepneScasW", "Operands": [] }]
|
||||
F2A6;[{ "Type": "RepneCmpsB", "Operands": ["byte ptr es:[esi]", "byte ptr es:[edi]"] }]
|
||||
F2A7;[{ "Type": "RepneCmpsD", "Operands": ["dword ptr es:[esi]", "dword ptr es:[edi]"] }]
|
||||
F266A7;[{ "Type": "RepneCmpsW", "Operands": ["word ptr es:[esi]", "word ptr es:[edi]"] }]
|
||||
F2AE;[{ "Type": "RepneScasB", "Operands": ["al", "byte ptr es:[edi]"] }]
|
||||
F2AF;[{ "Type": "RepneScasD", "Operands": ["eax", "byte ptr es:[edi]"] }]
|
||||
F266AF;[{ "Type": "RepneScasW", "Operands": ["eax", "byte ptr es:[edi]"] }]
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 7.
|
@ -21,4 +21,4 @@ F7C378563412;[{ "Type": "Test", "Operands": ["ebx", "0x12345678"] }]
|
||||
# TEST with memory operands
|
||||
F60042;[{ "Type": "Test", "Operands": ["byte ptr [eax]", "0x42"] }]
|
||||
F70078563412;[{ "Type": "Test", "Operands": ["dword ptr [eax]", "0x12345678"] }]
|
||||
854510;[{ "Type": "Test", "Operands": ["dword ptr [eax+0x10]", "eax"] }]
|
||||
854510;[{ "Type": "Test", "Operands": ["dword ptr [ebp+0x10]", "eax"] }]
|
||||
|
Can't render this file because it contains an unexpected character in line 6 and column 11.
|
Reference in New Issue
Block a user