--- /dev/null
+
+manual adjust:
+- (exe only) find constants in .text that are actually pointers
+ (adjust as needed):
+ [456][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F]h
+ _[456][0-9A-F][0-9A-F][0-9A-F][0-9A-F][0-9A-F]\+
+- get rid of function chunks where possible (they're usually tailcalls)
+- search for 'dword_xx+N', make byte/word, also word->byte
+- convert ds:0[eax*4] -> [eax*4+0] (h hotkey)
s/\<jmp\tsub_/jmp\tnear ptr sub_/;\
' $1" >> $f
. $f
-
-# manual fixup:
-# - 'end start' -> 'end'
-# - 'mov edi, edi', 'lea ...' -> align
-# - add 'near ptr' to some jumps
-# - 'cmp [ebp+edx+0], cl' -> 'cmp [ebp+edx*1+0], cl'
-# - 0FFxxh constants - masm treats a byte, ONLY sometimes prefix with 'word ptr'
-# - jmp near:
-# - jmp _strchr
-# - search for 'dword_xx+N', make byte/word, also word->byte
-# - get rid of type propagation, regenerate as 'simple' var_
-# - convert ds:0[eax*4] -> [eax*4+0] (h hotkey)
-# - rm function chunks - they're funcs reached by tailcalls (usually)