Advertisement
Guest User

DF windows: custom reaction reagent use

a guest
Sep 16th, 2012
675
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. Original code:
  2.  
  3. .text:00916BCE mov edi, ebp
  4. .text:00916BD0 call eax
  5. .text:00916BD2 test eax, eax
  6. .text:00916BD4 jnz short loc_916C1C
  7.  
  8. .text:00916C0A mov edi, ebp
  9.  
  10. .text:00916C14 mov edi, ebp
  11.  
  12. Patch:
  13.  
  14. 0x2ac34:
  15. CC CC CC CC CC CC CC CC CC CC CC CC
  16. 8B 7C 24 78 8B 3C B7 FF D0 EB 25 CC
  17.  
  18. .text:0042B834 loc_42B834:
  19. .text:0042B834 mov edi, [esp+78h]
  20. .text:0042B838 mov edi, [edi+esi*4]
  21. .text:0042B83B call eax
  22. .text:0042B83D jmp short unk_42B864
  23.  
  24. 0x2ac64
  25. CC CC CC CC CC CC CC CC CC CC CC CC
  26. 85 C0 E9 69 B3 4E 00 CC CC CC CC CC
  27.  
  28. .text:0042B864 loc_42B864:
  29. .text:0042B864 test eax, eax
  30. .text:0042B866 jmp loc_916BD4
  31.  
  32. 0x515fce
  33. 8B FD FF D0 85 C0
  34. E9 61 4C B1 FF 90
  35.  
  36. .text:00916BCE jmp loc_42B834
  37. .text:00916BD3 nop
  38. .text:00916BD4 loc_916BD4:
  39.  
  40. 0x51600a
  41. 8B FD
  42. 90 90
  43.  
  44. .text:00916C0A nop
  45. .text:00916C0B nop
  46.  
  47. 0x516014
  48. 8B FD
  49. 90 90
  50.  
  51. .text:00916C14 nop
  52. .text:00916C15 nop
  53.  
  54.  
  55. You can use this script to apply the generated patch below:
  56. http://stalkr.net/files/ida/idadif.py
  57.  
  58. ----8<----
  59. This difference file is created by The Interactive Disassembler
  60.  
  61. Dwarf Fortress.exe
  62. 0002AC34: CC 8B
  63. 0002AC35: CC 7C
  64. 0002AC36: CC 24
  65. 0002AC37: CC 78
  66. 0002AC38: CC 8B
  67. 0002AC39: CC 3C
  68. 0002AC3A: CC B7
  69. 0002AC3B: CC FF
  70. 0002AC3C: CC D0
  71. 0002AC3D: CC EB
  72. 0002AC3E: CC 25
  73. 0002AC64: CC 85
  74. 0002AC65: CC C0
  75. 0002AC66: CC E9
  76. 0002AC67: CC 69
  77. 0002AC68: CC B3
  78. 0002AC69: CC 4E
  79. 0002AC6A: CC 00
  80. 00515FCE: 8B E9
  81. 00515FCF: FD 61
  82. 00515FD0: FF 4C
  83. 00515FD1: D0 B1
  84. 00515FD2: 85 FF
  85. 00515FD3: C0 90
  86. 0051600A: 8B 90
  87. 0051600B: FD 90
  88. 00516014: 8B 90
  89. 00516015: FD 90
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement