Alcostg/Binary hacks

From Touhou Patch Center
Jump to navigation Jump to search

Bugs

Fix buffer overflow in spell name rendering (replace pointer)
(overflow_spell_rep)
Description ... taking advantage of the fact that EBX still contains the original pointer.
Address
v1.00a0x443c67
Code
90 90 90 90
nop (*4)

Spells

Spell card alignment
(spell_align)
Description Once again, everything in one hack.
Address
v1.00a0x443bf9
Code
8b9ce4 a0000000
8b8e 64030000
8b7e 70
d1e9
83e1 01
51
ffb4e4 a0000000
ff35 00e24800
53
e8 [GetTextExtentForFont]
83c0 04
50
db04e4
58
eb 24
90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90
85c0
mov ebx,dword ptr ss:[esp+0A0]     ; we'll need this twice
mov ecx,dword ptr ds:[esi+364]
mov edi,dword ptr ds:[esi+70]
shr ecx,1
and ecx,00000001
push ecx
push dword ptr ss:[esp+0A0]        ; not EBX!
push dword ptr ds:[alcostg.48e200] ; spell font
push ebx
call [GetTextExtentForFont]
add eax,4
push eax
fild dword ptr ss:[esp]
pop eax
jmp short +0x24
nop (*0x24)



test eax,eax