Skip to content

Commit

Permalink
Align mcode for faster processing
Browse files Browse the repository at this point in the history
  • Loading branch information
TAC109 committed Apr 2, 2023
1 parent 32ee5a0 commit ae06da4
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions BinMod.ahk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

;@Ahk2Exe-SetVersion 2023.03.29 ; Edition: y.m.d
;@Ahk2Exe-SetVersion 2023.04.02 ; Edition: (y.m.d)
;@Ahk2Exe-SetCopyright TAC109
;@Ahk2Exe-SetProductName BinMod
;@Ahk2Exe-SetDescription Binary file editor - see Ahk2Exe's PostExec directive
Expand Down Expand Up @@ -177,7 +177,7 @@ if (SG2) ; Process /ScriptGuard2
(Sa:=k>1?DllCall("SizeofResource","Ptr",hMod, "Ptr",rc, "UInt") : 0)
, (pt :=DllCall("LoadResource", "Ptr",hMod, "Ptr",rc, "Ptr")), k1:=k
, (pt%k% :=DllCall("LockResource", "Ptr",pt, "Ptr"))
} DllCall("FreeLibrary", "Ptr",hMod)
} DllCall("FreeLibrary", "Ptr",hMod)
(Sa) ? 0 : ErrMes(SM "B4-" A_LastError ")`n`nScript not found.")

io("Open", FileName), par:="/ScriptGuard2", GetA1(), VarSetCapacity(L,0x50,0)
Expand All @@ -191,7 +191,7 @@ if (SG2) ; Process /ScriptGuard2
NumPut(A2r.2,L,0x24,B.4), NumPut(A2r.1,L,0x28,B.4), NumPut(A2r.3,L,0x2c,B.4)
Wk1 := A2r.3, StrPut("0 ",&Bin+np("7F",2,0x3c,,0), 16, "UTF-8")
StrPut(Format("{:#-18X}",Wk1), &Bin+np("x7F",3,,,0)-1, 18, "UTF-8")
NumPut(4096,L,0x1c,B.4), NumPut(37,L,0x10,B.4) , Rnd(,3000,,L,0x20,4)
NumPut(4096,L,0x1c,B.4), NumPut(37,L,0x10,B.4), Rnd(,3000,,L,0x20,4)

