Eighty7 How do I cheat?
Reputation: 0
Joined: 27 Jun 2026 Posts: 1 Location: United States
|
Posted: Sat Jun 27, 2026 1:58 pm Post subject: Chaning protected value in an IL2Cpp Unity game |
|
|
I have this function from my game that spawns an enemy, but the value is protected.
This is my original method of changing the enemy size, which worked.
| Code: | [ENABLE]
alloc(newmem,1024,GameAssembly.dll+1394EAB) // MasterSpawn
alloc(enemysize,4)
registersymbol(enemysize)
label(return)
enemysize:
dd (float)1
newmem:
movss xmm3,[enemysize]
jmp return
GameAssembly.dll+1394EAB:
jmp newmem
nop 3
return:
[DISABLE]
GameAssembly.dll+1394EAB:
db F3 0F 10 1D B5 F3 61 02
unregistersymbol(enemysize)
dealloc(enemysize)
dealloc(newmem) |
Although this worked, I wanted to just use Lua to change the value directly since the function already technically had a valid pointer to the value, but when I went to change it, my screen just starts distorting, and my audio bugs out. This is what I used to do it (I had to use fullAccess for it to even change)
| Code: | function valuemodifier(address, writetype, fullAccessbool)
local value = getAddressSafe(address)
local input = inputQuery("Value modifier", "New value:", "")
local inputvalue = tonumber(input)
if fullAccessbool then
fullAccess(value)
end
writetype(value, inputvalue)
end
valuemodifier("GameAssembly.dll+39B4268", writeFloat, true) |
Here's the original game instruction
| Code: | | GameAssembly.dll+1394EAB - F3 0F10 1D B5F36102 - movss xmm3,[GameAssembly.dll+39B4268] { (1.00) } |
|
|