Okay, sorry for necroing thread.
So up to this point, I reached this function. I am still kinda stuck at understanding the first reply. So I reached one good function to work on. Image inside spoiler below
This "mov [rcx +01],al" function is what used to write on every party member's HP. This function itself is NOT fixed (will move after every game restart), so I can not use "[game.exe+0000XXXX]" as pointer. But it is always definite on this pattern so I
probably could just use AOB scan for this. PS: Since I obtain this process by exchanging party slots, it is a "copy-swap" function.
Code: Select all
XXXaddress- 0FB6 42 01 - movzx eax,byte ptr [rdx+01]
XXXaddress - 88 41 01 - mov [rcx+01],al << writes max HP
XXXaddress- 0FB6 42 02 - movzx eax,byte ptr [rdx+02]
XXXaddress - 88 41 02 - mov [rcx+02],al << writes current HP
XXXaddress- 0FB6 42 02 - movzx eax,byte ptr [rdx+03]
XXXaddress - 88 41 02 - mov [rcx+03],al << writes max MP
XXXaddress- 0FB6 42 02 - movzx eax,byte ptr [rdx+04]
XXXaddress - 88 41 02 - mov [rcx+04],al << writes current MP
Now then, the questions are:
How to make this write function to for example "write value of [desired value]"?
Then perhaps create the table where there is customization for the value?
So I tried to take example of other codes atm, one from MH World table, mainly this part since it should fit closest to my goal
Code: Select all
<CheatEntries>
<CheatEntry>
<ID>20722</ID>
<Description>"Re-enter Menu After Hoverover"</Description>
<LastState Value="" RealAddress="00000000"/>
<Color>0000FF</Color>
<GroupHeader>1</GroupHeader>
</CheatEntry>
</CheatEntries>
</CheatEntry>
<CheatEntry>
<ID>1337091759</ID>
<Description>"Guiding Lands Level Editor"</Description>
<Options moHideChildren="1"/>
<LastState/>
<Color>000000</Color>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{ Game : MonsterHunterWorld.exe
Version:
Date : 2020-01-16
Author : Squall8
}
[ENABLE]
aobscanmodule(guidinglands,MonsterHunterWorld.exe,8B BC 81 28 B9 27 00) // should be unique
alloc(newmem,$1000,guidinglands)
label(code)
label(return)
label(guidinglandsp)
registersymbol(guidinglands)
registersymbol(guidinglandsp)
newmem:
cmp rax,0
jne code
push rbx
lea rbx,[rcx+rax*4+0027B928]
mov [guidinglandsp],rbx
pop rbx
code:
mov edi,[rcx+rax*4+0027B928]
jmp return
guidinglandsp:
dq 0
guidinglands:
jmp newmem
nop 2
return:
[DISABLE]
guidinglands:
db 8B BC 81 28 B9 27 00
unregistersymbol(guidinglands)
unregistersymbol(guidinglandsp)
dealloc(newmem)
</AssemblerScript>
<CheatEntries>
<CheatEntry>
<ID>1337091760</ID>
<Description>"Forest Exp"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>0</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337091761</ID>
<Description>"Spire Exp"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>4</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337091762</ID>
<Description>"Coral Exp"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>8</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337091763</ID>
<Description>"Vale Exp"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>C</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337091764</ID>
<Description>"Volcanic Exp"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>10</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337092193</ID>
<Description>"Tundra Exp"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>14</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337091765</ID>
<Description>"Forest Outcrops"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>24</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337091766</ID>
<Description>"Spire Outcrops"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>28</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337091767</ID>
<Description>"Coral Outcrops"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>2C</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337091768</ID>
<Description>"Vale Outcrops"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>30</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337091769</ID>
<Description>"Volcanic Outcrops"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>34</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337092194</ID>
<Description>"Tundra Outcrops"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>38</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337091770</ID>
<Description>"Forest Bonepiles"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>44</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337091771</ID>
<Description>"Spire Bonepiles"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>48</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337091772</ID>
<Description>"Coral Bonepiles"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>4C</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337091773</ID>
<Description>"Vale Bonepiles"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>50</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337091774</ID>
<Description>"Volcanic Bonepiles"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>54</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>1337092195</ID>
<Description>"Tundra Bonepiles"</Description>
<VariableType>4 Bytes</VariableType>
<Address>guidinglandsp</Address>
<Offsets>
<Offset>58</Offset>
</Offsets>
</CheatEntry>
</CheatEntries>
</CheatEntry>
Which I edited into this:
Code: Select all
<CheatEntry>
<ID>5</ID>
<Description>"Party HP MP Stats Editor"</Description>
<Options moHideChildren="1"/>
<LastState/>
<Color>000000</Color>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{ Game : Game.exe
Version:
Date :
Author :
}
[ENABLE]
aobscanmodule(partystats,Game.exe,0FB6 42 01 88 41 01) // should be unique
alloc(newmem,$1000,partystatsmaxhp)
label(code)
label(return)
label(partystatsmaxhp)
registersymbol(partystats)
registersymbol(partystatsmaxhp)
newmem:
??????????????????
code:
??????????????????
partystatsmaxhp:
dq 0
partystats:
jmp newmem
nop 2
return:
[DISABLE]
partystats:
db 0FB6 42 01 88 41 01
unregistersymbol(partystats)
unregistersymbol(partystatsmaxhp)
dealloc(newmem)
</AssemblerScript>
<CheatEntries>
<CheatEntry>
<ID>6</ID>
<Description>"1st Party Max HP"</Description>
<VariableType>4 Bytes</VariableType>
<Address>partystatsmaxhp</Address>
<Offsets>
<Offset>0</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>7</ID>
<Description>"2nd Party Max HP"</Description>
<VariableType>4 Bytes</VariableType>
<Address>partystatsmaxhp</Address>
<Offsets>
<Offset>10</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>8</ID>
<Description>"3rd Party Max HP"</Description>
<VariableType>4 Bytes</VariableType>
<Address>partystatsmaxhp</Address>
<Offsets>
<Offset>20</Offset>
</Offsets>
</CheatEntry>
<CheatEntry>
<ID>9</ID>
<Description>"4th Party Max HP"</Description>
<VariableType>4 Bytes</VariableType>
<Address>partystatsmaxhp</Address>
<Offsets>
<Offset>30</Offset>
</Offsets>
</CheatEntry>
</CheatEntries>
</CheatEntry>
What should I write on the newmem, code and partystats part?
Perhaps a better AOB hint?