Th10/Binary hacks

From Touhou Patch Center
Jump to: navigation, search

Bugs

Safe sprintf (call #1)
(sprintf_call_1)
Address
v1.00a0x447a7e, 0x447be9
Code
  1. 50
  2. e8 [strings_vsprintf]
  3. 8944e4 18
  1. push eax
  2. call [strings_vsprintf]
  3. mov dword ptr ss:[esp+0x18],eax
Safe sprintf (call #2)
(sprintf_call_2)
Address
v1.00a0x447b19
Code
  1. 50
  2. e8 [strings_vsprintf]
  3. 8944e4 1c
  1. push eax
  2. call [strings_vsprintf]
  3. mov dword ptr ss:[esp+0x1c],eax
Safe sprintf (replace pointer)
(sprintf_rep)
Address
v1.00a0x447aab, 0x447b7a, 0x447c40
Code
  1. 8b5ce4
  1. mov ebx, dword ptr ss:[esp+

Text alignment

Move enemy text to the left (line 1)
(enemy_text_offset_1)
Description From the English patch.
Address
v1.00a0x41631a
Code
  1. 8d75 60
  1. lea esi, [ebp+60h]
Move enemy text to the left (line 2)
(enemy_text_offset_2)
Description From the English patch.
Address
v1.00a0x416335
Code
  1. 83c0 07
  1. add eax, 7

Spells

Spell card alignment
(spell_align)
Description This time, it just can't be done without killing the strlen() as well. :(
Address
v1.00a0x447b30
Code
  1. 8b8e 60030000
  2. 8bbe 94030000
  3. d1e9
  4. 83e1 01
  5. 51
  6. ffb4e4 a0000000
  7. ff35 a0184900
  8. ff74e4 1c
  9. e8 [GetTextExtentForFont]
  10. 83c0 04
  11. 50
  12. db04e4
  13. 58
  14. 90 90 90 90 90 90
  15. 85c0
  1. mov ecx,dword ptr ds:[esi+0x360]
  2. mov edi,dword ptr ds:[esi+0x394]
  3. shr ecx,1
  4. and ecx,00000001
  5. push ecx
  6. push dword ptr ss:[esp+0x0a0]
  7. push dword ptr ds:[th10.font_spell]
  8. push dword ptr ss:[esp+0x1c]
  9. call [GetTextExtentForFont]
  10. add eax,4
  11. push eax
  12. fild dword ptr ss:[esp]
  13. pop eax
  14. nop (*0x6)
  15. test eax,eax

Player data

Remove spell "alignment" in the result screen
(result_spell_align)
Address
v1.00a0x447c39
Code
  1. 31c0
  1. xor eax,eax