6
"INIT"
000080
Auto Assembler Script
[ENABLE]
{$lua}
function msearch(bytes,flag)
local memScanner = createMemScan()
memScanner.setOnlyOneResult(true)
memScanner.firstScan(
soExactValue,vtByteArray,rtRounded,bytes,nil,
0,0xFFFFFFFF,flag,fsmNotAligned,"",true,false,false,false)
memScanner.waitTillDone()
local res = memScanner.getOnlyResult()
memScanner.destroy()
return res
end
function bt2str(bt)
local res=""
for i, v in ipairs(bt) do
res = res .. string.format('%02X', v)
end
return res
end
unregisterSymbol("hdlcommp")
registerSymbol("hdlcommp",msearch("8D4E5CC706????????E8????????C6466400","+X-W") +5)
unregisterSymbol("alloc")
registerSymbol("alloc",allocateMemory(4096))
unregisterSymbol("memmap")
registerSymbol("memmap",readInteger(msearch("3BF37435578B3E85FF741D8B0D","+X-W") +13))
hdcom = readInteger("hdlcommp")
function normal(bytes,g)
bytes= g .. "000080" .. bytes
local normfin = readInteger(msearch(bytes,"-X")-8)
if(readBytes(normfin+12,1,false) == 1) then
writeBytes(normfin+12, 3)
local thrdlv = readInteger(readInteger(readInteger(normfin+60))+8)
local to08 = readInteger(thrdlv+36)
local sndlv = 0
for i=0,(readBytes(thrdlv+42,1,false)-1) do
sndlv = readInteger(to08 + i*4)
writeBytes(readInteger(sndlv)+56,0)
end
end
end
function igunlock(bytes)
bytes= "01000080" .. bytes
local item=readInteger(msearch(bytes,"-X")-8)+56
if(readBytes(item,1,false) == 0) then
return false
end
writeBytes(item,0)
return true
end
function commchal(bytes,igu)
if(igunlock(igu)) then
bytes= "01000080" .. bytes
local item = msearch(bytes,"-X")-8
local listFound = 0
local memScanner = createMemScan()
local memFoundList = createFoundList(memScanner)
memScanner.firstScan(
soExactValue,vtDword,rtRounded,hdcom,nil,
0,0xFFFFFFFF,"-X",fsmAligned,"4",false,false,false,false)
memScanner.waitTillDone()
memFoundList.initialize()
for i=0,(memFoundList.Count-1) do
local point1 = readInteger(memFoundList.Address[i] .. "+20")
if((point1 ~= getAddress(memFoundList.Address[i])) and (point1 ~= 0)) then
local point2 = readInteger(readInteger(readInteger(point1+92))+12)
listFound = readInteger(point2+8)
break
end
end
if((listFound==0) or (readBytes(listFound+4,1,false)~=9)) then
showMessage("Unable to unlock. " .. memFoundList.Count)
return nil
end
local l = readSmallInteger(listFound+22)
local adr=readInteger(listFound+16)+4*(l-1)
local empl=0
local iid=0
local success=false
while(l > 0) do
empl = readInteger(adr)+4
iid = readInteger(readInteger(empl)+12)
if((iid == 0x4A8DF156) or (iid == 0x4748F128) or (iid == 0x4748F124)) then
writeInteger(empl,item)
success=true
break
end
l=l-1
adr=adr-4
end
if(not success) then showMessage("Unable to unlock... Try reloading the save. " .. memFoundList.Count) end
memFoundList.destroy()
memScanner.destroy()
end
end
{$asm}
[DISABLE]
24
"hdlcommp"
1
4 Bytes
hdlcommp
26
"alloc"
1
4 Bytes
alloc
27
"memmap"
1
4 Bytes
memmap
11
"Rewards, social treasures"
1
7
"Pistol Swords"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
normal("CA7A0A1D09000000","01")
{$asm}
[DISABLE]
8
"Scottish Broadsword"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
normal("A8C945D20C000000","01")
{$asm}
[DISABLE]
10
"Governor Outfit"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
normal("277048D50C000000","01")
{$asm}
[DISABLE]
9
"Templar Outfit"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
normal("124385160D000000","01")
{$asm}
[DISABLE]
12
"Stealth Outfit"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
normal("CB7A0A1D09000000","01")
{$asm}
[DISABLE]
13
"The Ranger Figurehead & Queen Ann Revenge Wheel"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
normal("83D9853E0D000000","01")
{$asm}
[DISABLE]
14
"Aquila Figurehead"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
normal("2A7048D50C000000","01")
{$asm}
[DISABLE]
25
"Golden Flintlock Pistols & Gilded Sails (last naval contract will appear as done)"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
if(igunlock("C02D03EC07000000")) then
igunlock("F7F1347A08000000")
memmap2 = readInteger(readInteger(getAddress("memmap"))+444)
writeBytes(memmap2 + bShr(getAddress("alloc"),16), 129)
bt = readBytes(msearch("8BEC51568BF18D8E40050000C706","+X-W")+14,4,true)
bytcnav = "00000000" .. bt2str(bt) .. "0000000000000000"
memScanner = createMemScan()
memFoundList = createFoundList(memScanner)
memScanner.firstScan(
soExactValue,vtByteArray,rtRounded,bytcnav,nil,
0,0xFFFFFFFF,"-X",fsmNotAligned,"",true,false,false,false)
memScanner.waitTillDone()
memFoundList.initialize()
for i=0,(memFoundList.Count-1) do
l = readSmallInteger(memFoundList.Address[i] .. "+2E")
if(l ~= 0) then
adr=readInteger(memFoundList.Address[i] .. "+28")
headerliste = readInteger(readInteger(adr))
headerItem = readInteger(readInteger(readInteger(readInteger(adr)+8)))
lc = l
while(lc > 0) do
if(readInteger(readInteger(readInteger(adr)+4)+12) == 0x421C29C7) then break end
adr=adr+4
lc=lc - 1
end
if(lc == 0) then
writeSmallInteger(getAddress(memFoundList.Address[i] .. "+2C"), l+1)
writeSmallInteger(getAddress(memFoundList.Address[i] .. "+2E"), l+1)
local gl = getAddress("alloc")
copyMemory(readInteger(memFoundList.Address[i] .. "+28"), l*4, gl)
writeInteger(memFoundList.Address[i] .. "+28",gl)
local lcnav = gl+0x100
writeInteger(gl + l*4,lcnav)
writeInteger(lcnav,headerliste)
writeInteger(lcnav+4,msearch("01000080C7291C4207000000","-X")-8)
writeInteger(lcnav+8,lcnav+0x100)
writeBytes(lcnav+12, 1,0,1)
writeInteger(lcnav+0x100,lcnav+0x200)
else
local lcnav = readInteger(adr)
l = readSmallInteger(lcnav+14)
writeSmallInteger(lcnav+14, l+1)
writeSmallInteger(lcnav+12, l+1)
local cl = getAddress("alloc")+0x200
copyMemory(readInteger(lcnav+8), l*4, cl)
writeInteger(lcnav+8,cl)
writeInteger(cl + l*4,cl+0x100)
end
local item=getAddress("alloc")+0x300
writeInteger(item,headerItem)
writeInteger(item+4,msearch("01000080DD45A5C407000000","-X")-8)
writeInteger(item+8,0xDA71D)
writeBytes(item+36, 100,0,1)
end
end
memFoundList.destroy()
memScanner.destroy()
end
{$asm}
[DISABLE]
16
"Community Challenges"
1
15
"Persian Scimitars"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("1A479ED40C000000","E23003EC07000000")
{$asm}
[DISABLE]
23
"Captain Whellock Pistols"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("0A479ED40C000000","F02D03EC07000000")
{$asm}
[DISABLE]
22
"Explorer Outfit"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("16479ED40C000000","336D1F1C09000000")
{$asm}
[DISABLE]
21
"El Imputo Figurehead"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("12479ED40C000000","C1EC347A08000000")
{$asm}
[DISABLE]
20
"El Imputo Wheel"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("06479ED40C000000","78F2347A08000000")
{$asm}
[DISABLE]
19
"Black and red Sails"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("0E479ED40C000000","E8F1347A08000000")
{$asm}
[DISABLE]
30
"Plans"
1
31
"Queen Ann Figurehead"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("1F37CFB007000000","9EEC347A08000000")
{$asm}
[DISABLE]
34
"Blackwood Wheel"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("C2B0242F08000000","F72D4A7B07000000")
{$asm}
[DISABLE]
33
"Aquila Wheel"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("2337CFB007000000","8CF2347A08000000")
{$asm}
[DISABLE]
32
"Flower Sails"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("C6B0242F08000000","852B4A7B07000000")
{$asm}
[DISABLE]
35
"Grey Sails"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("1737CFB007000000","EDF1347A08000000")
{$asm}
[DISABLE]
44
"Elite hull"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("E336CFB007000000","E245C87307000000")
{$asm}
[DISABLE]
43
"Elite set of cannons"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("EB36CFB007000000","65D4417207000000")
{$asm}
[DISABLE]
42
"Elite ram"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("E736CFB007000000","1E4DC87307000000")
{$asm}
[DISABLE]
41
"Elite round shot"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("FB36CFB007000000","A54AC87307000000")
{$asm}
[DISABLE]
40
"Elite mortars"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("F336CFB007000000","94349F5F07000000")
{$asm}
[DISABLE]
39
"Elite swivel guns"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("F736CFB007000000","4C4EC87307000000")
{$asm}
[DISABLE]
38
"Elite heavy shot"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("0737CFB007000000","C94BC87307000000")
{$asm}
[DISABLE]
47
"Elite fire barrel"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("0B37CFB007000000","2A50C87307000000")
{$asm}
[DISABLE]
46
"Elite heavy shot storage"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("EA9ACAF307000000","DB90CAF307000000")
{$asm}
[DISABLE]
45
"Elite mortar storage"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("E29ACAF307000000","C790CAF307000000")
{$asm}
[DISABLE]
37
"Elite fire barrel storage"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("E69ACAF307000000","E790CAF307000000")
{$asm}
[DISABLE]
36
"Elite harpoon"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
commchal("1337CFB007000000","6751C87307000000")
{$asm}
[DISABLE]
48
"DLC Freedom Cry"
1
49
"Precision Shooter"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
normal("1A9A37660F000000","02")
{$asm}
[DISABLE]
50
"Crude Iron Machete"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
normal("FDCB577B0F000000","02")
{$asm}
[DISABLE]
51
"Mayan Machete"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
normal("222F67810F000000","02")
{$asm}
[DISABLE]
52
"Pouches II"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
normal("826FE9960F000000","02")
{$asm}
[DISABLE]
53
"Jackdaw Figurehead"
FF0000
Auto Assembler Script
[ENABLE]
{$lua}
item=readInteger(msearch("02000080B90AD8C1","-X")-8)+56
if(readBytes(item,1,false) == 1) then
writeBytes(item,0)
item = msearch("02000080DCE923A3","-X")-8
ovw = dwordToByteTable(msearch("02000080334DD30D","-X")-8)
local listFound = 0
local memScanner = createMemScan()
local memFoundList = createFoundList(memScanner)
memScanner.firstScan(
soExactValue,vtDword,rtRounded,hdcom,nil,
0,0xFFFFFFFF,"-X",fsmAligned,"4",false,false,false,false)
memScanner.waitTillDone()
memFoundList.initialize()
for i=0,(memFoundList.Count-1) do
local point1 = readInteger(memFoundList.Address[i] .. "+20")
if((point1 ~= getAddress(memFoundList.Address[i])) and (point1 ~= 0)) then
local point2 = readInteger(readInteger(readInteger(point1+92))+12)
listFound = readInteger(point2+8)
break
end
end
if((listFound==0) or (readBytes(listFound+4,1,false)~=9)) then
showMessage("Unable to unlock. " .. memFoundList.Count)
end
adr=readInteger(readInteger(listFound+16))
hdobj=readBytes(adr,4,true)
tlobj=readBytes(adr+8,4,true)
local bytes=bt2str(hdobj) .. bt2str(ovw) .. bt2str(tlobj)
memScanner.firstScan(
soExactValue,vtByteArray,rtRounded,bytes,nil,
0,0xFFFFFFFF,"-X",fsmAligned,"4",true,false,false,false)
memScanner.waitTillDone()
memFoundList.initialize()
for i=0,(memFoundList.Count-1) do
writeInteger(memFoundList.Address[i] .. "+4",item)
end
memFoundList.destroy()
memScanner.destroy()
end
{$asm}
[DISABLE]