home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / MISC / ARTFIX09.ZIP / NETMGR / NETMGRP.PSC < prev   
Text File  |  1999-08-28  |  8KB  |  216 lines

  1. ;
  2. ; ==========================================================================
  3. ;               Patch script for NetMgr/2 v1.00 (OS/2 Version)
  4. ;                      Version 1.05 - 28. Aug 1999
  5. ;
  6. ;    Created by Wilfried Brinkmann, Fido 2:24/600, e-mail tsc@cityweb.de
  7. ; ==========================================================================
  8. ;
  9. ; NOTE: This patch script will modify netmgrp.exe and add a lot of new
  10. ;       routines to handle the necessary modifications.
  11. ;       There is no additional program required to run the patched
  12. ;       netmgrp.exe!
  13. ;
  14. ;       If you wish to understand this patch, you will want to see what
  15. ;       the added service routines do. The source code is added as comment.
  16.  
  17. SIZE 145941                ; filesize netmgrp.exe
  18. ;
  19. COPY UNPATCH\NETMGRP.EXE   ; make a backup copy in <NetMgrPath>\unpatch
  20. ;
  21. ; ---------------------------------------------------------------------------
  22. ; Fix for the header text in bounced messages (and other places)
  23. ;
  24. VER 0508A FF7114+          ; push     dword ptr [ecx+14]
  25.           C1E002           ; shl      eax,02
  26.           ;
  27. CHA $     E8D1430000+      ; call     +000043D1 (00009460)
  28.           90               ; nop
  29. ;
  30. ; --------------------------------------------------------------------------
  31. ; Fix for writing PKT FTSC date field
  32. ;
  33. VER 0A429 C1E002+          ; shl      eax,02
  34.           FF7214           ; push     dword ptr [edx+14]
  35.           ;
  36. CHA $     E83BF0FFFF+      ; call     -00000FC5 (00009469)
  37.           90               ; nop
  38. ;
  39. ; ---------------------------------------------------------------------------
  40. ; Fix interpretation of a two digit year number when reading Squish and
  41. ; *.MSG style message bases.
  42. ;
  43. VER 101D4 FF7014+          ; push     dword ptr [eax+14]
  44.           89C1             ; mov      ecx,eax
  45.           ;
  46. CHA $     E89E92FFFF       ; call     -00006D62 (00009477)
  47. ;
  48. ; --------------------------------------------------------------------------
  49. ; Fix for writing Squish FTSC date field
  50. ;
  51. VER 1339A C1E202+          ; shl      edx,02
  52.           FF7014           ; push     dword ptr [eax+14]
  53.           ;
  54. CHA $     E8D360FFFF+      ; call     -00009F2D (00009472)
  55.           90               ; nop
  56. ;
  57. ; --------------------------------------------------------------------------
  58. ; Fix for writing *.MSG FTSC date field
  59. ;
  60. VER 15F1E C1E202+          ; shl      edx,02
  61.           FF7014           ; push     dword ptr [eax+14]
  62.           ;
  63. CHA $     E84F35FFFF+      ; call     -0000CAB1 (00009472)
  64.           90               ; nop
  65. ;
  66. ;
  67. ; The routine that has been added for the five patches from above.
  68. ; This routine is called when writing a FTSC date stamp.
  69. ; It prevents the 2 digit date field from spilling (without the modulo 100
  70. ; operation, "100" would be written there in the year 2000 instead of 00).
  71. ;
  72. VER 09460 000000000000000000000000000000+
  73.           000000000000000000000000000000+
  74.           000000000000000000000000000000+
  75.           00000000
  76.           ;
  77. CHA $     C1E002+          ; shl      eax,02
  78.           50+              ; push     eax
  79.           8B4114+          ; mov      eax,[ecx+14]
  80.           EB14+            ; jmp      +14 (0000947D)
  81.           ;
  82. @09469:   C1E002+          ; shl      eax,02
  83.           50+              ; push     eax
  84.           8B4214+          ; mov      eax,[edx+14]
  85.           EB0B+            ; jmp      +0B (0000947D)
  86.           ;
  87. @09472:   C1E202+          ; shl      edx,02
  88.           EB02+            ; jmp      +02 (00009479)
  89.           ;
  90. @09477:   89C1+            ; mov      ecx,eax
  91.           ;
  92. @09479:   50+              ; push     eax
  93.           8B4014+          ; mov      eax,[eax+14]
  94.           ;
  95. @0947D:   51+              ; push     ecx
  96.           52+              ; push     edx
  97.           31C9+            ; xor      ecx,ecx
  98.           B164+            ; mov      cl,64
  99.           99+              ; cwd
  100.           F7F9+            ; idiv     ecx
  101.           92+              ; xchg     edx,eax
  102.           5A+              ; pop      edx
  103.           59+              ; pop      ecx
  104.           87442404+        ; xchg     [esp+04],eax
  105.           870424+          ; xchg     [esp],eax
  106.           C3               ; ret
  107. ;
  108. ; --------------------------------------------------------------------------
  109. ; Fix incorrect interpretation of a hudson time stamp which led to
  110. ; totally wrong display of a hudson message date after 2000.
  111. ;
  112. VER 0FCFA 0FB745F8+        ; movzx    eax,[ebp-08]
  113.           8945E0           ; mov      [ebp-20],eax
  114.           ;
  115. CHA $     E8C1EAFFFF+      ; call     -0000153F (0000E7C0)
  116.           90+              ; nop
  117.           90               ; nop
  118. ;
  119. ;
  120. ; The routine that has been added for the patch from above.
  121. ; This routine is called when reading a message from the Hudson HMB.
  122. ; The date that is in [ebp-08] is a two digit year number, but we want
  123. ; to have a "tm.tm-year" style year number in eax. Therefore, we check
  124. ; if the value is smaller than 80, and if so, we assume that it is in
  125. ; the 21st century and therefore add 100 to it. This makes HMB save
  126. ; until 31-12-2079.
  127. ;
  128. VER 0E7C0 00000000000000000000000000000000
  129.           ;
  130. CHA $     0FB745F8+        ; movzx    eax,[ebp-08]
  131.           83F850+          ; cmp      eax,50
  132.           7703+            ; jnbe     +03 (0000E7CC)
  133.           83C064+          ; add      eax,64
  134. @0E7CC:   8945E0+          ; mov      [ebp-20],eax
  135.           C3               ; ret
  136. ;
  137. ; ---------------------------------------------------------------------------
  138. ; Fix interpretation of a two digit year number when reading Squish and
  139. ; *.MSG style message bases.
  140. ;
  141. VER 1C305 83E850+          ; sub      eax,50
  142.           30E4             ; xor      ah,ah
  143.           ;
  144. CHA $     E8C624FFFF       ; call     -0000DB3A (0000E7D0)
  145. ;
  146. ;
  147. ; The routine that has been added for the patch from above.
  148. ; Convert a two digit year number that has is stored in eax into a DOS time
  149. ; compliant year number (which gives the number of years that have been passed
  150. ; since 1980). The method we use is save until 2080. Prevent wrong binary t
  151. ; imestamps (TimEd derives them from the two digit FTSC date) in Squish and
  152. ; MSG areas.
  153. ;
  154. VER 0E7D0 0000000000000000000000
  155.           ;
  156. CHA $     83E850+          ; sub      eax,50
  157.           7703+            ; jnbe     +03 (0000E7D8)
  158.           83C064+          ; add      eax,64
  159. @0E7D8:   30E4+            ; xor      ah,ah
  160.           C3               ; ret
  161. ;
  162. ; --------------------------------------------------------------------------
  163. ; Fix incorrect dates in replies generated with a template containing
  164. ; the %year token.  Previously, a three digit year number was pushed to
  165. ; the stack.
  166. ;
  167. VER 0570B FF7714+          ; push     dword ptr [edi+14]
  168.           68E5120400       ; push     000412E5
  169.           ;
  170. CHA $     E8CB900000+      ; call     +000090CB (0000E7DB)
  171.           90+              ; nop
  172.           90+              ; nop
  173.           90               ; nop
  174. ;
  175. ;
  176. ; The routine that has been added for the patch from above.
  177. ; This routine is called from the patch from above when writing the day number
  178. ; for a %year variable in a message template. We have patched the executable
  179. ; to use %4.4i instead of 19%2.2i as sprintf format string, so we have to
  180. ; push a four digit year number now.
  181. ;
  182. VER 0E7DB 000000000000000000000000000000000000
  183.           ;
  184. CHA $     8B4714+          ; mov      eax,[edi+14]
  185.           056C070000+      ; add      eax,0000076C
  186.           870424+          ; xchg     [esp],eax
  187.           68E5120400+      ; push     000412E5
  188.           50+              ; push     eax
  189.           C3               ; ret
  190.           ;
  191. VER 1FD9A 313925322E326900 ; db "19%2.2i",0
  192.           ;
  193. CHA $     25342E3469000000 ; db "%4.4i",0,0,0
  194. ;
  195. ;Change version numbers from 1.00 to 1.0y
  196. VER 1EAFB    30
  197. CHA $        79
  198. VER 1EF30    30
  199. CHA $        79
  200. VER 1EF5C    30
  201. CHA $        79
  202. VER 1EF73    30
  203. CHA $        79
  204. VER 1F040    30
  205. CHA $        79
  206. VER 1F0D2    30
  207. CHA $        79
  208. VER 2102C    30
  209. CHA $        79
  210. VER 214C3    30
  211. CHA $        79
  212. ;
  213. ; Done!
  214. ;
  215.  
  216.