Fix alpha_uppercase:

dec -> mod (in accordance with +/- offset ability)
    remove 0x37 from mod suffix, which is unnecessary and screwing the fixups by one char


git-svn-id: file:///home/svn/incoming/trunk@3602 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
pusscat 2006-04-20 14:35:18 +00:00
parent 7e0f539b12
commit 44b14f01cb
1 changed files with 10 additions and 10 deletions

View File

@ -17,23 +17,23 @@ class AlphaUpper < Generic
# use inc ebx as a nop here so we still pad correctly
if (offset <= 10)
nop = 'C' * offset
mod = 'I' * (10 - offset) + nop + '7QZ' # dec ecx,,, push ecx, pop edx
mod = 'I' * (10 - offset) + nop + 'QZ' # dec ecx,,, push ecx, pop edx
edxmod = 'J' * (11 - offset)
else
mod = 'A' * (offset - 10)
nop = 'C' * (10 - mod.length)
mod += nop + '7QZ'
mod += nop + 'QZ'
edxmod = 'B' * (11 - (offset - 10))
end
regprefix = {
'EAX' => 'PY' + dec, # push eax, pop ecx
'ECX' => 'I' + dec, # dec ecx
'EDX' => edxmod + nop + 'RY', # dec edx,,, push edx, pop ecx
'EBX' => 'SY' + dec, # push ebx, pop ecx
'ESP' => 'TY' + dec, # push esp, pop ecx
'EBP' => 'UY' + dec, # push ebp, pop ecx
'ESI' => 'VY' + dec, # push esi, pop ecx
'EDI' => 'WY' + dec, # push edi, pop edi
'EAX' => 'PY' + mod, # push eax, pop ecx
'ECX' => 'I' + mod, # dec ecx
'EDX' => edxmod + nop + 'RY', # mod edx,,, push edx, pop ecx
'EBX' => 'SY' + mod, # push ebx, pop ecx
'ESP' => 'TY' + mod, # push esp, pop ecx
'EBP' => 'UY' + mod, # push ebp, pop ecx
'ESI' => 'VY' + mod, # push esi, pop ecx
'EDI' => 'WY' + mod, # push edi, pop edi
}
return regprefix[reg]