could you add a change nation feature based on this script?
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
<CheatEntries>
<CheatEntry>
<ID>146</ID>
<Description>"Control Another Faction Temporarily"</Description>
<LastState/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{ Game : imperator.exe
Version:
Date : 2019-04-29
Author : 0
This script does blah blah blah
}
[ENABLE]
aobscanmodule(INJECT,imperator.exe,48 0F 44 C5 8B 00 89 46) // should be unique
alloc(newmem,$1000,"imperator.exe"+B08485)
label(code)
label(return)
label(faction)
newmem:
code:
cmove rax,rbp
mov eax,[rax]
mov eax,[faction]
jmp return
faction:
dd 00
INJECT:
jmp newmem
nop
return:
registersymbol(INJECT)
registersymbol(faction)
[DISABLE]
INJECT:
db 48 0F 44 C5 8B 00
unregistersymbol(INJECT)
unregistersymbol(faction)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: "imperator.exe"+B08485
"imperator.exe"+B08468: 49 8B CE - mov rcx,r14
"imperator.exe"+B0846B: FF 12 - call qword ptr [rdx]
"imperator.exe"+B0846D: 8B D0 - mov edx,eax
"imperator.exe"+B0846F: 48 8B CB - mov rcx,rbx
"imperator.exe"+B08472: FF 57 08 - call qword ptr [rdi+08]
"imperator.exe"+B08475: 48 85 C0 - test rax,rax
"imperator.exe"+B08478: 74 04 - je imperator.exe+B0847E
"imperator.exe"+B0847A: 4C 8D 78 F8 - lea r15,[rax-08]
"imperator.exe"+B0847E: 49 8D 47 18 - lea rax,[r15+18]
"imperator.exe"+B08482: 4D 85 FF - test r15,r15
// ---------- INJECTING HERE ----------
"imperator.exe"+B08485: 48 0F 44 C5 - cmove rax,rbp
"imperator.exe"+B08489: 8B 00 - mov eax,[rax]
// ---------- DONE INJECTING ----------
"imperator.exe"+B0848B: 89 46 44 - mov [rsi+44],eax
"imperator.exe"+B0848E: 48 8B 0D B3 3D EA 00 - mov rcx,[imperator.exe+19AC248]
"imperator.exe"+B08495: E8 E6 D5 DB FF - call imperator.exe+8C5A80
"imperator.exe"+B0849A: 48 85 C0 - test rax,rax
"imperator.exe"+B0849D: 74 09 - je imperator.exe+B084A8
"imperator.exe"+B0849F: 0F BF 40 48 - movsx eax,word ptr [rax+48]
"imperator.exe"+B084A3: C1 E8 05 - shr eax,05
"imperator.exe"+B084A6: 24 01 - and al,01
"imperator.exe"+B084A8: 88 46 48 - mov [rsi+48],al
"imperator.exe"+B084AB: BA 10 00 00 00 - mov edx,00000010
}
</AssemblerScript>
<CheatEntries>
<CheatEntry>
<ID>145</ID>
<Description>"Current Faction Being Controlled - Ctrl+Z to change"</Description>
<ShowAsHex>1</ShowAsHex>
<VariableType>4 Bytes</VariableType>
<Address>faction</Address>
<Hotkeys>
<Hotkey>
<Action>Increase Value</Action>
<Keys>
<Key>17</Key>
<Key>90</Key>
</Keys>
<Value>1</Value>
<ID>0</ID>
</Hotkey>
</Hotkeys>
</CheatEntry>
<CheatEntry>
<ID>142</ID>
<Description>"Your Current Faction"</Description>
<LastState Value="00000048" RealAddress="1E0599D3FF4"/>
<ShowAsHex>1</ShowAsHex>
<VariableType>4 Bytes</VariableType>
<Address>imperator.g_currentgamestate</Address>
<Offsets>
<Offset>44</Offset>
</Offsets>
</CheatEntry>
</CheatEntries>
</CheatEntry>
</CheatEntries>
</CheatTable>