Advertisement
Guest User

v0.34.11 windows: fix 5907 reliably

a guest
Jul 4th, 2012
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. Original code:
  2.  
  3. .text:008629BD mov edi, [eax+38h]
  4. .text:008629C0 mov eax, [eax+3Ch]
  5. .text:008629C3 mov [esp+1Ch], eax
  6. .text:008629C7 cmp edi, eax
  7. .text:008629C9 jnb short loc_862A22
  8. .text:008629CB jmp short loc_8629D0
  9. .text:008629CD lea ecx, [ecx+0]
  10. ...
  11. .text:00862A19 add edi, 4
  12. .text:00862A1C cmp edi, [esp+1Ch]
  13. .text:00862A20 jb short loc_8629D0
  14.  
  15. Patch:
  16.  
  17. 0x461dbd
  18. 8B 78 38 8B 40 3C 89 44 24 1C 3B F8
  19. 8B 78 3C 8B 40 38 89 44 24 1C 39 F8
  20.  
  21. .text:008629BD mov edi, [eax+3Ch]
  22. .text:008629C0 mov eax, [eax+38h]
  23. .text:008629C3 mov [esp+1Ch], eax
  24. .text:008629C7 cmp eax, edi
  25.  
  26. 0x461dcb
  27. EB 03 8D 49 00
  28. 83 EF 04 90 90
  29.  
  30. .text:008629CB sub edi, 4
  31. .text:008629CE nop
  32. .text:008629CF nop
  33.  
  34. 0x461e19
  35. 83 C7 04 3B 7C 24 1C 72 AE
  36. 83 EF 04 3B 7C 24 1C 73 AE
  37.  
  38. .text:00862A19 sub edi, 4
  39. .text:00862A1C cmp edi, [esp+1Ch]
  40. .text:00862A20 jnb short loc_8629D0
  41.  
  42.  
  43. You can use this script to apply the generated patch below:
  44. http://stalkr.net/files/ida/idadif.py
  45.  
  46. ----8<----
  47. This difference file is created by The Interactive Disassembler
  48.  
  49. Dwarf_Fortress
  50. 00461DBF: 38 3C
  51. 00461DC2: 3C 38
  52. 00461DC7: 3B 39
  53. 00461DCB: EB 83
  54. 00461DCC: 03 EF
  55. 00461DCD: 8D 04
  56. 00461DCE: 49 90
  57. 00461DCF: 00 90
  58. 00461E1A: C7 EF
  59. 00461E20: 72 73
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement