SHARE
TWEET

v0.34.11 linux: fix 5907 reliably

a guest Jul 4th, 2012 166 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Original code:
  2.  
  3. .text:087AC378                 cmp     edx, eax
  4. .text:087AC37A                 mov     [esp+4Ch], eax
  5. .text:087AC37E                 jnb     loc_87A7034
  6. .text:087AC384                 mov     [esp+48h], edx
  7. .text:087AC388                 mov     [esp+54h], ebx
  8. ...
  9. .text:087AC440                 add     dword ptr [esp+48h], 4
  10. .text:087AC445                 mov     ebp, [esp+48h]
  11. .text:087AC449                 cmp     [esp+4Ch], ebp
  12. .text:087AC44D                 ja      loc_87AC38C
  13.  
  14. Patch:
  15.  
  16. 0x76437a
  17. 89 44 24 4C
  18. 89 54 24 4C
  19.  
  20. .text:087AC37A                 mov     [esp+4Ch], edx
  21.  
  22. 0x764384
  23. 89 54 24 48  89 5C 24 54
  24. E8 8A 51 8A  FF 90 90 90
  25.  
  26. .text:087AC384                 call    sub_8051513
  27. .text:087AC389                 nop
  28. .text:087AC38A                 nop
  29. .text:087AC38B                 nop
  30.  
  31. 0x764440
  32. 83 44 24 48 04 8B 6C 24  48 39 6C 24 4C 0F 87 39  FF FF FF
  33. 83 6C 24 48 04 8B 6C 24  48 39 6C 24 4C 0F 86 39  FF FF FF
  34.  
  35. .text:087AC440                 sub     dword ptr [esp+48h], 4
  36. .text:087AC445                 mov     ebp, [esp+48h]
  37. .text:087AC449                 cmp     [esp+4Ch], ebp
  38. .text:087AC44D                 jbe     loc_87AC38C
  39.  
  40. 0x9513
  41. 90 90 90 90 90  90 90 90 90 90 90 90 90
  42. 83 E8 04 89 44  24 4C 89 5C 24 58 C3 90
  43.  
  44. .text:08051513 sub_8051513     proc near
  45. .text:08051513                 sub     eax, 4
  46. .text:08051516                 mov     [esp+4Ch], eax ; 48h
  47. .text:0805151A                 mov     [esp+58h], ebx ; 54h
  48. .text:0805151E                 retn
  49. .text:0805151E sub_8051513     endp
  50.  
  51.  
  52. You can use this script to apply the generated patch below:
  53. http://stalkr.net/files/ida/idadif.py
  54.  
  55. ----8<----
  56. This difference file is created by The Interactive Disassembler
  57.  
  58. Dwarf_Fortress
  59. 00009513: 90 83
  60. 00009514: 90 E8
  61. 00009515: 90 04
  62. 00009516: 90 89
  63. 00009517: 90 44
  64. 00009518: 90 24
  65. 00009519: 90 4C
  66. 0000951A: 90 89
  67. 0000951B: 90 5C
  68. 0000951C: 90 24
  69. 0000951D: 90 58
  70. 0000951E: 90 C3
  71. 0076437B: 44 54
  72. 00764384: 89 E8
  73. 00764385: 54 8A
  74. 00764386: 24 51
  75. 00764387: 48 8A
  76. 00764388: 89 FF
  77. 00764389: 5C 90
  78. 0076438A: 24 90
  79. 0076438B: 54 90
  80. 00764441: 44 6C
  81. 0076444E: 87 86
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top