Huge Oil/Water Deposit on Load:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<CheatTable>
<CheatEntries>
<CheatEntry>
<ID>8</ID>
<Description>"Huge Oil/Water Deposit on Load"</Description>
<LastState Activated="1"/>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>define(depositDeserializeCapacity,Mafi.Core.Map.SimpleVirtualResource:DeserializeData+28)
define(depositDeserializeQuantity,Mafi.Core.Map.SimpleVirtualResource:DeserializeData+f8)
define(depositDeserializeBytes,41 FF D3 89 45)
[ENABLE]
assert(depositDeserializeCapacity,depositDeserializeBytes)
assert(depositDeserializeQuantity,depositDeserializeBytes)
alloc(depositCapacityMem,$80,Mafi.Core.Map.SimpleVirtualResource:DeserializeData+28)
alloc(depositQuantityMem,$80,Mafi.Core.Map.SimpleVirtualResource:DeserializeData+f8)
label(returnCap)
label(returnQty)
alloc(depositCapacityOrig,6)
alloc(depositQuantityOrig,6)
registersymbol(depositCapacityOrig)
registersymbol(depositQuantityOrig)
depositCapacityOrig:
readmem(depositDeserializeCapacity,6)
depositQuantityOrig:
readmem(depositDeserializeQuantity,6)
depositCapacityMem:
call r11
mov eax, #1000000000
readmem(depositDeserializeCapacity+3,3)
jmp returnCap
depositQuantityMem:
call r11
mov eax, #1000000000
readmem(depositDeserializeQuantity+3,3)
jmp returnQty
depositDeserializeCapacity:
jmp depositCapacityMem
nop
returnCap:
depositDeserializeQuantity:
jmp depositQuantityMem
nop
returnQty:
[DISABLE]
depositDeserializeCapacity:
readmem(depositCapacityOrig,6)
depositDeserializeQuantity:
readmem(depositQuantityOrig,6)
dealloc(*)
unregistersymbol(*)
{
// ORIGINAL CODE - INJECTION POINT: Mafi.Core.Map.SimpleVirtualResource:DeserializeData+28:
Mafi.Core.Map.SimpleVirtualResource:DeserializeData: 55 - push rbp
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+1: 48 8B EC - mov rbp,rsp
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+4: 48 83 EC 70 - sub rsp,70
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+8: 48 89 75 F0 - mov [rbp-10],rsi
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+c: 48 89 7D F8 - mov [rbp-08],rdi
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+10: 48 8B F9 - mov rdi,rcx
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+13: 48 8B F2 - mov rsi,rdx
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+16: 48 8B CE - mov rcx,rsi
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+19: 48 8D 64 24 00 - lea rsp,[rsp+00]
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+1e: 49 BB E0 44 85 E6 D3 02 00 00 - mov r11,Mafi.Quantity:Deserialize
// ---------- INJECTING HERE ----------
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+28: 41 FF D3 - call r11
// ---------- DONE INJECTING ----------
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+2b: 89 45 B8 - mov [rbp-48],eax
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+2e: 48 8B CF - mov rcx,rdi
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+31: 48 8B 55 B8 - mov rdx,[rbp-48]
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+35: 90 - nop
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+36: 49 BB 00 CB 86 E7 D3 02 00 00 - mov r11,Mafi.Core.Map.SimpleVirtualResource:set_Capacity
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+40: 41 FF D3 - call r11
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+43: 48 8B CE - mov rcx,rsi
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+46: 49 BB 40 CB 86 E7 D3 02 00 00 - mov r11,Mafi.RelTile1i:Deserialize
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+50: 41 FF D3 - call r11
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+53: 89 45 C0 - mov [rbp-40],eax
// ORIGINAL CODE - INJECTION POINT: Mafi.Core.Map.SimpleVirtualResource:DeserializeData+f8:
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+c3: 66 66 90 - nop 3
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+c6: 49 BB 90 C2 BC A7 D3 02 00 00 - mov r11,Mafi.Serialization.BlobReader:ReadGenericAs
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+d0: 41 FF D3 - call r11
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+d3: 48 8B D0 - mov rdx,rax
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+d6: 48 8B CF - mov rcx,rdi
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+d9: 48 8D 64 24 00 - lea rsp,[rsp+00]
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+de: 49 BB 20 CC 86 E7 D3 02 00 00 - mov r11,Mafi.Core.Map.SimpleVirtualResource:set_Product
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+e8: 41 FF D3 - call r11
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+eb: 48 8B CE - mov rcx,rsi
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+ee: 49 BB E0 44 85 E6 D3 02 00 00 - mov r11,Mafi.Quantity:Deserialize
// ---------- INJECTING HERE ----------
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+f8: 41 FF D3 - call r11
// ---------- DONE INJECTING ----------
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+fb: 89 45 E8 - mov [rbp-18],eax
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+fe: 48 8B CF - mov rcx,rdi
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+101: 48 8B 55 E8 - mov rdx,[rbp-18]
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+105: 90 - nop
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+106: 49 BB 70 CC 86 E7 D3 02 00 00 - mov r11,Mafi.Core.Map.SimpleVirtualResource:set_Quantity
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+110: 41 FF D3 - call r11
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+113: 48 8B 75 F0 - mov rsi,[rbp-10]
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+117: 48 8B 7D F8 - mov rdi,[rbp-08]
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+11b: 48 8D 65 00 - lea rsp,[rbp+00]
Mafi.Core.Map.SimpleVirtualResource:DeserializeData+11f: 5D - pop rbp
}
</AssemblerScript>
</CheatEntry>
</CheatEntries>
</CheatTable>
Enable. Load game and see how all your water and oil deposits on map changed to one billion in capacity and quantity.