From 13e08967d65f2453861f14fa517d42d77d5ffb05 Mon Sep 17 00:00:00 2001 From: TAC109 <49378716+TAC109@users.noreply.github.com> Date: Sun, 12 Feb 2023 14:39:13 +1300 Subject: [PATCH] BinMod: Save & restore optional registers Use default icon --- BinMod.ahk | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/BinMod.ahk b/BinMod.ahk index 082dc0f..291d0ae 100644 --- a/BinMod.ahk +++ b/BinMod.ahk @@ -1,8 +1,8 @@ - -;@Ahk2Exe-SetVersion 2023.01.30 ; Edition: 30 January 2023 +;@Ahk2Exe-SetVersion 2023.02.12 ; Edition: y.m.d ;@Ahk2Exe-SetCopyright TAC109 ;@Ahk2Exe-SetProductName BinMod ;@Ahk2Exe-SetDescription Binary file editor - see Ahk2Exe's PostExec directive +;@Ahk2Exe-SetMainIcon ; Override any icon saved as default /* BinMod is a simple, fast binary file editor written by TAC109, designed to be called from Ahk2Exe's 'PostExec' compiler directive. Use Ahk2Exe included with @@ -115,7 +115,7 @@ Mes:=">AUTOHOTKEY SCRIPT<", Sa:=PEz:=A1:=Bit:=SG2:=0 SM := "Could not perform /ScriptGuard2 procedure! (" ((A_PtrSize = 8) || !A_IsUnicode) ? ErrMes("Wrong type of AutoHotkey used!`n`n" . "Please compile with a v1.1 32-bit Unicode base file.") : 0 -#Include *i %A_ScriptDir%\BinDbg.ahk ; Debugging only +#Include *i D:\Dropbox\AutoHotKey\BinDbg.ahk ; Debugging only (%false% < 1) ? ErrMes("No parameters supplied!") : 0 FileName := %true% ; 1st parameter is file name FileGetSize Sz, %FileName% @@ -285,26 +285,26 @@ InBuf(hayP, hayS, neeP, neeS, sOff=0) ; Search buffer; returns offset . "758B0375A7F30474C98574C985F84D8BDEDF89D375A6F3045A8B0C558BA4EB087D03447A8B30" . "FE02E9C1484A8B2905E3C1D889C31F03D831078BC3484A8BEF7549AB3F30067403E1838BDB31" . "FA7549474A8B0875032872D8894902E9C13401ADC32905E3C1385A89F37549C345C70774013A" -. "83D68900000132108B207A03187A8B188B08450304424A03184A2BF9890050008108891450B9" +. "83D68900000136108B207A03187A8B188B08450304424A03184A2BF9890050008108891450B9" . "087D03000024E8A4F30000000327C683000000F351034E8B1075C32958AAE9B0A42B205A2B55" -. "EB83E9C0311F89145AC3565EFFFFFEF90000013204EB9011E8036A5756538B61EA83000000D3" -. "8914420320425A03EB1A89C329FE8308728BC3524A8B32031A7400473A030C7A8B106E380A74" -. "A6F34F0000E1E9F674FF8BDB31240CFF00344A8B3203247281344A8902E9C14900000040346A" -. "C32905E3C1D88975344A3BC301AD3B0B7500FB83100000A9850F085A3BDE75490CEB0000009B" -. "850F385A30A164240CFF008B10588B000000F38002588A4473FFDFBB305A0001F88366AD66FF" -. "DF2FF88366247400533DD821ADF27521AD147500430075004900523DD800503DD821AD0A240C" -. "FF5274005403407A8B305A8B02E9C1484A8B3AC32905E3C1D889ABC301D831078B83484A8BEF" -. "7549473F30067403E1033C7A8BFA7549B91A03245A8B3A04C3C1000000083C30040F24D88849" -. "AA0704027C3A835B5E5F58ED75EB90C3017400F856530000014C04000015E8036A57428B61EA" -. "834800D3894814420320EB1A8948C3294808728BC3525A030348207400FE830C7A8B104A8B32" -. "48C7FF483A0348380A74A6F3CFFF00F1E9F474FF6EDB31240CFF00008B32034824728B4A8902" -. "E9C1344A000040346A8134E3C1D889C9FF003BC301ADC3290500FB831075344A850F085A3B0B" -. "75FF0DEB000000B70F385A3BDD75C90CFF000000A8850060A1486765244820588B4800008002" -. "588A78738BDFBB305A0001F38366AD66FFDFFFF88366247400F83DD821ADF2752FAD14750043" -. "0053004900523DD821503DD821AD0A750CFF5B74005400407A8B305A8B24C1484A8B3A034805" -. "E3C1D88902E901D831078BC3298BEE75C9FFABC3097403E183484AC9FFC7FF483F3003483C7A" -. "8BF7751A0348245A8B3AC14800000010B9040F24D88804C30704027C3A3C305F58EB75C9FFAA" -. "017400F8835B5EC3" +. "EB83E9C0311F89145AC3565EFFFFFEF90000013604EB90036A5756525153EA8300000011E814" +. "420320428B63EB1A89C329D38908728BC3525A0332031A7400FE83030C7A8B104A8B0A74A6F3" +. "4F473AE1E9F674FF6E3831240CFF0000008B320324728BDB4A8902E9C1344A000040346A8134" +. "05E3C1D88949004A3BC301ADC3297500FB83107534A9850F085A3B0B75490CEB0000009B850F" +. "385A3BDE64240CFF000000588B00000030A102588A44738B10BB305A0001F38066AD66FFDFFF" +. "DF8366247400F883D821ADF2752FF81475004300533D4900523DD821AD3DD821AD0A7500FF52" +. "74005400507A8B305A8B240CC1484A8B3A034005E3C1D88902E901D831078BC3294A8BEF7549" +. "ABC330067403E183487A8BFA7549473F03245A8B3A033CC100000008B91A040F24D88804C307" +. "04027C3A3C305E5F58ED7549AA7400F8835B595A015004EB90C3015756525153000000000015" +. "E8036A20428B63EA834848D3894814420303EB1A8948C3298308728BC3525A320348207400FE" +. "480C7A8B104A8BFF48C7FF483A036E380A74A6F3CF0000F1E9F474FF8BDB31240CFF004A8B32" +. "03482472344A8902E9C13400000040346A8105E3C1D889C9FF4A3BC301ADC3297500FB831075" +. "34B7850F085A3B0BC9FF0DEB000000850F385A3BDD75240CFF000000A8000060A14867658B48" +. "20588B4800F38002588A7873FFDFBB305A0001F88366AD66FFDF2FF88366247400533DD821AD" +. "F27521AD147500430075004900523DD800503DD821AD0A240CFF5B74005448407A8B305A8BE9" +. "C1484A8B3A032905E3C1D88902C301D831078BC34A8BEE75C9FFAB30097403E1834875C9FFC7" +. "FF483F3A03483C7A8BF7B91A0348245A8BC3C1480000001030040F24D88804AA0704027C3A3C" +. "5E5F58EB75C9FF7400F8835B595AC301" VarSetCapacity(Buf, StrLen(h)//2+6) Loop % (StrLen(h)+12)//14 NumPut("0x" SubStr(h,(A_Index-1)*14+1,14), Buf, (A_Index-1)*7, "Int64")