- Code: Select all
00DAD8C5 | 8B56 08 | MOV EDX, DWORD PTR [ESI+8] |
00DAD8C8 | 8B52 04 | MOV EDX, DWORD PTR [EDX+4] |
00DAD8CB | 8B69 10 | MOV EBP, DWORD PTR [ECX+10] | ;---> This is where i want to inject my code
00DAD8CE | 012C97 | ADD DWORD PTR [EDI+EDX*4], EBP |
And here’s my code in Auto-Assemble window: (all comments were removed & added line numbers)
- Code: Select all
1: Alloc( MyCode, 2048 )
2: Label( OverwrittenCode )
3: Label( Exit )
4: Label( Return )
5:
6: FullAccess( S2DNG.exe+0x009AD8CB, 2048 )
7: S2DNG.exe+0x009AD8CB :
8: jmp MyCode
9: nop
10: Return :
11:
12:
13: MyCode :
14: cmp edx, 0
15: jne OverwrittenCode
16: mov dword ptr [ecx+10], 00001388
17:
18:
19: OverwrittenCode :
20: mov ebp, dword ptr [ecx+10]
21: add dword ptr [edi+edx*4], ebp
22:
23:
24: Exit :
25: jmp Return
Upon pressing next, i get this error: “Error on line 21: Too many registers.”
The code ADD DWORD PTR [EDI+EDX*4], EBP was not mine, but still MHS
takes it as an error...
Thank you very much in advance.