Comparing files s_and_r.dll#v2.5.orig 06.02.2006 20:27:58 and s_and_r.dll#patched
; s_and_r.dll#v2.5.orig {258048} == MD5 03aa533f99b4ec9c467257b40dc2c0e9
;
; Patch "Can't allocate memory!" error
000161B9: 02 18
000161BA: 89 80
000161BB: 55 FA
000161BC: FC 08  ; 128 MB (highest byte of dword) is limit
000161BD: 8B 72
000161BE: 4D 02
000161BF: FC B2
000161C0: 3B 08  ; 128 MB once more
000161C1: 0D B8
000161C6: 76 C1
000161C7: 05 E2
000161C8: 8D 16  ; now size >>= 0x18-0x16, i.e. size /= 4 (128 MB -> 32 MB)
000161C9: 45 3B
000161CA: FC 10
000161CB: EB 73
000161CC: 05 07
;
; Compatibility patch for FAR 2.x History - catches recent string from built-in F7 Search. Allocates 8k (0x2000 bytes) on stack to read "HKEY_CURRENT_USER\Software\Far2\SavedDialogHistory\SearchText\Lines" MULTI_SZ block
00019BBF: 83 81
00019BC0: C4 EC
00019BC1: F4 0C ; 0x(20)0C is the size of local variables block
00019BC2: 53 20 ; <- high byte part, can be increased to allow working with longer histories
00019BC3: 33 00
00019BC4: DB 00
00019BCD: 67 55
00019BFB: 39 27
00019BFC: C7 33
00019BFD: 45 C9
00019BFE: F4 B5
00019BFF: 00 20 ; <- must be equal to high byte part of 0x200C (see above)
00019C00: 02 8D
00019C01: 00 45
00019C02: 00 F4
00019C03: 8D 89
00019C04: 45 08
00019C05: F4 8B
00019C06: 8D D4
00019C07: 4D 90
00019C08: F8 50
00019C09: 50 52
00019C0A: 8B 6A
00019C0B: 55 00
00019C0C: 0C 6A
00019C0D: 52 00
00019C0E: 51 8B
00019C0F: 6A 45
00019C10: 00 FC
00019C16: 8B 50
00019C17: 45 E8
00019C18: FC CE
00019C19: 50 D4
00019C1A: E8 01
00019C1B: CB 00
00019C1C: D4 90
00019C1D: 01 90
00019C1E: 00 E9
00019C1F: 8B 71
00019C20: D8 02
00019C21: 8B 00
00019C22: 45 00
00019C23: FC 8B
00019C24: 50 45
00019C25: E8 10
00019C26: 66 85
00019C27: FC C0
00019C28: FF 53
00019C29: FF 0F
00019C2A: 59 94
00019C2B: 85 C7
00019C2C: DB 8B
00019C2D: 0F 55
00019C2E: 94 0C
00019C2F: C2 33
00019C30: 83 C9
00019C31: E2 B5
00019C32: 01 02
00019C33: 8B 32
00019C34: DA DB
00019C35: 85 49
00019C36: DB 7E
00019C37: 75 02
00019C38: 0D 8A
00019C39: 8B 18
00019C3A: 4D 88
00019C3B: 10 1A
00019C3C: 51 40
00019C3D: 8B 42
00019C3E: 45 84
00019C3F: 0C DB
00019C40: 50 75
00019C41: E8 F1
00019C42: 00 90
00019C43: D3 90
00019C44: 01 90
00019C45: 00 90
00019C46: 8B 90
00019C47: C3 90
00019C48: 5B 0F
00019C49: 8B B6
00019C4A: E5 C7
00019C4B: 5D 5B
00019C4C: C3 8B
00019C4D: 90 E5
00019C4E: 90 5D
00019C4F: 90 C3
; some struct initialization code converted to compact form, to free code space
00019E81: 89 6A
00019E82: 85 0A
00019E83: 50 59
00019E84: FF 57
00019E85: FF 8D
00019E86: FF BD
00019E87: 33 50
00019E88: C9 FF
00019E89: C7 FF
00019E8A: 85 FF
00019E8B: 54 F3
00019E8C: FF AB
00019E8D: FF 48
00019E8E: FF AB
00019E8F: 00 AB
00019E90: 00 40
00019E91: 00 5F
00019E92: 00 EB
00019E93: C7 67
; new code block insertion begins here, we need to call CharToOemA() because FAR "Line0" uses OEM, but FAR2 "Lines" are Unicode converted to ANSI (thus we cannot correctly treat OEM characters not present in ANSI; need to allocate twice more bytes in stack and call RegQueryValueExW(), but Import Table does not contain the latter)
00019E94: 85 50
00019E95: 58 FF
00019E96: FF 75
00019E97: FF FC
00019E98: FF E8
00019E99: 00 F3
00019E9A: 00 F9
00019E9B: 00 FF
00019E9C: 00 FF
00019E9D: C7 59
00019E9E: 85 58
00019E9F: 5C 85
00019EA0: FF C0
00019EA1: FF 74
00019EA2: FF 05
00019EA3: 00 E9
00019EA4: 00 7B
00019EA5: 00 FD
00019EA6: 00 FF
00019EA7: C7 FF
00019EA8: 85 8B
00019EA9: 60 C4
00019EAA: FF 50
00019EAB: FF 50
00019EAC: FF E8
00019EAD: 00 7B
00019EAE: 00 D2
00019EAF: 00 01
00019EB1: C7 33
00019EB2: 85 C9
00019EB3: 64 8B
00019EB4: FF C4
00019EB5: FF E9
00019EB6: FF 6E
00019EB7: 00 FD
00019EB8: 00 FF
00019EB9: 00 FF
; freed/unused code space
00019EBA: 00 90
00019EBB: C7 90
00019EBC: 85 90
00019EBD: 68 90
00019EBE: FF 90
00019EBF: FF 90
00019EC0: FF 90
00019EC1: 00 90
00019EC2: 00 90
00019EC3: 00 90
00019EC4: 00 90
00019EC5: 89 90
00019EC6: 95 90
00019EC7: 6C 90
00019EC8: FF 90
00019EC9: FF 90
00019ECA: FF 90
00019ECB: 33 90
00019ECC: C0 90
00019ECD: 89 90
00019ECE: 8D 90
00019ECF: 70 90
00019ED0: FF 90
00019ED1: FF 90
00019ED2: FF 90
00019ED3: 89 90
00019ED4: 85 90
00019ED5: 74 90
00019ED6: FF 90
00019ED7: FF 90
00019ED8: FF 90
00019ED9: C7 90
00019EDA: 85 90
00019EDB: 78 90
00019EDC: FF 90
00019EDD: FF 90
00019EDE: FF 90
00019EDF: FF 90
00019EE0: FF 90
00019EE1: FF 90
00019EE2: FF 90
00019EE3: C7 90
00019EE4: 85 90
00019EE5: 7C 90
00019EE6: FF 90
00019EE7: FF 90
00019EE8: FF 90
00019EE9: FF 90
00019EEA: FF 90
00019EEB: FF 90
00019EEC: FF 90
00019EED: 33 90
00019EEE: D2 90
00019EEF: 83 90
00019EF0: 3D 90
00019EF1: BC 90
00019EF2: EF 90
00019EF3: 43 90
00019EF4: 00 90
00019EF5: 00 90
00019EF6: 89 90
00019EF7: 95 90
00019EF8: 74 90
00019EF9: FF 90
00019EFA: FF 90
; some struct initialization code converted to compact form, to free code space
00019EFB: FF 83
00019EFC: 89 3D
00019EFD: 95 BC
00019EFE: 70 EF
00019EFF: FF 43
00019F00: FF 00
00019F01: FF 00
; change string "Line0" to "Lines"
000397EC: 30 73 ; '0' to 's'