Wk:=np("; <COMPILER: v",14,0x40), Rnd(99,127,32,Bin,Wk+1,,"`n")
((Wk1 := GetA2("; <COMPILER: v",14,,1)) && ng(Wk1.1-1,1) != 34)
Expand Down Expand Up @@ -285,26 +285,26 @@ InBuf(hayP, hayS, neeP, neeS, sOff:=0) ; Search buffer; returns offset
. "758B0375A7F30474C98574C985F84D8BDEDF89D375A6F3045A8B0C558BA4EB087D03447A8B30"
. "FE02E9C1484A8B2905E3C1D889C31F03D831078BC3484A8BEF7549AB3F30067403E1838BDB31"
. "FA7549474A8B0875032872D8894902E9C13401ADC32905E3C1385A89F37549C345C70774013A"
. "83D68900000136108B207A03187A8B188B08450304424A03184A2BF9890050008108891450B9"
. "087D03000024E8A4F30000000327C683000000F351034E8B1075C32958AAE9B0A42B205A2B55"
. "EB83E9C0311F89145AC3565EFFFFFEF90000013604EB90036A5756525153EA8300000011E814"
. "420320428B63EB1A89C329D38908728BC3525A0332031A7400FE83030C7A8B104A8B0A74A6F3"
. "4F473AE1E9F674FF6E3831240CFF0000008B320324728BDB4A8902E9C1344A000040346A8134"
. "05E3C1D88949004A3BC301ADC3297500FB83107534A9850F085A3B0B75490CEB0000009B850F"
. "385A3BDE64240CFF000000588B00000030A102588A44738B10BB305A0001F38066AD66FFDFFF"
. "DF8366247400F883D821ADF2752FF81475004300533D4900523DD821AD3DD821AD0A7500FF52"
. "74005400507A8B305A8B240CC1484A8B3A034005E3C1D88902E901D831078BC3294A8BEF7549"
. "ABC330067403E183487A8BFA7549473F03245A8B3A033CC100000008B91A040F24D88804C307"
. "04027C3A3C305E5F58ED7549AA7400F8835B595A015004EB90C3015756525153000000000015"
. "E8036A20428B63EA834848D3894814420303EB1A8948C3298308728BC3525A320348207400FE"
. "480C7A8B104A8BFF48C7FF483A036E380A74A6F3CF0000F1E9F474FF8BDB31240CFF004A8B32"
. "03482472344A8902E9C13400000040346A8105E3C1D889C9FF4A3BC301ADC3297500FB831075"
. "34B7850F085A3B0BC9FF0DEB000000850F385A3BDD75240CFF000000A8000060A14867658B48"
. "20588B4800F38002588A7873FFDFBB305A0001F88366AD66FFDF2FF88366247400533DD821AD"
. "F27521AD147500430075004900523DD800503DD821AD0A240CFF5B74005448407A8B305A8BE9"
. "C1484A8B3A032905E3C1D88902C301D831078BC34A8BEE75C9FFAB30097403E1834875C9FFC7"
. "FF483F3A03483C7A8BF7B91A0348245A8BC3C1480000001030040F24D88804AA0704027C3A3C"
. "5E5F58EB75C9FF7400F8835B595AC301"
. "8362830000013610187A8BD689FC200304428B207A032BF989188B08450889144A03184A0300"
. "000050008100000050B9087D00000024E8A4F38B10750327C683E9B0A4F351034E55EB83C329"
. "58AA89145A2B205A2BFFFEF5E9C0311F04EB90C3565EFF525153000001360011E8036A575642"
. "8B63EA83000029D38914420320525A03EB1A89C300FE8308728BC3104A8B32031A744F473A03"
. "0C7A8BFF6E380A74A6F3000000E1E9F674728BDB31240CFFC1344A8B3203246A81344A8902E9"
. "89490000004034ADC32905E3C1D81075344A3BC3015A3B0B7500FB83000000A9850F085A3BDE"
. "75490CEB0000009B850F380030A164240CFF738B10588B000001F38002588A44DFFFDFBB305A"
. "0000F88366AD66FF752FF88366247400533DD821ADF2D821AD147500430A75004900523D5400"
. "503DD821AD8B240CFF5274003A03407A8B305A8902E9C1484A8B8BC32905E3C1D849ABC301D8"
. "3107E183484A8BEF7549473F300674033A033C7A8BFA7508B91A03245A8B8804C3C10000003A"
. "3C30040F24D87549AA0704027C5B595A5E5F58ED90C3017400F883530000015004EBE8036A57"
. "565251EA83480000001514420320428B6348C32948D38948C3525A03EB1A897400FE8308728B"
. "104A8B32034820483A03480C7A8BA6F3CFFF48C7FFF474FF6E380A740CFF000000F1E9482472"
. "8BDB3124E9C1344A8B3203346A81344A890289C9FF00000040ADC32905E3C1D81075344A3BC3"
. "015A3B0B7500FB83000000B7850F083BDD75C9FF0DEB0000A8850F385A486765240CFF008B48"
. "00000060A18A78738B4820585A0001F380025866FFDFFFDFBB30247400F88366ADADF2752FF8"
. "8366004300533DD821523DD821AD147521AD0A7500490074005400503DD8305A8B240CFF5B8B"
. "3A0348407A8BD88902E9C1484A078BC32905E3C1C9FFABC301D831E183484A8BEE75FF483F30"
. "0974037A8BF775C9FFC7245A8B3A03483C000010B91A0348D88804C3C148007C3A3C30040F24"
. "75C9FFAA0704025B595A5E5F58EBC3017400F883"
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")
Expand Down

0 comments on commit ae06da4

Please sign in to comment.